Originally posted by: JKRATHORE
Dear All,
I am working on a problem similar like RCPSP, I got stuck into scale the integer (hour) duration into float duration (days). My interval variable is
mdl = CpoModel()
tasks = [mdl.interval_var(name = "T{}".format(i + 1), size = DURATIONS[i]) for i in range(NB_TASKS)]
where
DURATIONS = [2, 15, 9, 30, 5, 6, 1, 4, 8, 12, 4, 2, 20, 5, 27, 90] in hours
NB_TASKS = Number of Tasks
here 10 hours = 1 day
Since I also have few other constraints which are in day dimension ( e.g. number of people available in a day, maximum man-hours allowed in a day) and I am modeling them using cumulative functions, that why I want to convert hourly size of interval variable into day. I have tried to convert it through dexpr , but it is throwing error
scale = 10;
dexpr float z = 1/scale*for(i in range(NB_TASKS) DURATIONS[i];
Any thought on this would be appreciated, thank you
Jitendra
#CPOptimizer#DecisionOptimization