Loading [Contrib]/a11y/accessibility-menu.js
Download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 (minSize 1) of Boat,
     sched : set (size n_periods) of function (total) Boat --> Boat
 
minimising |hosts|
 
such that
    $ Hosts remain the same throughout the schedule
    forAll p in sched . range(p) = hosts,
    $ Hosts stay on their own boat
    forAll p in sched . forAll h in hosts . p(h) = h,
    $ Hosts have the capacity to support the visiting crews
    forAll p in sched . forAll h in hosts . (sum b in preImage(p,h) . crew(b))
                                            <= capacity(h),
    $ No two crews are at the same party more than once
    forAll b1,b2 : Boat . b1 < b2 ->
        (sum p in sched . toInt(p(b1) = p(b2))) <= 1