Solutions for Errors, help, anyone? (Includes the whole model)

What might be the reasons of these errors;

“The column section in the previous table is missing” → Although I haven’t seen any problem with the syntax of the tables, this error keeps coming up?
“Solve keys expected - USING MAX/MIN SCENARIO” → Meaningless shouting out error, I do have a min scenario right at the end of my model?
“Unknown or missing processor (LP,MIP,…)” → Why? I do have this processor right at the end of my model?
“Unrecognizable item - skip to find a new statement” → Shows this error only for the upper and lower bound setting lines which are nearly at the end of the model. The right way to set lower and upper boundaries for an equation might not be the one in the model. But then, what is the right way to do this?

The Model:


Sets
V voyages /WAS/
S chartable ships /A,B,C,D,E/
K speed types of each ship /full,eco,least/
P fuel supply ports /RUS,TR/;

Parameters
capac(s) capacity of each ship
/A 15
B 15
C 15
D 15
E 15/
hicost(s) hiring costs of ships
/A 6500
B 8250
C 7500
D 6550
E 6400/
fucost(p) fuel costs of ports
/RUS 605
TR 700/
mincap(v) min capacity needed for voyages/WAS 14/
totdist(v) tot distance of voyages /WAS 7500/
maxday(v) max day of the trip /WAS 90000/
minday(v) min day of the trip /WAS 1/
nship(v) num of ships needed for voyages /WAS 1/;

Table fucons(s,k) fuel consumptions at speeds
/
A B C D E
full 35 51 34 33 36
eco 29 40 29 30 28
least 26 35 999 999 25/;

Table speed(s,k) speeds of ships
/
A B C D E
full 15 15 15 16 15
eco 13 13 13 13 12
least 11 11 1 1 11/;

Binary variables H(v,s,k) if hired, F(v,p) port selection;
Variable z;
Equations obj,c1(v),c2(v,s),c3(v),c4(v,s);
obj… z =e= sum((v,s,k),(totdist(v) * H(v,s,k) * (hicost(s) + sum(p,(F(v,p) * fucost(p) * fucons(s,k))))) / (speed(s,k) * 24) );
c1(v)… sum(p,F(v,p)) =g= 1;
c2(v,s)… sum(k,H(v,s,k)) =l= 1;
c3(v)… sum((s,k),H(v,s,k)) =g= nship(v);
c4(v,s)… mincap(v) =l= sum(k,h(v,s,k)*capac(s));

( sum(k, (H(v,s,k) * totdist(v)) / (speed(s,k)*24) ) ).lo(v,s) = minday(v);
( sum(k, (H(v,s,k) * totdist(v)) / (speed(s,k)*24) ) ).up(v,s) = maxday(v);

Model Problem /all/;
Solve Problem using LIP minimizing z;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Yagmur,

I highly recommend you to go through the McCarl guide first of all, because all the problems you have are very simple to solve.

Attached please find an example code.


Cheers,
Pedro




On Wed, Mar 25, 2015 at 11:22 PM, YaÄŸmur AytoÄŸan wrote:

What might be the reasons of these errors;

“The column section in the previous table is missing” → Although I haven’t seen any problem with the syntax of the tables, this error keeps coming up?
“Solve keys expected - USING MAX/MIN SCENARIO” → Meaningless shouting out error, I do have a min scenario right at the end of my model?
“Unknown or missing processor (LP,MIP,…)” → Why? I do have this processor right at the end of my model?
“Unrecognizable item - skip to find a new statement” → Shows this error only for the upper and lower bound setting lines which are nearly at the end of the model. The right way to set lower and upper boundaries for an equation might not be the one in the model. But then, what is the right way to do this?

The Model:


Sets
V voyages /WAS/
S chartable ships /A,B,C,D,E/
K speed types of each ship /full,eco,least/
P fuel supply ports /RUS,TR/;

Parameters
capac(s) capacity of each ship
/A 15
B 15
C 15
D 15
E 15/
hicost(s) hiring costs of ships
/A 6500
B 8250
C 7500
D 6550
E 6400/
fucost(p) fuel costs of ports
/RUS 605
TR 700/
mincap(v) min capacity needed for voyages/WAS 14/
totdist(v) tot distance of voyages /WAS 7500/
maxday(v) max day of the trip /WAS 90000/
minday(v) min day of the trip /WAS 1/
nship(v) num of ships needed for voyages /WAS 1/;

Table fucons(s,k) fuel consumptions at speeds
/
A B C D E
full 35 51 34 33 36
eco 29 40 29 30 28
least 26 35 999 999 25/;

Table speed(s,k) speeds of ships
/
A B C D E
full 15 15 15 16 15
eco 13 13 13 13 12
least 11 11 1 1 11/;

Binary variables H(v,s,k) if hired, F(v,p) port selection;
Variable z;
Equations obj,c1(v),c2(v,s),c3(v),c4(v,s);
obj… z =e= sum((v,s,k),(totdist(v) * H(v,s,k) * (hicost(s) + sum(p,(F(v,p) * fucost(p) * fucons(s,k))))) / (speed(s,k) * 24) );
c1(v)… sum(p,F(v,p)) =g= 1;
c2(v,s)… sum(k,H(v,s,k)) =l= 1;
c3(v)… sum((s,k),H(v,s,k)) =g= nship(v);
c4(v,s)… mincap(v) =l= sum(k,h(v,s,k)*capac(s));

( sum(k, (H(v,s,k) * totdist(v)) / (speed(s,k)*24) ) ).lo(v,s) = minday(v);
( sum(k, (H(v,s,k) * totdist(v)) / (speed(s,k)*24) ) ).up(v,s) = maxday(v);

Model Problem /all/;
Solve Problem using LIP minimizing z;


Untitled_1.gms (2.44 KB)