schedule-planner

Copyright(c) Justus Adam, 2015
LicenseLGPL-3
Maintainerdevelopment@justusadam.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

SchedulePlanner.Calculator.Solver

Description

This module provides functions for calculating possibilities for an ideal schedule layout from weighted Lessons as well as providing functions for converting them into readable/printable format.

Synopsis

Documentation

calcFromMap :: Ord s => Map s [Lesson s] -> Maybe [MappedSchedule s]

Main evaluation function Transforms a map of weighted Lessons of a particular subject into a list of lightest schedules by branching the evaluation at avery point where there is a timeslot collision

calcFromList :: Ord s => [Lesson s] -> Maybe [MappedSchedule s]

Same as calcFromMap but operates on a List of Lessons

mapToSubject :: Ord s => [Lesson s] -> Map s [Lesson s]

Map a List of Lessons to their respective subjects

totalWeight :: MappedSchedule a -> Int

Convenience function to obtain the total weight of a particular Schedule

time :: Lesson a -> Timeslot

Convenience function extracing the (day, timeslot) Tuple from a Lesson

data Lesson s

Base datastructure for representing lessons

Constructors

Lesson 

Fields

timeslot :: Int
 
day :: Int
 
weight :: Int
 
subject :: s
 

Instances

Eq s => Eq (Lesson s) 
Data s => Data (Lesson s) 
Ord s => Ord (Lesson s) 
Show s => Show (Lesson s) 

type Timeslot = (Int, Int)

type Alias for readability (Slot, Day)

type MappedSchedule s = Map Timeslot (Lesson s)

type Alias for readability represents a schedule

type MappedLessons s = Map s [Lesson s]

type Alias for readability maps lessons to their respective subject