Hi,

I have a MIP model and am running into an issue when inputting data from csv 
files versus entering them into the data section of the model file. The issue 
involves symbolic parameters that are referenced in multiple data sets. For 
example, I have two sets:
{n in Nodes} and {b in Blocks}. The Blocks set has a parameter Block_Node that 
matches one of the Nodes. The data reads just  fine from the csv files, as when 
I use the display statement I get the following:

Display statement at line 153
   Block_Node[1] = 1
Display statement at line 154
Nodes:
   1
   719
   742
   752
   787
   791
   793
   796
   823
   828

I create a set of BlockNodes using the following:
   set BlockNodes:=setof{b in Blocks, n in Nodes: (Node_ID[n]=Block_Node[b])} 
(b,n);

However, when the data is input from csv files, glpk does not recognize this 
join. When I try to display the set BlockNodes, I get the following error:
   "no value for Node_ID[1]"

If rather than using csv files, I enter the same data at the end of the model 
file, the model solves with no issue.

I am thinking that using the csv files is causing a data type conversion issue. 
I have tried forcing the Node_IDs and Block_Nodes to text by using quotation 
marks but the issue persisted.

Any help would be much appreciated. Thanks,

Joel

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

Reply via email to