weekdaze-0.0.0.2: A school-timetable problem-solver.

Safe HaskellNone
LanguageHaskell2010

WeekDaze.Data.HumanResource

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Describes an aspect of either a teacher or student.
  • These resources have a requirement to devote a portion of their week to teaching, whereas a location doesn't care what it's being used for.
  • They can also be members of heterogenous groups of other human-resources.
Synopsis

Type-classes

class HumanResource h where Source #

Describes a resource, which is also a person.

Methods

getNTimeslotsPerWeekOfTeaching Source #

Arguments

:: NTimeslots

The number of time-slots per day.

-> h 
-> NTimeslots

The number of those time-slots when the person is available, devoted to teaching or being taught.

getNTimeslotsPerWeekOfNonTeaching Source #

Arguments

:: NTimeslots

The number of time-slots per day.

-> h 
-> NTimeslots

The number of those time-slots when the person is available, devoted to any activity other than teaching; e.g. lunch, meetings, administration, free-study.

getGroupMembership Source #

Arguments

:: h 
-> Membership

The groups to which this human-resource belongs.

getMaybeFreePeriodPreference Source #

Arguments

:: h 
-> Maybe FreePeriodPreference

Any preference for the position within each day, of unallocated time-slots.

Instances
RealFrac teachingRatio => HumanResource (Profile level stream teachingRatio) Source # 
Instance details

Defined in WeekDaze.Data.Student

Methods

getNTimeslotsPerWeekOfTeaching :: NTimeslots -> Profile level stream teachingRatio -> NTimeslots Source #

getNTimeslotsPerWeekOfNonTeaching :: NTimeslots -> Profile level stream teachingRatio -> NTimeslots Source #

getGroupMembership :: Profile level stream teachingRatio -> Membership Source #

getMaybeFreePeriodPreference :: Profile level stream teachingRatio -> Maybe FreePeriodPreference Source #

RealFrac teachingRatio => HumanResource (Profile synchronisationId level timeslotId locationId teachingRatio) Source # 
Instance details

Defined in WeekDaze.Data.Teacher

Methods

getNTimeslotsPerWeekOfTeaching :: NTimeslots -> Profile synchronisationId level timeslotId locationId teachingRatio -> NTimeslots Source #

getNTimeslotsPerWeekOfNonTeaching :: NTimeslots -> Profile synchronisationId level timeslotId locationId teachingRatio -> NTimeslots Source #

getGroupMembership :: Profile synchronisationId level timeslotId locationId teachingRatio -> Membership Source #

getMaybeFreePeriodPreference :: Profile synchronisationId level timeslotId locationId teachingRatio -> Maybe FreePeriodPreference Source #

Constants

groupMembershipTag :: String Source #

Used to qualify XML.

Functions

calculateNTimeslotsPerWeekAvailable :: Resource resource => NTimeslots -> resource -> NTimeslots Source #

The number of time-slots in each week, that this resource is regularly scheduled to be available.

extractDistinctGroupMembership :: HumanResource humanResource => ResourceMap humanResourceId humanResource -> Membership Source #

Finds the set of groups, of which at least one human-resource claims membership.

extractGroupMembersOf :: HumanResource humanResource => Id -> ResourceMap humanResourceId humanResource -> ResourceMap humanResourceId humanResource Source #

Identify those human-resources, in the specified resource-map, who belong to the specified group.

extractCombinedGroupMembership :: HumanResource humanResource => ResourceMap humanResourceId humanResource -> Membership Source #

Get the union of all group-memberships.

Predicates

hasFreePeriodPreference :: HumanResource humanResource => humanResource -> Bool Source #

Whether the human-resource has specified a preference for the position, within each day on which they're available, of free time-slots.