help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] How to use a subset of a set as a variable in GLPK


From: Andrew Makhorin
Subject: Re: [Help-glpk] How to use a subset of a set as a variable in GLPK
Date: Sat, 29 Jul 2017 17:04:28 +0300

> 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;
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]