| 1 |
/*** |
| 2 |
!Test |
| 3 |
expected: |
| 4 |
- !Result |
| 5 |
solution: !Solution |
| 6 |
cum_bound: 6 |
| 7 |
***/ |
| 8 |
|
| 9 |
include "cumulative.mzn"; |
| 10 |
|
| 11 |
%-----------------------------------------------------------------------------% |
| 12 |
% cumulative |
| 13 |
%-----------------------------------------------------------------------------% |
| 14 |
var 1..6: cum_bound; |
| 15 |
|
| 16 |
constraint cumulative([0, 3, 4, 6, 8, 8], % start |
| 17 |
[3, 2, 5, 2, 1, 4], % duration |
| 18 |
[2, 3, 1, 4, 3, 2], % resource usage |
| 19 |
cum_bound); |
| 20 |
|
| 21 |
solve satisfy; |
| 22 |
|
| 23 |
output ["cum_bound = ", show(cum_bound), ";\n"]; |