I am trying to solve a model on gams. I am comparing the lengths of each possible pieces and if it is greater than 1, gams can add this piece to the model. Otherwise, gams should not add this piece to the model and it should move on another point to calculate length of the another possible piece.
any two points can make a piece.
I basically added a equation.
i shows the beginning point
j shows the final point of the piece
l(i,j) shows the length of that piece.
Code: Select all
eq1(i,j)..l(i,j)=g=1;
When I check the .lst file;
e.g. point 19 and point 13;
eq1(19,13).. 0 =G= 0.695861873485089 ; (LHS = 0, INFES = 0.695861873485089 ****)
It gives me 0.695861873485089. Also according to calculations the length of the piece between 19-13 is 0,304138. LHS must be 0,304138 and RHS must be 1, but it gives me (1-0,304138) instead of 1.
Could you please help me how can I solve this problem?