On 10/17/20 7:24 PM, Andrew Makhorin wrote: > -------- Forwarded Message -------- > From: Manuel Castro <manuel.joao.cas...@icloud.com> > To: help-glpk@gnu.org > Subject: Help please > Date: Sat, 17 Oct 2020 17:02:16 -0000 > >> Hi there, >> >> I have the following constraint: >> >> >> subject to linctr20 {i in 1..365}: >> sum {j in (i - 1) * 48 + 1..(i * 48)} FlexibleLoadIncrease[j], <=
The comma should be removed. >> FlexibleLoadEnergyRating * LoadPowerProfile[j]; j is the index for the sum on the left side. i is the index of the constraint. So j cannot be used as index on the right side. Did you mean i? Best regards Heinrich >> >> >> FlexibleLoadIncrease is a decision variable >> whilst FlexibleLoadEnergyRating and LoadPowerProfile are param. >> >> I get the following error message: >> >> \Local\Temp\SolverStudio cyzbbe4o\model.txt:147: j not defined >> Context: ...[ j ] , <= FlexibleLoadEnergyRating * LoadPowerProfile [ j >> ] >> MathProg model processing error >> >> I have spent hours and hours trying to resolve this by going through >> the forums but couldn't find a solution. My last option was to contact >> you. Any help would be appreciated. Many thanks. >> >> Kind regards, >> MAnuel. >