Originally posted by: davidoff
Thanks Philippe
Actually, this is a model that is run several times during a branch and price scheme where forbidden transitions are linked to some branching in the master model. So far, I regenerate the cp slave model at each iteration, so both approaches (yours and mine) can be implemented
Howeever, I usually speed up iterations between models in OPL, I try to avoid regenerating the models from scratch and use some bounds change (as it is done in the mulprod_change_main.mod model). This works fine for instance to forbid a given interval : I have in the original model some constraints such as forall(v in itvs) presenceOf(itv[v])==active[v] , and to dynamically forbid one interval in the next iteration, I simply do active[v].setUb(0). Then, calling cp.solve() after these modifications
I think I could adapt my model with some initial dummy constraints saying that for each pair of interval i1,i2 then I have
typeOfNext(i1) != T
i2 + dummy
i1,i2 I initially set up dummy
i1,i2 to a big range
http://0..M so that all these constraints will be satisfied, and once again, during my iterations, I can set upper bound of dummy
i1,i2 to 0 whenever I want to forbid this transition.
I have not tested yet this way to see if it's better than regenerating the model. For sure, there will be a quadratic number of constraints to forbid transitions, even if a few of them will be actually propagating.
David
#DecisionOptimization#OPLusingCPOptimizer