[Top][All Lists]

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

[Help-glpk] [Fwd: One Dimensional Set Ordering]

From: Andrew Makhorin
Subject: [Help-glpk] [Fwd: One Dimensional Set Ordering]
Date: Sun, 01 May 2016 19:18:46 +0300

-------- Forwarded Message --------
From: Curtis Passorelli <address@hidden>
To: address@hidden
Subject: One Dimensional Set Ordering
Date: Sun, 1 May 2016 11:36:39 -0400


I have a discrete set.

set weeks:={1,4,8,11};

What I want to do is create a parameter to access the i-th element of
the set.
weeks[1] = 1, weeks[2] = 4, weeks[3] = 8 and weeks[4] = 11.

I want to do this assignment dynamically because these week numbers will
change each time new data is entered into the model.

Do you have any suggestions or code?

reply via email to

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