Page 1 of 1

Error 66

Posted: Tue Jan 18, 2022 1:44 am
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 162 times
Truby perfect competition.log
(1.8 KiB) Downloaded 162 times
Truby perfect competition.gms
(1.03 KiB) Downloaded 169 times

Re: Error 66

Posted: Tue Jan 18, 2022 9:30 am
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!

Re: Error 66

Posted: Wed Jan 19, 2022 3:31 pm
by chessosskar
Hi!
yes that works a treat. ill know to check the .lst next time. thanks a lot