Originally posted by: ouaigooo
Hi,
Interestingly this code used to work with 12.6.3 but produces the following error with 12.7.1:
ASSERT FAILED: X& IloArray::operator[] (IloInt i) : Out of bounds operation: index superior to size of array IBM_20171023_indexInEmptySet Unknown OPL Problem Marker
// model_file
tuple Tu_name_value {
key string name;
float value;
}
{Tu_name_value} DATA = ...;
{Tu_name_value} DATA_PERTURBATION = ...;
{string} N = ...;
float Qnow[v in N] = item(DATA, <v>).value + ((<v> in DATA_PERTURBATION) ? item(DATA_PERTURBATION, <v>).value : 0);
execute { writeln("Qnow = ", Qnow); }
// data file
DATA = {
<"M_1", 1398.65718558>,
<"M_2", -8391.9431135>,
<"S", -20970.1664272>,
<"CH", -35667.2359386>
};
DATA_PERTURBATION = {};
N = {"M_1", "M_2", "S", "CH"};
What is wrong with it ? How come is it no longer supported ?
Thanks for your help !
#DecisionOptimization#OPLusingCPLEXOptimizer