Originally posted by: RobertH79
Hi there!
I have got a set of datetimes as follows:
start = [ 27.00 35.00 59.00 36.00 30.00 36.00 43.00 67.00 ];
finish = [ 30.00 38.00 62.00 44.00 34.00 40.00 47.00 71.00 ];
These numbers represent three days planning period in hours.
These values index some events.
float start[i in Events] = ...;
float finish[i in Events] = ...;
I have a dvar int t_finish[i in Events];
I have a user defined variable to set the desired finishing time for every day during the planning period. Its given in a 24 hours format. Finally I would like to get the values that are below the user defined limit.
So I think I should use integer division all the values on the above values:
forall (i in Events) t_finish[i] - (t_finish[i] div 24)*24 <= UserValue;
forall (i in Events) t_finish[i] - (t_finish[i] div 24)*24 >= 0;
But I have got the next errors :
CPLEX(default) cannot extract expression: forall (i in Events) 0 <= t_finish[i] + (t_finish[i] div 24)*(-24);
CPLEX(default) cannot extract expression: t_finish[i] div 24.
CPLEX(default) cannot extract model: IloAlgorithm cannot extract extractable.
I think its because of the decision variable and the div.
Does anybody can advise a solution to the definition.
Thank you in advance.
Robert
#DecisionOptimization#OPLusingCPLEXOptimizer