Originally posted by: llDubs
Hi,
I've been trying to modify the custom interface .NET example found below to read in my data from an Access database.
https://github.com/IBMDecisionOptimization/OPL-.net-custom-data-source
The example is great for reading in Sets or Tuple Sets. However, I am trying to read in a set of tuples into an array indexed by a set of strings:
{string} worker = {"worker1", "worker2"};
tuple Break{
int s;
int e;
};
{Break} work_break[worker] = ...;
In the dat file, I would load it as something like this:
work_break =#["worker1: {<1,4>, <10, 14>},
"worker2": {<1, 8>} ]#;
I've stored the data in my database with column names worker, s and e.
So to read in the data to work_break, I can see that the OplElementDefinitionType.Type = 'Array" but I'm not quite sure how to read in each tuple set and match it up with appropriate index of the array in .NET. Could someone please point me in right direction?
Thanks for the help.
#DecisionOptimization#OPLusingCPLEXOptimizer