Milk Collection: How to Route and Assign Milk Collection Lorries to Farms

Input Data

(View the complete code for this example.)

The following data set and macro variables contain the input data that are used in this example:

data farm_data;
   farm = _N_;
   input east north frequency requirement;
   datalines;
 0  0 2 0
-3  3 2 5
 1 11 2 4
 4  7 2 3
-5  9 2 6
-5 -2 2 7
-4 -7 2 3
 6  0 2 4
 3 -6 2 6
-1 -3 2 5
 0 -6 1 4
 6  4 1 7
 2  5 1 3
-2  8 1 4
 6 10 1 5
 1  8 1 6
-3  1 1 8
-6  5 1 5
 2  9 1 7
-6 -5 1 6
 5 -4 1 6
;

%let distance_scale = 10;
%let num_days = 2;
%let capacity = 80;
%let depot = 1;