this repo has no description
1
2% Regession test for Minizinc bug #222. This model caused
3% a series of problems with the FlatZinc MIP (Cbc) backend.
4% Cbc version 2.7.5 was the first version with which this worked.
5
6array [1..40] of var int: pl ;
7var 9..15: K; %= 11;
8array [1..40] of var 0..1: B1 ;
9array [1..40] of var 0..1: B2 ;
10int: BigM = 10000 ;
11
12constraint forall (F in 1..40)(F + 42*(1-B1[F]) >= K-6);
13constraint forall (F in 1..40)(F + 45*(1-B2[F]) >= K-3);
14
15constraint forall (F in 1..33)
16 ( BigM*B1[F] + sum (M in F..F+7) (pl[M]) >= 1 );
17
18constraint forall (F in 1..36)
19 ( sum (M in F..F+4) (pl[M]) <= -1 + BigM*B2[F] ) ;
20
21solve maximize K ;
22
23output ["K = ", show(K), "\n"];