Download
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 partition from Boat
minimising |hosts|
$ Hosts remain the same throughout the schedule
such that
forAll p in sched . |parts(p)| = |hosts| /\
forAll part in parts(p) . |part intersect hosts| = 1
$ Hosts have the capacity to support the visiting crews
such that forAll p in sched . forAll h in hosts .
(sum b in party(h,p) . crew(b)) <= capacity(h)
such that allDiff([ (i, j)
| p <- sched
, part <- p
, {i,j} <- powerSet(part)
])