Originally posted by: PhilippeLaborie
Why don't you have an interval variable (present) that represents the interval of time an order is produced (no matter on which machine and with which material).
Say:
dvar interval order[m in orders] ...;
And then some alternative enforcing that one and only one pair machine/raw material must be selected to perform this order, something like:
forall(m in orders){
alternative(order[m], all(o in Ops: operations[o].order==m) transformation[o]);
}
This will ensure that one and only one pair machine/raw material is selected to perform this order m.
And you can use interval variables order[m] to post other constraints of your model (ex: release dates, precedence constraints between orders if any, tardiness costs, etc.)
If there is no dependence between the allocated machines and the raw materials, you can even split the alternative as two alternatives, one on interval variables that represent the allocation of orders to machines. Another the allocation of orders to raw materials.
#DecisionOptimization#OPLusingCPOptimizer