Originally posted by: Crubal
Hi, I have a following question:
Given
int Resources = ...;
range Interchanges = 1..Resources;
tuple flow {int i; int j;}
setof(flow) Flows = {<i,j> | ordered i,j in Interchanges};
float distance_flow[Flows] = ...;
I would like to define a 0/1 parameter path_flow according to whether distance_flow[<i,j>] is greater than R(known) or not.
I tried the following code, but it has bugs.
execute {
for (ordered i,j in Interchanges) {if (distance_flow[<i,j>]<= R)
{
path_flow[<i,j>] == 1};
else 0;
}
}
Could you help me with that?
Thanks!
#CPLEXOptimizers#DecisionOptimization