[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Ignoring useless data instead of returning error
From: |
Jiri K |
Subject: |
Re: [Help-glpk] Ignoring useless data instead of returning error |
Date: |
Fri, 15 May 2009 02:15:46 -0700 (PDT) |
Maybe I misunderstood your answer but I think you are refering to the oposite
problem than I have. Missing values for t[i] are not the issue, trouble lies
in values of t[i], which are in the csv data file (from which I load the
parameter values), but the coresponding i is not in the set anymore.
This is quite annoying, because I need to remove these values from the csv
when I disable the class and perhaps in 5 minutes add them back when I
reintroduce the class.
Andrew Makhorin wrote:
>
>> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
>
>
--
View this message in context:
http://www.nabble.com/Ignoring-useless-data-instead-of-returning-error-tp23540629p23556212.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.