Your mail had to forwarded manually because you are not subscribed to the GLPK 
help list, see
https://lists.gnu.org/mailman/listinfo/help-glpk

Your constraint MH1_MustHave has multiple problems:

In your constraint you use an index "l" that is not defined in the domain of 
your constraint {y in YEAR, t in TECHNOLOGY, r in REGION}. GLPK does not know 
what l is meant to be. Therefore you get the error observed.

GLPK is a linear solver. "If" is not a linear term. You cannot use "If" in a 
constraint.

Best regards

Heinrich Schuchardt

http://www.xypron.de


> Gesendet: Donnerstag, 11. Juli 2013 um 22:56 Uhr
> Von: "Andrew Makhorin" <[email protected]>
> An: [email protected]
> Betreff: [Help-glpk] [Fwd:  not defined error]
>
> -------- Forwarded Message --------
> To: [email protected]
> Subject: [Help-glpk] not defined error
> Date: Thu, 11 Jul 2013 13:51:23 -0700 (PDT)
> 
> I am new to GLPK linear programming and I keep running into an error that I
> cannot sort out.
> 
> Here is the error:
> 
> l not defined
> Context: if MustHave[y,t,r] = 1 then RateOfActivity[y,l,
> MathProg model processing error
> 
> Here is the line of code that it is hanging up on:
> 
> s.t. MH1_MustHave{y in YEAR, t in TECHNOLOGY, r in REGION}: if
> MustHave[y,t,r] = 1
>                                                                               
>                                         then RateOfActivity[y,l,t,m,r] =
> max(TotalAnnualCapacity[y,t,r]*YearSplit[y,l]*CapacityFactor[y,t,l,r]
>                                                                               
>                                         else RateOfActivity[y,l,t,m,r] = 
> RateOfActivity[y,l,t,m,r];

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to