[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: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Ignoring useless data instead of returning error |
Date: |
Fri, 15 May 2009 15:34:40 +0300 |
> 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.
Oops, sorry.
You need to declare t to be indexed over a set, which is read from
the database along with t[i] values, not over CLASS, assuming that
CLASS is a subset of that set (for sanity check). For example:
param cl{i in ITEM} symbolic;
set FOO;
set CLASS:= setof{i in ITEM}cl[i], within FOO;
param t {i in FOO};
...
table tab_plant IN "CSV" "foo.csv" : FOO, t;
...