Page 1 of 1

Error 668 , 37 , 409

Posted: Wed Nov 20, 2019 5:21 pm
by Laurus
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:

Re: Error 668 , 37 , 409

Posted: Thu Nov 21, 2019 3:30 pm
by achristensen
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

Re: Error 668 , 37 , 409

Posted: Thu Nov 21, 2019 6:43 pm
by Laurus
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.