|
From: | Andrew Makhorin |
Subject: | Re: [Help-glpk] Different constraint for first element of a set than for other elements |
Date: | Tue, 2 Feb 2010 02:55:44 +0300 |
> The model has a different constraint for the first > element of a set (say PERIODS) than for all remaining elements. > I have defined three sets: > INITIAL_PERIOD; > OTHER_PERIODS; > PERIODS := INITIAL_PERIOD union OTHER_PERIODS; > when MathProg is generating the model and specifically constraints over > the PERIODS set it terminates with the following error > cannot convert JAN to floating-point number > where JAN is the first period in OTHER_PERIODS Probably you attempt to assign a symbolic value ('JAN') to a numeric parameter. > How should the model be written in MathProg to allow different > constraints for the first element. You may write one constraint for the first element and other constraint for elements other the first one.
[Prev in Thread] | Current Thread | [Next in Thread] |