Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Describes all the teachers available to be booked in the timetable, in terms of their name & their attributes.
Synopsis
- type TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio = ResourceMap teacherId (Profile synchronisationId level timeslotId locationId teachingRatio)
- type CoursesByTeacherId synchronisationId teacherId level timeslotId = Map teacherId (Course synchronisationId level timeslotId)
- type CoursesByTeacherIdBySynchronisationId synchronisationId teacherId level timeslotId = Map synchronisationId (CoursesByTeacherId synchronisationId teacherId level timeslotId)
- type NTimeslotsByTeacherIdBySubject level teacherId = Map (Subject level) (Map teacherId NTimeslots)
- tag :: String
- calculateWorkloadBoundsBySubject :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Map (Subject level) Bounds
- countAvailableTeacherDays :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> NDays
- extractDistinctCourses :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Service synchronisationId level timeslotId
- extractDistinctOwnLocationIds :: Ord locationId => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Locus locationId
- extractDistinctSubjects :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Knowledge level
- findSuitableCourseByTeacherId :: Eq level => NStudents -> Subject level -> TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Map teacherId (Course synchronisationId level timeslotId)
- findCoursesByTeacherIdBySynchronisationId :: (Ord level, Ord synchronisationId, Ord teacherId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> CoursesByTeacherIdBySynchronisationId synchronisationId teacherId level timeslotId
- findDistinctCoursesBySynchronisationId :: (Ord level, Ord synchronisationId, Ord timeslotId) => CoursesByTeacherIdBySynchronisationId synchronisationId teacherId level timeslotId -> Map synchronisationId (Set (Course synchronisationId level timeslotId))
- findSpecifiedTimes :: Ord timeslotId => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> TimeSet timeslotId
- findSubjectsOfferedInMultipleCoursesRequiringDifferentLessonsPerWeek :: (Ord level, Ord teacherId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> NTimeslotsByTeacherIdBySubject level teacherId
- mergeConstraintsOnSynchronisedCourses :: (Ord level, Ord synchronisationId, Ord teacherId, Ord timeslotId, Show synchronisationId, Show timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio
- countLessonsPerWeekByFacilityName :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Map FacilityName NTimeslots
- getTeacherIds :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> [teacherId]
- getTeacherProfiles :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> [Profile synchronisationId level timeslotId locationId teachingRatio]
- hasAnyFreePeriodPreference :: RealFrac teachingRatio => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnySynchronisedCourses :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnyIdealTimeslotRequests :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnyCourseMaximumClassSizes :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnySpecificTimeRequests :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnyTimeslotRequests :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnySpecialists :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
- isInhabited :: Eq locationId => locationId -> TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool
Types
Type-synonyms
type TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio = ResourceMap teacherId (Profile synchronisationId level timeslotId locationId teachingRatio) Source #
The complete set of Profile
, indexed by teacherId
.
type CoursesByTeacherId synchronisationId teacherId level timeslotId = Map teacherId (Course synchronisationId level timeslotId) Source #
A map indexed by teacherId, of courses.
type CoursesByTeacherIdBySynchronisationId synchronisationId teacherId level timeslotId = Map synchronisationId (CoursesByTeacherId synchronisationId teacherId level timeslotId) Source #
A map indexed by synchronisationId, of CoursesByTeacherId
.
type NTimeslotsByTeacherIdBySubject level teacherId = Map (Subject level) (Map teacherId NTimeslots) Source #
The type returned by subjectsOfferedInMultipleCoursesRequiringDifferentLessonsPerWeek
.
Constants
Functions
calculateWorkloadBoundsBySubject :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Map (Subject level) Bounds Source #
- Determine the total number of lessons required for each subject, according to the
Course
s offered. - Since each course may be offered by more than one
teacherId
, the actual workload can only be constrained within bounds.
countAvailableTeacherDays :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> NDays Source #
The sum of the number of days worked by each teacher.
extractDistinctCourses :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Service synchronisationId level timeslotId Source #
Extracts the set of all Course
s, from the teacher-register.
extractDistinctOwnLocationIds :: Ord locationId => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Locus locationId Source #
Extracts the set of distinct locationId
s, from the teacher-register.
extractDistinctSubjects :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Knowledge level Source #
Extracts the set of all Subject
s, from the teacher-register.
findSuitableCourseByTeacherId Source #
:: Eq level | |
=> NStudents | The number of students, who need to be placed. |
-> Subject level | |
-> TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio | |
-> Map teacherId (Course synchronisationId level timeslotId) |
Find those teachers offering a course in the specified subject.
findCoursesByTeacherIdBySynchronisationId :: (Ord level, Ord synchronisationId, Ord teacherId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> CoursesByTeacherIdBySynchronisationId synchronisationId teacherId level timeslotId Source #
- Returns courses which reference a synchronisationId, indexed by that synchronisationId, sub-indexed by the teacher-Id who offers them.
- CAVEAT: If a teacher erroneously offers two courses with the same synchronisationId, then the second will overwrite the first.
- CAVEAT: courses are returned irrespective of whether any student requires them.
findDistinctCoursesBySynchronisationId :: (Ord level, Ord synchronisationId, Ord timeslotId) => CoursesByTeacherIdBySynchronisationId synchronisationId teacherId level timeslotId -> Map synchronisationId (Set (Course synchronisationId level timeslotId)) Source #
Returns the set of courses corresponding to each synchronisationId, irrespective of whether they're required by any student.
findSpecifiedTimes :: Ord timeslotId => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> TimeSet timeslotId Source #
Find the set of all specified times, for any course, offered by any teacher.
findSubjectsOfferedInMultipleCoursesRequiringDifferentLessonsPerWeek :: (Ord level, Ord teacherId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> NTimeslotsByTeacherIdBySubject level teacherId Source #
Finds subjects offered by more than one teacher, but as courses requiring different lessons per week.
mergeConstraintsOnSynchronisedCourses :: (Ord level, Ord synchronisationId, Ord teacherId, Ord timeslotId, Show synchronisationId, Show timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio Source #
Tightens the constraints on each member of a set of synchronised courses, to a level compatible with the requirements of other members.
countLessonsPerWeekByFacilityName :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Map FacilityName NTimeslots Source #
- The total number of lessons per week, required by all those courses requiring each facility.
- CAVEAT: all courses are counted, not just those for which there's some demand from students.
Accessors
getTeacherIds :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> [teacherId] Source #
Accessor.
getTeacherProfiles :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> [Profile synchronisationId level timeslotId locationId teachingRatio] Source #
Accessor.
Predicates
hasAnyFreePeriodPreference :: RealFrac teachingRatio => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if any teacher has specified a free-period preference.
hasAnySynchronisedCourses :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if any teacher has offered a synchronised course in their service.
hasAnyIdealTimeslotRequests :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if any teacher has requested an ideal timeslot in their service.
hasAnyCourseMaximumClassSizes :: (Ord level, Ord synchronisationId, Ord timeslotId) => TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if any teacher has specified a maximum class-size in their service.
hasAnySpecificTimeRequests :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if any teacher has requested a specific time in their service.
hasAnyTimeslotRequests :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if any teacher has requested a specific time in their service.
hasAnySpecialists :: TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if any teacher has requested an ideal timeslot in their service.
isInhabited :: Eq locationId => locationId -> TeacherRegister teacherId synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if a teacher typically inhabits the specified locationId
.