I have a list of students defined as a set. I have also a param defined
for historical information that contains the set of students. As seen
below...

set Students;
param HistoricalInfo {c in Classes, s in Students}, binary;

Our project might have any number of students, from 50 to over a 1000. I
rather not have to list the students twice, once in the set of students, a
second time in param Historical Info.

set Students := David, Jerry, Fannie, Student4, Student5, Student6,
Student7, Student8;
param HistoricalInfo (tr):
                 English     Math    Science        SocialStudies
Elective :=
Jerry          1            0        0            0                0
David         1            0        1            0                0
Fannie       0            1        0            1                0
Student4    1            1        0            1                0
Student5    0            1        0            1                0
Student6    0            1        1            0                1
Student7    1            1        0            0                1
Student8    0            0        0            0                1;

My question is, is there a way to define set Students from the param data
so the students only need to be listed once?

Thanks for you time and help...
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to