I have been trying to write a model written originally in Mathematica, and I find that GAMS gives less precise solutions. The code below is a simplified version of a portion of the model. I am now trying to re-create my base, and it gives me a solutions that are a bit off: GAMS finds pc=2.151. It should be 3.61. 3.61 is the true price from our base data, and Mathematica is able to find this from the equations below. Is there a fix for this? Or an explanation of what is GAMS doing relative to Mathematica; so that I can explain the difference?
The difference in price is significant enough that my Prof. (who does not use GAMS), feels Mathematica is then a better solver...
Any help appreciated!
Wajiha
Code: Select all
Positive Variables qcdx, qcdd, qcst, pc;
EQUATION cornexpdemand ;
cornexpdemand .. qcdx =e= 4123029.1453/(pc**(0.5)) ;
EQUATION cornfooddemand ;
cornfooddemand .. qcdd =e= 10259876.724/(pc**(0.1));
EQUATION cornsupply ;
cornsupply .. qcst =e= (9552850.67262715*(pc**(0.4)))/(1.14**(0.4)) ;
EQUATION cornmkteqm ;
cornmkteqm .. qcdx + qcdd - qcst =e= 0 ;
Model corn2 /all/ ;
pc.LO = 1.0E-6 ;
pc.L = 1.0 ;
SOLVE corn2 using CNS ;