> I have a parameter and then I declare a set of all existing values of
> this parameter:

> param cl{i in ITEM} symbolic;
> set CLASS:= setof{i in ITEM}cl[i];

> Later I declare a parameter

> param t {i in CLASS};

> and formulate a constraint on the CLASS set. My problem is that in repeating
> runs of the model I need to try different changes in the 'cl' parameter and
> sometimes I introduce a new value, sometimes an existing one is not used
> anymore. This causes changes in the set CLASS and these have to be followed
> in inputing values of the t parameter. Adding new values is not a problem,
> but it is quite painful to ensure each time that I do not input a value of t
> for a class, which does not exist anymore. I would like to know some trick
> how to make the model just ignore such irrelevant figure instead of
> returning the "out of domain" error.
> Is there a way

You may declare t as follows:

param t {i in CLASS}, default -1;

in which case a missing value for t[i] is defaulted to -1.



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

Reply via email to