inexplicable error 8

Hello,

GAMS is telling me I have too many open parenthesis, but I’ve counted, I’ve changed the type () {} , and I can’t see what I’m doing incorrectly. The lst file shows this:

43 DEM_CONST(t)…
44 -DEMAND(t)
45 =E=
46 -X(t)
47 - V(t)
48 - H(t - 1)$(ORD(t) =G= 2)
**** 8,409 49 + H(t)(ORD(t) =L= 2)
50 ;

I’d like nothing more than for someone to point out an obvious flaw in my code, but if anyone has any ideas whatsoever I’ll take anything. Thanks for the help!


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/d/optout.

Ms. Jamison,

It’s your lucky day: there is an obvious flaw in your code. You are mixing up the roles of =G= and >=. For example, in this:

dem_const(t)… h(t) + h(t-1)$[ord(t) >= 2) =G= myrhs(t);

the =G= occurs just once and indicates the equation if of the “greater-than-or-equal-to” variety. The =G= is declarative, not an operator. The comparison operator >= is part of an expression evaluated to build the equation, and you could have many such operators in your equation.

-Steve

On Tue, Jun 2, 2015 at 12:22 PM, M Jamison wrote:

Hello,

GAMS is telling me I have too many open parenthesis, but I’ve counted, I’ve changed the type () {} , and I can’t see what I’m doing incorrectly. The lst file shows this:

43 DEM_CONST(t)…
44 -DEMAND(t)
45 =E=
46 -X(t)
47 - V(t)
48 - H(t - 1)$(ORD(t) =G= 2)
**** 8,409 49 + H(t)(ORD(t) =L= 2)
50 ;

I’d like nothing more than for someone to point out an obvious flaw in my code, but if anyone has any ideas whatsoever I’ll take anything. Thanks for the help!


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/d/optout.



\

Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdirkse@gams.com
http://www.gams.com

You are marvelous, thank you!

On Tuesday, June 2, 2015 at 9:26:25 AM UTC-7, M Jamison wrote:

Hello,

GAMS is telling me I have too many open parenthesis, but I’ve counted, I’ve changed the type () {} , and I can’t see what I’m doing incorrectly. The lst file shows this:

43 DEM_CONST(t)…
44 -DEMAND(t)
45 =E=
46 -X(t)
47 - V(t)
48 - H(t - 1)$(ORD(t) =G= 2)
**** 8,409 49 + H(t)(ORD(t) =L= 2)
50 ;

I’d like nothing more than for someone to point out an obvious flaw in my code, but if anyone has any ideas whatsoever I’ll take anything. Thanks for the help!


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/d/optout.