sets i index for retailer /r1 parameters FD(k) 'fixed cost of each depot' /f1 1000,f2 1000,f3 1000/ CD(k) 'capacity of each depot' /f1 140,f2 140,f3 140/ CV 'capacity of vehicle' /100/ FV 'fixed cost of vehicle' /150/ h(i) 'demand of each retailer' /r1 30,r2 25,r3 13,r4 19,r5 18,r6 14,r7 13/ d(i) 'delivery demand to each customer' /r1 70,r2 10,r3 160,r4 190,r5 15,r6 30,r7 185/ p(i) 'pickup demand from each customer' /r1 20,r2 5,r3 30,r4 10,r5 10,r6 15,r7 15/ ; table c(i,j) 'transportation cost' r1 r2 r3 r4 r5 r6 r7 r1 8 9 2 1 8 4 6 r2 1 4 4 2 0 9 3 r3 2 1 5 3 9 5 3 r4 1 9 2 4 7 5 9 r5 2 9 6 5 4 2 0 r6 4 4 7 0 5 4 8 r7 3 1 2 2 2 6 9 ; variable w objectivefunction y(k) indicator for open depot x(i,j) indicator for travelling from i to j z(i,k) indicator for assignment customer to depot u(i,j) demand to be delivered to customers routed after node i and transported in arc v(i,j) picked-up demand of customers routed up to node i and transported in arc ; binary variable y,x,z; positive variable w,u,v; equation objectivefunction con2(i) con3(i) con4(i) con5(i,j) con6(k) con7(k) con8(i,j) con9(i,j) con10(k) con11(i) con12(i,j) con13(i,k) con14(i,k) con15(i,j,k) con16(i,j) ; objectivefunction .. w =e= sum((i,j),x(i,j) MODEL LRPTW / ALL / ; SOLVE LRPTW USING BIP MINIMIZING w ; DISPLAY w.l ;
This question is marked "community wiki".
asked
eli |