A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021....

60
A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale Collection Problem David Zamar 1 Bhushan Gopaluni 1 Shahab Sokhansanj 1,2 1 Department of Chemical and Biological Engineering, University of British Columbia 2 Resource and Engineering Systems Group, Environmental Sciences Division, Oak Ridge National Laboratory, TN 20th World Congress of the International Federation of Automatic Control, 9-14 July 2017 IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 1/30

Transcript of A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021....

Page 1: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

A Constrained K-Means and NearestNeighbor Approach for Route Optimization

in the Bale Collection Problem

David Zamar 1 Bhushan Gopaluni 1 Shahab Sokhansanj 1,2

1Department of Chemical and Biological Engineering, University of British Columbia

2Resource and Engineering Systems Group, Environmental Sciences Division, Oak Ridge National Laboratory, TN

20th World Congress of the International Federation of Automatic Control, 9-14 July 2017

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 1/30

Page 2: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

The agricultural industry is now able to collectcomprehensive real-time data regarding field operations.

Novel algorithms and methodologies are needed to makeproper use of this data.

These techniques can be used to improve the coordinationof agricultural machines and vehicles.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 2/30

Page 3: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

The agricultural industry is now able to collectcomprehensive real-time data regarding field operations.

Novel algorithms and methodologies are needed to makeproper use of this data.

These techniques can be used to improve the coordinationof agricultural machines and vehicles.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 2/30

Page 4: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

The agricultural industry is now able to collectcomprehensive real-time data regarding field operations.

Novel algorithms and methodologies are needed to makeproper use of this data.

These techniques can be used to improve the coordinationof agricultural machines and vehicles.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 2/30

Page 5: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

Major field operations require the planned coordination ofvarious farm equipment.

The bale collection problem (BCP) appears after harvestand baling operations of a crop and consists of defining thesequence in which bales spread over a field are collected.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 3/30

Page 6: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

Major field operations require the planned coordination ofvarious farm equipment.

The bale collection problem (BCP) appears after harvestand baling operations of a crop and consists of defining thesequence in which bales spread over a field are collected.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 3/30

Page 7: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 4/30

Page 8: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

The BCP is concerned with the collaborative operation ofloaders and wagons.

Planned management is required to coordinate the tasksefficiently.

Collection strategy is typically based on the skills andexperience of the operator.

Inconsistent and subjective nature of decisions based onoperator judgment tend to produce suboptimal solutions(Milkman et al., 2009).

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 5/30

Page 9: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

The BCP is concerned with the collaborative operation ofloaders and wagons.

Planned management is required to coordinate the tasksefficiently.

Collection strategy is typically based on the skills andexperience of the operator.

Inconsistent and subjective nature of decisions based onoperator judgment tend to produce suboptimal solutions(Milkman et al., 2009).

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 5/30

Page 10: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

The BCP is concerned with the collaborative operation ofloaders and wagons.

Planned management is required to coordinate the tasksefficiently.

Collection strategy is typically based on the skills andexperience of the operator.

Inconsistent and subjective nature of decisions based onoperator judgment tend to produce suboptimal solutions(Milkman et al., 2009).

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 5/30

Page 11: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

The BCP is concerned with the collaborative operation ofloaders and wagons.

Planned management is required to coordinate the tasksefficiently.

Collection strategy is typically based on the skills andexperience of the operator.

Inconsistent and subjective nature of decisions based onoperator judgment tend to produce suboptimal solutions(Milkman et al., 2009).

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 5/30

Page 12: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

More efficient bale collection plans are achievable.

Utilize geo-positioning technology that make it possible toknow the exact location of bales and machinery on the field(Amiama et al., 2008).

We develop optimization models of the BCP, which can beeasily integrated into farm management decision supportsystems.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 6/30

Page 13: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

More efficient bale collection plans are achievable.

Utilize geo-positioning technology that make it possible toknow the exact location of bales and machinery on the field(Amiama et al., 2008).

We develop optimization models of the BCP, which can beeasily integrated into farm management decision supportsystems.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 6/30

Page 14: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

More efficient bale collection plans are achievable.

Utilize geo-positioning technology that make it possible toknow the exact location of bales and machinery on the field(Amiama et al., 2008).

We develop optimization models of the BCP, which can beeasily integrated into farm management decision supportsystems.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 6/30

Page 15: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Problem Description and Motivation

Solving the BCP involves identifying:

1 The optimal number and locations of roadside storage sites.

2 The bale collection routes that minimize the total traveldistance.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 7/30

Page 16: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

The identification of roadside storage sites where bales areto be transported can be expressed as a cluster analysisproblem.

The aim is to partition the bales into k clusters in whicheach bale belongs to the cluster with the nearest mean,resulting in a partition of the bales on the field.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 8/30

Page 17: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

The identification of roadside storage sites where bales areto be transported can be expressed as a cluster analysisproblem.

The aim is to partition the bales into k clusters in whicheach bale belongs to the cluster with the nearest mean,resulting in a partition of the bales on the field.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 8/30

Page 18: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

If the location of the cluster centers were not constrained tolie on the roadside, then the k-means algorithm (Hartigan,1975), may be directly applied.

Even so, the problem is NP-hard.

The fact that the storage sites are constrained to lie on theroadside makes this part of the BCP an even greaterchallenge to solve.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 9/30

Page 19: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

If the location of the cluster centers were not constrained tolie on the roadside, then the k-means algorithm (Hartigan,1975), may be directly applied.

Even so, the problem is NP-hard.

The fact that the storage sites are constrained to lie on theroadside makes this part of the BCP an even greaterchallenge to solve.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 9/30

Page 20: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

If the location of the cluster centers were not constrained tolie on the roadside, then the k-means algorithm (Hartigan,1975), may be directly applied.

Even so, the problem is NP-hard.

The fact that the storage sites are constrained to lie on theroadside makes this part of the BCP an even greaterchallenge to solve.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 9/30

Page 21: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

Given a set of points X = (x1, x2, . . . , xn), where each pointis a d-dimensional real vector, k-means clustering aims topartition these n points into k ≤ n sets S = {S1,S2, . . . ,Sk}so as to minimize the within-cluster sum of squares.

In the BCP, each point xi represents a bale’s 2-dimensionalfield location coordinates.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 10/30

Page 22: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

Given a set of points X = (x1, x2, . . . , xn), where each pointis a d-dimensional real vector, k-means clustering aims topartition these n points into k ≤ n sets S = {S1,S2, . . . ,Sk}so as to minimize the within-cluster sum of squares.

In the BCP, each point xi represents a bale’s 2-dimensionalfield location coordinates.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 10/30

Page 23: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

We also have m compact sets in R2 denoted {T1, . . . ,Tm},such that the valid positions for the cluster centers are inT = T1 ∪ · · · ∪ Tm.

Define the auxiliary functions:

gj(x) = mint∈Tj||x − t||2, j = 1, . . . ,m

that calculate the minimum Euclidean distance between agiven point, x, and any point in the set Tj.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 11/30

Page 24: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of Bales

We also have m compact sets in R2 denoted {T1, . . . ,Tm},such that the valid positions for the cluster centers are inT = T1 ∪ · · · ∪ Tm.

Define the auxiliary functions:

gj(x) = mint∈Tj||x − t||2, j = 1, . . . ,m

that calculate the minimum Euclidean distance between agiven point, x, and any point in the set Tj.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 11/30

Page 25: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of BalesOptimization Problem

minimize(µ1,S1),...,(µk,Sk)

k∑i=1

∑x∈Si

||x − ui||2 (1a)

subject tom∏

j=1

gj(ui) = 0 for i = 1, . . . , k (1b)

S1 ∪ S2 ∪ · · · ∪ Sk = S (1c)

Si ∩ Sj = ∅ ∀i 6= j. (1d)

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 12/30

Page 26: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of BalesOptimization Algorithm

Step 1 Choose k random points from S to be the initial clustercenters, u = (u1, u2, . . . , uk). The relaxed solution of thek-means algorithm is a good initial starting point.

Step 2 For i = 1, . . . , k, assign points to clusters based on theirEuclidean distance to the cluster centers:

Si ={

x ∈ X : ||x − ui||2 < ||x − uj||2, j 6= i}.

Step 3 For i = 1, . . . , k, update the cluster centers by solving thefollowing minimization problem:

ui = arg minν

fi(ν) =∑x∈Si

||x − ν||2 + γ · gi(ν)

Step 4 Repeat Steps 2 and 3 until there is no significant change in

the clustering criteria,∑k

i=1 fi(ui).

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 13/30

Page 27: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of BalesExample of a constrained cluster analysis problem

(a) Road network and bales

(b) Solution

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 14/30

Page 28: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

This part of the BCP may be formulated as a graph theoryproblem.

For a given cluster, Sα, α = 1, . . . , k, let G = (Nα,Aα) be anundirected graph, where Nα is the set of nodes (bales) andAα is the set of edges.

Nα = {0, 1, . . . ,nα} is an index set for cluster Sα, containingnα bales and a roadside storage node, denoted by 0.

Aα = {(i, j) | i, j ∈ Nα; i < j} represents the set of(nα + 1)(nα + 2)/2 existing edges connecting the nα balesand the storage site.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 15/30

Page 29: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

This part of the BCP may be formulated as a graph theoryproblem.

For a given cluster, Sα, α = 1, . . . , k, let G = (Nα,Aα) be anundirected graph, where Nα is the set of nodes (bales) andAα is the set of edges.

Nα = {0, 1, . . . ,nα} is an index set for cluster Sα, containingnα bales and a roadside storage node, denoted by 0.

Aα = {(i, j) | i, j ∈ Nα; i < j} represents the set of(nα + 1)(nα + 2)/2 existing edges connecting the nα balesand the storage site.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 15/30

Page 30: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

This part of the BCP may be formulated as a graph theoryproblem.

For a given cluster, Sα, α = 1, . . . , k, let G = (Nα,Aα) be anundirected graph, where Nα is the set of nodes (bales) andAα is the set of edges.

Nα = {0, 1, . . . ,nα} is an index set for cluster Sα, containingnα bales and a roadside storage node, denoted by 0.

Aα = {(i, j) | i, j ∈ Nα; i < j} represents the set of(nα + 1)(nα + 2)/2 existing edges connecting the nα balesand the storage site.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 15/30

Page 31: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

This part of the BCP may be formulated as a graph theoryproblem.

For a given cluster, Sα, α = 1, . . . , k, let G = (Nα,Aα) be anundirected graph, where Nα is the set of nodes (bales) andAα is the set of edges.

Nα = {0, 1, . . . ,nα} is an index set for cluster Sα, containingnα bales and a roadside storage node, denoted by 0.

Aα = {(i, j) | i, j ∈ Nα; i < j} represents the set of(nα + 1)(nα + 2)/2 existing edges connecting the nα balesand the storage site.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 15/30

Page 32: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

The problem is to determine the set of routes that minimizethe total travel distance within each cluster identified by theCCA algorithm.

May be represented as a capacitated vehicle routingproblem (CVRP).

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 16/30

Page 33: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

The problem is to determine the set of routes that minimizethe total travel distance within each cluster identified by theCCA algorithm.

May be represented as a capacitated vehicle routingproblem (CVRP).

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 16/30

Page 34: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

A weight, qi, is assigned to each bale i, 1 ≤ i ≤ nα (q0 = 0).

Each edge has an associated cost, cij > 0, of sending avehicle from node i to node j.

The cij are assumed to be symmetric and proportional tothe Euclidean distance, dij, between any two nodes, thuscij = cji ∝ dij, i, j ∈ Nα.

The collection activities are to be implemented by a fleet ofv vehicles, v ≥ 1, with equal capacity,κ ≥ max{qi | 1 ≤ i ≤ nα}.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 17/30

Page 35: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

A weight, qi, is assigned to each bale i, 1 ≤ i ≤ nα (q0 = 0).

Each edge has an associated cost, cij > 0, of sending avehicle from node i to node j.

The cij are assumed to be symmetric and proportional tothe Euclidean distance, dij, between any two nodes, thuscij = cji ∝ dij, i, j ∈ Nα.

The collection activities are to be implemented by a fleet ofv vehicles, v ≥ 1, with equal capacity,κ ≥ max{qi | 1 ≤ i ≤ nα}.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 17/30

Page 36: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

A weight, qi, is assigned to each bale i, 1 ≤ i ≤ nα (q0 = 0).

Each edge has an associated cost, cij > 0, of sending avehicle from node i to node j.

The cij are assumed to be symmetric and proportional tothe Euclidean distance, dij, between any two nodes, thuscij = cji ∝ dij, i, j ∈ Nα.

The collection activities are to be implemented by a fleet ofv vehicles, v ≥ 1, with equal capacity,κ ≥ max{qi | 1 ≤ i ≤ nα}.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 17/30

Page 37: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

A weight, qi, is assigned to each bale i, 1 ≤ i ≤ nα (q0 = 0).

Each edge has an associated cost, cij > 0, of sending avehicle from node i to node j.

The cij are assumed to be symmetric and proportional tothe Euclidean distance, dij, between any two nodes, thuscij = cji ∝ dij, i, j ∈ Nα.

The collection activities are to be implemented by a fleet ofv vehicles, v ≥ 1, with equal capacity,κ ≥ max{qi | 1 ≤ i ≤ nα}.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 17/30

Page 38: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

The following additional constraints are associated with theproblem:

1) all routes begin and end at the roadside storage node

2) no two routes visit the same bale

3) all bales are visited exactly once

4) no vehicle can be loaded exceeding its maximum capacity

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 18/30

Page 39: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

The following additional constraints are associated with theproblem:

1) all routes begin and end at the roadside storage node

2) no two routes visit the same bale

3) all bales are visited exactly once

4) no vehicle can be loaded exceeding its maximum capacity

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 18/30

Page 40: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

The following additional constraints are associated with theproblem:

1) all routes begin and end at the roadside storage node

2) no two routes visit the same bale

3) all bales are visited exactly once

4) no vehicle can be loaded exceeding its maximum capacity

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 18/30

Page 41: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

The following additional constraints are associated with theproblem:

1) all routes begin and end at the roadside storage node

2) no two routes visit the same bale

3) all bales are visited exactly once

4) no vehicle can be loaded exceeding its maximum capacity

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 18/30

Page 42: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

The following additional constraints are associated with theproblem:

1) all routes begin and end at the roadside storage node

2) no two routes visit the same bale

3) all bales are visited exactly once

4) no vehicle can be loaded exceeding its maximum capacity

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 18/30

Page 43: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

Decision vector is x = (xijr), where i, j ∈ Nα, andr ∈ R = {1, 2, . . . , τ}

τ = dnα/κe is the number of routes needed in order to pickup all of the nα bales:

xijr =

{1 if route r contains edge (i, j)0 otherwise, (2)

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 19/30

Page 44: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem

Decision vector is x = (xijr), where i, j ∈ Nα, andr ∈ R = {1, 2, . . . , τ}

τ = dnα/κe is the number of routes needed in order to pickup all of the nα bales:

xijr =

{1 if route r contains edge (i, j)0 otherwise, (2)

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 19/30

Page 45: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationOptimization Problem – Mathematical Representation

minimizeu

t∑r∈R

∑(i,j)∈Aα

cijxijr (3a)

subject to∑r∈R

∑j∈Nα

xijr = 1 ∀i ∈ Nα (3b)

∑i∈Nα

∑j∈Nα

xijr × qj ≤ κ ∀r ∈ R (3c)

∑j∈Nα

x0jr = 1 ∀r ∈ R (3d)

∑i∈Nα

xijr =∑i∈Nα

xjir ∀j ∈ Nα, r ∈ R (3e)

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 20/30

Page 46: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part II: Within Cluster Route OptimizationMin-min min-max route optimization algorithm (MMROA)

Step 1 Set k = min(κ, |Nα| − 1), where κ is the capacity of the wagon . Compute the set of k− 1 nearestneighbors for each bale b ∈ Nα. Denote the set of k − 1 nearest neighbors of bale b as Qb.

Step 2 Define the function

M(x, Sα) =

{1 if x ∈ Sα0 otherwise

For each bale, b ∈ Nα , computemb =

∑i∈Nα

M(b,Qi)

Let b∗1 = arg minb{mb : b ∈ Nα}

and b∗2 = arg maxb{mb : b ∈ Nα}.

Randomly choose b∗1 or b∗2 with equal probability. Denote the chosen bale as b∗.

Step 3 Among the setsQ = {Qb | b∗ ∈ Qb, b ∈ Nα},

which contain b∗ select the one that has the shortest cycle, including the roadside storage node, anddenote this set as Q∗.

Step 4 Update the set Nα by:Nα = Nα \ Q∗.

If Nα 6= ∅, then go to Step 1.

Min-min min-max route optimization algorithm (MMROA)IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 21/30

Page 47: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Part I: Constrained Cluster Analysis of BalesExample Problem

0

5

10

15

20

0 5 10 15width (m)

leng

th (

m)

Obtained tours by the MMROA for a problem previously proposed byGrisso et al. (2007). MMROA yields an additional 6.8% reduction in thetotal travel distance.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 22/30

Page 48: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemDescription

We consider a study area of size 4800 m× 4800 m that iscomposed of 9 equal-sized sections of 256 ha each.

Bales are spatially distributed across the field according toa Poisson process and assuming a uniform yield.

Four different wagon capacities are considered (8, 15, 30,and 70).

Based on an analysis of the within-cluster sum of squares,the bales have been divided into five clusters.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 23/30

Page 49: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemDescription

We consider a study area of size 4800 m× 4800 m that iscomposed of 9 equal-sized sections of 256 ha each.

Bales are spatially distributed across the field according toa Poisson process and assuming a uniform yield.

Four different wagon capacities are considered (8, 15, 30,and 70).

Based on an analysis of the within-cluster sum of squares,the bales have been divided into five clusters.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 23/30

Page 50: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemDescription

We consider a study area of size 4800 m× 4800 m that iscomposed of 9 equal-sized sections of 256 ha each.

Bales are spatially distributed across the field according toa Poisson process and assuming a uniform yield.

Four different wagon capacities are considered (8, 15, 30,and 70).

Based on an analysis of the within-cluster sum of squares,the bales have been divided into five clusters.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 23/30

Page 51: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemDescription

We consider a study area of size 4800 m× 4800 m that iscomposed of 9 equal-sized sections of 256 ha each.

Bales are spatially distributed across the field according toa Poisson process and assuming a uniform yield.

Four different wagon capacities are considered (8, 15, 30,and 70).

Based on an analysis of the within-cluster sum of squares,the bales have been divided into five clusters.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 23/30

Page 52: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemDescription

0

800

1600

2400

3200

4000

4800

0 800 1600 2400 3200 4000 4800width (m)

leng

th (

m)

Distribution of wheat bales in a study area composed of 9 sections.The sections are separated by access roads represented as horizontaland vertical lines.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 24/30

Page 53: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemConstrained Cluster Analysis

0

800

1600

2400

3200

4000

4800

0 800 1600 2400 3200 4000 4800width (m)

leng

th (

m) Cluster

12345

Bale clusters and roadside storage sites identified by the CCA method.IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 25/30

Page 54: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemMMROA solutions for wagon capacities of (a) 8 and (b) 15 bales

0

800

1600

2400

3200

4000

4800

0 800 1600 2400 3200 4000 4800width (m)

leng

th (

m) Cluster

12345

(a) Wagon capacity of 8 bales.

0

800

1600

2400

3200

4000

4800

0 800 1600 2400 3200 4000 4800width (m)

leng

th (

m) Cluster

12345

(b) Wagon capacity of 15 bales.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 26/30

Page 55: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemMMROA solutions for wagon capacities of (a) 35 and (b) 70 bales

0

800

1600

2400

3200

4000

4800

0 800 1600 2400 3200 4000 4800width (m)

leng

th (

m) Cluster

12345

(c) Wagon capacity of 35 bales.

0

800

1600

2400

3200

4000

4800

0 800 1600 2400 3200 4000 4800width (m)

leng

th (

m) Cluster

12345

(d) Wagon capacity of 70 bales.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 27/30

Page 56: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemSummary of Results

MMROA Solutions

Wagon Capacity (bales) Number of Routes Distance (m)

8 229 525,69215 124 345,75535 55 225,20670 30 184,546

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 28/30

Page 57: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemConclusion

The potential benefits of our approach to solving the BCPare its scalability and ease of implementation.

Developed a constrained k-means algorithm and nearestneighbor approach to the BCP, which minimizes traveldistance and hence fuel consumption.

Able to tackle large problems and can be easilyincorporated into existing bale collection operations.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 29/30

Page 58: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemConclusion

The potential benefits of our approach to solving the BCPare its scalability and ease of implementation.

Developed a constrained k-means algorithm and nearestneighbor approach to the BCP, which minimizes traveldistance and hence fuel consumption.

Able to tackle large problems and can be easilyincorporated into existing bale collection operations.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 29/30

Page 59: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

Study ProblemConclusion

The potential benefits of our approach to solving the BCPare its scalability and ease of implementation.

Developed a constrained k-means algorithm and nearestneighbor approach to the BCP, which minimizes traveldistance and hence fuel consumption.

Able to tackle large problems and can be easilyincorporated into existing bale collection operations.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 29/30

Page 60: A Constrained K-Means and Nearest Neighbor Approach for Route Optimization in the Bale ... · 2021. 2. 22. · A Constrained K-Means and Nearest Neighbor Approach for Route Optimization

References

C. Amiama, J. Bueno, C. J. Alvarez, and J. M. Pereira. Design and field test of an automatic data acquisition system in aself-propelled forage harvester. Computers and Electronics in Agriculture, 61(2):192–200, 2008.

R. D. Grisso, J. S. Cundiff, and D. H. Vaughan. Investigating Machinery Management Parameters with Computer Tools. ASABEConf, Paper 071030, 2007.

J. A. Hartigan. Clustering algorithms. John Wiley & Sons, New York, 1975.

K. L. Milkman, D. Chugh, and M. H. Bazerman. How Can Decision Making Be Improved? Perspectives on PsychologicalScience, 4(4):379–383, 2009.

IFAC 2017 Zamar D, Gopaluni B, and Sokhansanj S 30/30