Error 668 , 37 , 409 Topic is solved

Problems with modeling
Post Reply
Laurus
User
User
Posts: 8
Joined: 7 months ago

Error 668 , 37 , 409

Post by Laurus » 7 months ago

Hello, im getting a few errors in my code (which is interfaced with Matlab) and I'm unable to solve them.

Code: Select all

26  $if exists $ include matdata.gms
****            $668
1 - Can't understand this error and cant find information about it.

Code: Select all

  58  PiCalc(b,t)..                    Pi(b,t) =e= P(b,t) + c(b,t) - d(b,t);
****                                     $37,409

 37  '=l=' or '=e=' or '=g=' operator expected
2 - I dont understand whats the problem here as I clearly use a '=e=' operator.

Code: Select all

  59  P_linhaCalc(l,t)..               P_linha(l,t) =e= sum(b, A(l,b)*Pi(b,t));
****                                                                    $8,409
 8  ')' expected
 409  Unrecognizable item - skip to find a new statement
       looking for a ';' or a key word to get started again
3 - Again, I dont understand the missing ')' when It's present.

Any feedback is appreciated.

Full code is bellow:
Attachments
opt2.gms
(1.66 KiB) Downloaded 21 times
Last edited by Laurus 7 months ago, edited 1 time in total.

User avatar
achristensen
User
User
Posts: 14
Joined: 7 months ago

Re: Error 668 , 37 , 409

Post by achristensen » 7 months ago

just a couple typos...
you have

Code: Select all

$if exists $ include matdata.gms
it should be

Code: Select all

$if exist matdata.gms $include matdata.gms
does that fix everything?

--adam

Laurus
User
User
Posts: 8
Joined: 7 months ago

Re: Error 668 , 37 , 409

Post by Laurus » 7 months ago

Thank you,

The other errors were because I was using "pi" as a variable name when apparently there is a function of GAMS with that same name.

Post Reply