[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: |
Andrzej Mazurkiewicz |
Subject: |
Re: [Help-glpk] Ignoring useless data instead of returning error |
Date: |
Fri, 15 May 2009 09:06:48 +0200 |
User-agent: |
KMail/1.10.3 (Linux/2.6.27.21-0.1-default; KDE/4.1.3; x86_64; ; ) |
Hello everybody.
I strongly advise against the approach "ignoring useless data instead of
returning error". It might cause a lot of problems while debugging large
models. This approach means simply looking for troubles.
Regards
Andrzej Mazurkiewicz
Friday 15 of May 2009 00:17:23 Andrew Makhorin napisaĆ(a):
> > 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