Page 1 of 1

Wrong calculation

Posted: Sat Apr 03, 2021 6:15 pm
by seydaseyda
Hi everyone,

I have a problem about calculation which I aimed to calculate on Gams.

Here is my code about this part.

Code: Select all

eq1(i)..u(i)=g=1;
eq2(i)..u(i)+m(i)*(1-x(i))=g=sum(j$(ord(i)<>ord(j)),(power(h(i,j),2)*x(j))); 
I defined the h(i,j) before this code. m(i) is also a big number to ensure u(i) is depends on x(i). GAMS should be able to calculate the above code. but it gives me u(i)=1 for every i.


How can I ensure the GAMS can calculate the real values for u(i)? (I can not add u(i) as a variable, because the model must be stay as linear.)

Re: Wrong calculation

Posted: Sun Apr 04, 2021 3:37 pm
by seydaseyda
Does anyone have an idea?

-up-