I am connecting an MS Access database to an OPL model using the .NET solution presented here:
https://github.com/IBMDecisionOptimization/OPL-.net-custom-data-source
This works fine and I am getting all the Data out of my Database via SQL. However I am struggling to initialize the tuples. My SQL statements look as following:
PName SELECT tblProdukte.PName FROM tblProdukte;
tName SELECT tblMaP.tName FROM tblMaP;
Demands SELECT tblProdukte.PName, tblMaP.tName, tblDemand.demDemand
FROM tblProdukte INNER JOIN (tblMaP INNER JOIN tblDemand ON tblMaP.tID =
tblDemand.demTID) ON tblProdukte.pID = tblDemand.demPID
WHERE (((tblMaP.tName)>0));
In the .mod file I am calling the data as following:
{string} PName =...;
{int} tName =...;
tuple DemandType{
string PName;
int tName;
int demDemand;
};
{DemandType} Demands=...;
This solution works. But what I actually want to implement is something like
float Demands [PName][tName] =...;
I have tried several different approaches including the oil Example and the Transportation Problem provided by IBM. How can I achieve the indexing in this exact way?
Thanks in Advance!