-------- Forwarded Message --------
From: Edward Terpilowski-Gill <[email protected]
m>
To: [email protected] <[email protected]>
Cc: Georgios Avgerinopoulos <[email protected]>
Subject: GLPK bug
Date: Fri, 2 Apr 2021 13:49:29 +0000
> Dear GLPK team,
>
> I have a question about a potential bug/limitation of glpk (or gap in
> my understanding).
>
> I am trying to create a constraint which has a logical expression
> using a variable to determine when the constraint is implemented. I
> have highlighted the logical expression below which when included
> causes the code to bug and say “operand preceding > has invalid type”.
>
>
> s.t. TCC3_TotalAnnualMaxCapacityExpansionConstraint{r in REGION, t in
> TECHNOLOGY, y in YEAR}:
>
> if (y > min{yy in YEAR}min(yy) && TotalCapacityAnnual[r,t,y-1]>0)
>
> then (((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0}
> NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y])) <=
> (TotalAnnualMaxCapacityExpansion[r,t,y]+1)*(((sum{yy in YEAR: yy = y-
> 1}ResidualCapacity[r,t,yy])+(sum{yyy in YEAR: y-yyy <
> OperationalLife[r,t] && y-yyy>=0 && yyy>min{yy in YEAR} min(yy)}
> NewCapacity[r,t,yyy-1])));
>
>
> I.e. I would like to implement the constraint if the variable
> TotalCapacityAnnual from the previous year is greater than 0.
>
> Without the highlighted section the code works fine.
>
> I have read this may be a limitation of GLPK vs AMPL.
>
> Hope you can advise.
>
> Many thanks
> Edward