Simple problem: Error 149 on constraints

Reply-to: gamsworld@googlegroups.com

Hello :slight_smile:

hope somebody can help me with my problem - any tiny help is highly appreciated! For days I have been trying to fix this, but I am not able to find a solution for it on my own (using the linked documents).
I am trying to optimize a scenario, where 3 suppliers are delivering 2 commodities to 3 markets. The costs for purchase (material prices + transportation) are subject to minimization. These are constrained by the capacity of the supplier and the demand of the markets.


I keep receiving an error message for the last 2 lines, where I want to define the constraints for the objective functions. According to the log file, there are no errors except for those 2 lines (Error 141 I will take care of afterwards).

54 cost … z =e= sum((i,j,k,t), f(i,j)*x(i,j,k,t)) + sum((i,j,k,t),x(i,j,k,t) *c(i,k,j));

55 supply(i) … sum((j,k,t), x(i,j,k,t)) =l= b(i,k,t) ;

**** $149,149

56 demand(j) … sum((i,k,t), x(i,j,k,t)) =g= a(j,t,k) ;

**** $149,149

57 Model Material_flow /all/ ;

58 Solve Material_flow using lp minimizing z ;

**** $257

59 Display x.l, x.m ;

**** $141

GAMS 24.1.3 r41464 Released Jul 26, 2013 WEX-VS8 x86/MS Windows 12/27/13 21:24:55 Page 2

G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m

Error Messages



141 Symbol neither initialized nor assigned

A wild shot: You may have spurious commas in the explanatory

text of a declaration. Check symbol reference list.

149 Uncontrolled set entered as constant

257 Solve statement not checked because of previous errors

Many thanks for your feedback in advance!

Kind regards,
Alex


Input.gms (2.82 KB)

Dear Alex,

In lines 55 and 56, the equations are defined only over sets i and j respectively, but in the expressions for those equations, if you see the left hand of the inequalities, there are parameters defined over three sets (i,k,t) and (j,t,k), so you need to define the equations’ names over those sets as well. In other words,

supply(i,k,t)
demand(j,t,k)


Cheers,
Pedro


On Fri, Dec 27, 2013 at 8:39 PM, aLfu wrote:

Hello :slight_smile:

hope somebody can help me with my problem - any tiny help is highly appreciated! For days I have been trying to fix this, but I am not able to find a solution for it on my own (using the linked documents).
I am trying to optimize a scenario, where 3 suppliers are delivering 2 commodities to 3 markets. The costs for purchase (material prices + transportation) are subject to minimization. These are constrained by the capacity of the supplier and the demand of the markets.


I keep receiving an error message for the last 2 lines, where I want to define the constraints for the objective functions. According to the log file, there are no errors except for those 2 lines (Error 141 I will take care of afterwards).

54 cost … z =e= sum((i,j,k,t), f(i,j)*x(i,j,k,t)) + sum((i,j,k,t),x(i,j,k,t) *c(i,k,j));

55 supply(i) … sum((j,k,t), x(i,j,k,t)) =l= b(i,k,t) ;

**** $149,149

56 demand(j) … sum((i,k,t), x(i,j,k,t)) =g= a(j,t,k) ;

**** $149,149

57 Model Material_flow /all/ ;

58 Solve Material_flow using lp minimizing z ;

**** $257

59 Display x.l, x.m ;

**** $141

GAMS 24.1.3 r41464 Released Jul 26, 2013 WEX-VS8 x86/MS Windows 12/27/13 21:24:55 Page 2

G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m

Error Messages



141 Symbol neither initialized nor assigned

A wild shot: You may have spurious commas in the explanatory

text of a declaration. Check symbol reference list.

149 Uncontrolled set entered as constant

257 Solve statement not checked because of previous errors

Many thanks for your feedback in advance!

Kind regards,
Alex


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/groups/opt_out.



\

PEDRO JAVIER RAMÍREZ TORREALBA
Ingeniero Civil Eléctrico PUC
MSc en Ingeniería Eléctrica PUC
Londres, REINO UNIDO

Celular: +44-(0)75-8069-3119


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/groups/opt_out.