[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: GLPK bug]
From: |
Andrew Makhorin |
Subject: |
[Fwd: GLPK bug] |
Date: |
Fri, 02 Apr 2021 17:36:57 +0300 |
-------- Forwarded Message --------
From: Edward Terpilowski-Gill <edward.terpilowski-gill@vivideconomics.co
m>
To: bug-glpk@gnu.org <bug-glpk@gnu.org>
Cc: Georgios Avgerinopoulos <georgios.avgerinopoulos@vivideconomics.com>
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fwd: GLPK bug],
Andrew Makhorin <=