iterative-forward-search-0.1.0.0: An IFS constraint solver
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.IFS.Timetable

Synopsis

Documentation

type Slot = Int Source #

type Event = Int Source #

toCSP :: (Eq person, Hashable person) => IntMap (Interval UTCTime) -> HashMap Event [person] -> HashMap person Slots -> (Int -> Assignment -> CSPMonad r (Maybe r)) -> CSP r Source #

toCSP slots events unavailability termination creates a CSP that timetables the events in events such that everyones availability is respected and no one is timetabled to 2 events simultaneously. In this CSP the events are the variables, and the slots are the values.

Slots are identified by integers, and must be supplied with a time interval, and events are also identifed by intergers, and must be supplied as with a list of all people in the event. People can be represented by anything with a Hashable and an Eq instance, and unavailability can be used to specify the slots where a person is unavailable.

Finally a termination condition must be provided. This is as defined in Data.IFS.Types