[Top][All Lists]

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

[Help-glpk] Unreferenced Out of Domain Error

From: an494950
Subject: [Help-glpk] Unreferenced Out of Domain Error
Date: Thu, 06 Dec 2012 16:03:39 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0


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_.


reply via email to

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