Re: How to use a subset of a set as a variable in GLPK

Andrew Makhorin <[email protected]>
Newsgroups gmane.comp.gnu.glpk
Message-ID <1501337068.3835.2.camel@corvax>
> So say I have this set where I only have a certain dates where I want
> to add more items and after a certain date remove those items.
> 
> How would approach this if I have this to start with:

Your question is unclear. Please explain in more details what you need
to model.

> 
> # set of points
> 
> 
> set I;
> 
> param x {i in I};
> 
> param y {i in I};
> 
> printf {i in I} "%.2f, %.2f, %.2f\n", i, x[i],y[i];
> 
> data;
> 
> param : I :   x    y :=
> 
>         4.01     0    1
> 
>         4.02   0.5  0.9
> 
>         4.03     1  0.7
> 
>         4.04   1.5  1.5
> 
>         4.05   1.9    2
> 
>         4.06   2.5  2.4
> 
>         4.07     3  3.2
> 
>         4.08   3.5    2
> 
>         4.09     4  2.7
> 
>        ;
> end;
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.