Originally posted by: PhilippeLaborie
I think some constraints can be made tighter in order to propagate better. I tried this set of constraints:
/***************
* Constraints *
***************/
subject to {
k98trou <= 4;
k98strou <= 14;
b98trourims1 <= 12;
b98strourims1 <= 16;
dynamique <= 46;
dynamique2 <= 46;
span(cmax, all(j in J) jobs[j]);
forall(md in Modes){
startAtStart(stock[md], modes[md]);
endOf(stock[md], md.duedate + offset) == md.duedate + offset;
presenceOf(stock[md]) == presenceOf(modes[md]);
}
forall(j in J)
alternative(jobs[j], all(md in Modes: md.jobId==j) modes[md]);
forall(m in M)
noOverlap(rims[m], setuptime);
}
Main differences:
- the alwaysIn on the cumul functions hold over the complete horizon instead of just the spanning interval (which is not fixed)
- the span constraint is expressed on the job intervals (present) rather than on the models (optional ones)
- the constraint that the stock and models intervals start at the same time is expressed with a startAtStart constraint rather than an equality of startOf, this way the engine can exploit ti better
With this model V12.6.3 finds an initial solution very fast:
! ----------------------------------------------------------------------------
! Minimization problem - 1,535 variables, 2,115 constraints
! Presolve : 1,142 extractables eliminated
! Workers = 1
! TimeLimit = 600
! Initial process time : 0.03s (0.03s extraction + 0.00s propagation)
! . Log search space : 10,318.1 (before), 10,318.1 (after)
! . Memory usage : 8.0 MB (before), 8.8 MB (after)
! Using sequential search.
! ----------------------------------------------------------------------------
! Best Branches Non-fixed Branch decision
1,000 1,026 on stock#63
2,000 619 on modes#366
* 4,400 2,420 0.61s -
Philippe
#DecisionOptimization#OPLusingCPOptimizer