problem in gams

 0 sets i index for retailer /r1r7/ k index for depot /f1f3/ ; alias (i,j) alias (k,m) 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)c(i,j))+ sum(k,FD(k)CD(k))+ sum((i,k),FVx(k,i)) ; con2(i) .. sum(j,x(i,j)) =e=1; con3(i) .. sum(j,x(j,i))=e= sum(j,x(i,j)) ; con4(i) .. sum(k,z(i,k))=e=1 ; con5(i,k) .. x(i,k)=l=z(i,k); con6(i,k) .. x(k,i)=l=z(i,k); con7(i,j,k) .. x(i,j)+z(i,k)+ sum(m,z(j,m))=l= 2; con8(k) .. sum(i,d(i)z(i,k))=l= CD(k)y(k); con9(k) .. sum(i,p(i)z(i,k))=l= CD(k)y(k); con10(i) .. sum(j,u(j,i))- sum(j,u(i,j))=e=d(i) ; con11(i) .. sum(j,v(j,i))- sum(j,v(i,j))=e=p(i) ; con12(i,j) .. u(i,j)+v(i,j)=l=CVx(i,j) ; con13(k) .. sum(j,u(k,j))=e= sum(j,z(j,k)d(j)); con14(k) .. sum(j,u(j,k))=e=0; con15(k) .. sum(j,v(j,k))=e= sum(j,z(j,k)p(j)); con16(k) .. sum(j,v(k,j))=e=0; con17(i,j) .. u(i,j)=l=(CV-d(i))x(i,j) ; con18(i,j) .. v(i,j)=l=(CV-p(j))x(i,j) ; con19(i,j) .. u(i,j)=g=d(j)x(i,j) ; con20(i,j) .. v(i,j)=g=p(i)x(i,j) ; MODEL LRPTW / ALL / ; SOLVE LRPTW USING BIP MINIMIZING w ; DISPLAY w.l ; This question is marked "community wiki". asked 15 Dec '16, 10:00 eli 11●2 accept rate: 0%
Be the first one to answer this question!
 toggle preview community wiki

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags:

×51
×3

Asked: 15 Dec '16, 10:00

Seen: 1,298 times

Last updated: 15 Dec '16, 10:00

Related questions

OR-Exchange! Your site for questions, answers, and announcements about operations research.