multi item inventory routing problem in gams
Posted: Thu Nov 08, 2018 3:36 pm
Hi,
I had to solve a demo problem GAMS to use in my MS thesis. Since I did not know GAMS well, I encountered some problems / errors. I was gonna ask you to help me with this. First I have written the GAMS problem in order to be understandable in ANNEX 1 and the mathematical model is given in ANNEX 2. In my Gams model I have some letters that are different from the mathematical model. These are;
• Since i index is defined in GAMS, variable I (i, m, k) is entered as F (i, m, k). (In constraints 2,3 and 4). Because the model perceived the big I as a small i.
• Similarly, I defined Q (k) as O (k). (In constraint 8)
• Finally I defined the parameter C (i) as U (i). (In constraint 5,6 and 7)
I will have some questions within this information.
1) For example, in constraint 9, i <j in the first total, but in the second total j <i. How do I get this into GAMS?
2) If we look at constraints 4 and 5, should be in constraint 4 i ∈ V (V=0,1,2,…,n); in constraint 5 i ∈ V’ ( V’=1,2,…,n). How do I get this into GAMS?
3) in constraint 12 is not a binary variable. How will this constraint be defined in GAMS?
4) Finally, after entering the model I entered GAMS gave some errors that I could not fix. I'd appreciate it if you could help solve these problems.
Thank you.
ANNEX 1 : https://drive.google.com/file/d/1ZiE-dg ... sp=sharing
ANNEX 2 : https://drive.google.com/file/d/1FgBRDu ... sp=sharing
I had to solve a demo problem GAMS to use in my MS thesis. Since I did not know GAMS well, I encountered some problems / errors. I was gonna ask you to help me with this. First I have written the GAMS problem in order to be understandable in ANNEX 1 and the mathematical model is given in ANNEX 2. In my Gams model I have some letters that are different from the mathematical model. These are;
• Since i index is defined in GAMS, variable I (i, m, k) is entered as F (i, m, k). (In constraints 2,3 and 4). Because the model perceived the big I as a small i.
• Similarly, I defined Q (k) as O (k). (In constraint 8)
• Finally I defined the parameter C (i) as U (i). (In constraint 5,6 and 7)
I will have some questions within this information.
1) For example, in constraint 9, i <j in the first total, but in the second total j <i. How do I get this into GAMS?
2) If we look at constraints 4 and 5, should be in constraint 4 i ∈ V (V=0,1,2,…,n); in constraint 5 i ∈ V’ ( V’=1,2,…,n). How do I get this into GAMS?
3) in constraint 12 is not a binary variable. How will this constraint be defined in GAMS?
4) Finally, after entering the model I entered GAMS gave some errors that I could not fix. I'd appreciate it if you could help solve these problems.
Thank you.
ANNEX 1 : https://drive.google.com/file/d/1ZiE-dg ... sp=sharing
ANNEX 2 : https://drive.google.com/file/d/1FgBRDu ... sp=sharing