Hello,
This is a question about how GLPK/GMPL handles parameters populated with
csv table data when executing statements.
I have a parameter Stand_Type (dimension 3), and a set of sets pres{0..1}:
pres[0] = 1,101,102
pres[1]= 1,2,3,4,5,6
Stand_Type is indexed by { i in stands, j in pres[ char_stand[i] ], t in
0..19 }, where char_stand[i] = 0 or 1.
For a particular stand, say 314, char_stand[314]=0, thus in the statement:
sum { i in stands, j in pres[char_stand[i], t in 0..19 }
Stand_Type[i,j,t],
I would think Stand_Type[314,2,18] would never be called (since
char_stand[314]=0 and 2 does not belong to pres[0]). However, this is
not the case; when building the model GLPK attempts to access
Stand_Type[314,2,18] while executing the above statement ( I know this
because I get an out of domain error). Note: Stand_Type[314,2,18] _does_
have an entry in the csv that populates the Stand_Type parameter and
when I remove it, from the csv, I do not get the error.
I'm curious as to why Stand_Type[314,2,18] is being called in the
execution of the above statement when this combination of (i,j,t) is
never referenced by the indexing expression.
Cheers,
Andrew
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk