The Model

 

SETS

LOCATIONS

ARCS

ALIAS(LOCATION,I,J)

 

DATA

DEMAND(I)

TABLE COST(I,J) 

 

 

SCALARS

FIXED

ORDER

 

VARIABLES

X(I,I)

Y(I,I)

Z

 

EQUATIONS

OBJ total time/cost to perform delivery

FLOW represents the flow conservation conditions. All customers' orders are fulfilled

MEET ensures only one driver will deliver to one customer

LEAVE ensures only one driver can leave a customer's location

BACK ensures the driver's return does not affect the delivery time

RESTRICT force variable to 0

OBJ: In the objective function, we are trying to minimize the costs and time to fulfill all customer orders.

Cost of travelling from node I to J. Each time a delivery vehicle is introduced a fixed cost is incurred.

 

FLOW: These are the flow conservation conditions.


1) Supply of Pizza’s and demand of each customer.
2) Sum of the amount shipped in to node I.
3) Subtract the amount shipped out of node I

 

MEET: this ensures that only one delivery vehicle delivers to the customer. For example, if a customer requires 2 pizzas, then one vehicle will deliver to the customer, as opposed to 2 vehicles delivering 1 pizza each to the customer.

 

LEAVE: this constraint supplements the MEET constraint. Since only one delivery vehicle can deliver to a customer, than this constraint ensures only one delivery vehicle can leave the customer’s location.

 

BACK: since we assumed that no driver returns to Pedro’s Pizza in order to complete his delivery, this constraint ensures this.

 

RESTRICT: this constraint ensures that if the arc is not used (i.e. X(I,J) = 0), then the delivery vehicle cannot carry any pizzas on this path (i.e. no amount can be shipped along the arc)

Y(I,J) <= ORDER*X(I,J)

 

To view the GAMS program that was formulated in the process of solving the problem, click here.


Click here to continue...