Error 66

Problems with syntax of GAMS
Post Reply
chessosskar
User
User
Posts: 12
Joined: 2 years ago

Error 66

Post by chessosskar »

Hi, im trying to solve a basic profit maximizing problem of a coal miner who has two mines and needs to choose how much to export and to where..


the whole code runs fine but in the end i get a solve error:
66 The symbol shown has not been defined or assigned
**** A wild shot: You may have spurious commas in the explanatory
**** text of a declaration. Check symbol reference list.
**** 256 Error(s) in analyzing solve statement.

yet in my view, i have assigned it, so its a strange error.
If someone could take a look at it and tell me what I'm doing wrong that would be greatly appreciated, sorry for not being able to post a more concise question.
Truby perfect competition.log
(1.8 KiB) Downloaded 149 times
Truby perfect competition.log
(1.8 KiB) Downloaded 149 times
Truby perfect competition.gms
(1.03 KiB) Downloaded 150 times
Fred
Posts: 372
Joined: 7 years ago

Re: Error 66

Post by Fred »

Hi,

The lst file provides more details:

Code: Select all

  39  solve resalloc using nlp maximizing totalprof;
****                                               $66,256
****  66  The symbol shown has not been defined or assigned
****         A wild shot: You may have spurious commas in the explanatory
****         text of a declaration. Check symbol reference list.
**** 256  Error(s) in analyzing solve statement.
**** The following NLP errors were detected in model resalloc:
****  66 equation Cap.. symbol "CAPm" has no values assigned
You declared

Code: Select all

scalar CAPm  30;
So the 30 is explanatory text. To initialize the scalar with a value of 30 use

Code: Select all

scalar CAPm  / 30 /;

I hope this helps!
chessosskar
User
User
Posts: 12
Joined: 2 years ago

Re: Error 66

Post by chessosskar »

Hi!
yes that works a treat. ill know to check the .lst next time. thanks a lot
Post Reply