Hello!
This my first question to the community so I hope to do everything correctly!
I have initialized "alpha" in my .mod file as follows:
float alpha[I0][I0][H][H];
execute
{
for (var i in I0)
{
for (var j in I0)
{
for (var p in H)
{
for (var q in H)
{
if (p==q)
{
alpha[i][j][p][q] = 0.0;
}
else if (q>p)
{
alpha[i][j][p][q] = 1.0;
}
else
{
alpha[i][j][p][q] = 2.0;
}
}
}
}
}
}
now I would like to access a value of alpha, e.g. alpha[0][1][0][1], in my .cpp file to check if the initialization is correct before solving the model with .solve().
In the IBM website it says that .getElement() can access all Elements... I have been able to access constants and 1D array but not the multidimensional array of my case.
IloNum i_temp = rc.getOplModel().getElement("alpha").asNumMap().get(1);
any suggestions ?
Thanks in advance
Sam
------------------------------
Samuele Viaro
------------------------------