Download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
language Essence 1.3
$ prob013.essence: Progressive Party Problem
$ Problem details available at http://www.csplib.org/Problems/prob013/
 
given n_boats, n_periods : int(1..)
 
letting Boat be domain int(1..n_boats)
 
given capacity, crew : function (total) Boat --> int(1..)
 
find hosts : set of Boat,
     sched : set (size n_periods) of function (total) Boat --> Boat
 
minimising |hosts|
 
such that
    forAll p in sched . range(p) subsetEq hosts,
    forAll p in sched . forAll h in hosts . p(h) = h,
    forAll p in sched . forAll h in hosts . (sum b in preImage(p,h) . crew(b))
                                            <= capacity(h),
    forAll b1,b2 : Boat . b1 < b2 ->
        (sum p in sched . toInt(p(b1) = p(b2))) <= 1