Originally posted by: Boonyawat
Hi,
Here is my problem.
In OPL, I declare a set of tuple like...
tuple T{
string A;
int B;
};
{T} SET_of_T=...;
Also, in OPL, I declare array.
int Result[T];
Now, I have a scripting that I would like to assign a value B to array Result.
execute{
for (i in T)
Result[i]= ??????????????
};
};
The questio is what should I put in in the ????????????. I want Result[i]= B, where B is in the tuple of i. Note that I simplies the problem so that it is easy and breif enough to explain. In my actual model, I need to do some calculations, and if-then statement in my script block. I am stuck at how to assign a value in a set to an array.
thanks!
Boon
#CPLEXOptimizers#DecisionOptimization