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

Safe HaskellNone
LanguageHaskell2010

WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Defines the weightings, associated with each of the soft-constraints, used to compare & select between alternative lesson-definitions, at each stage in the construction of a timetable.
  • Hard-constraints (e.g. that a student or teacher can't be in more than one place at a time, or that the capacity of a location can't be exceeded), are never violated, & so don't need to be quantified for subsequent comparison.
Synopsis

Types

Type-synonyms

Data-types

data LessonCriteriaWeights w Source #

  • The weight of various criteria used to select a lesson from alternatives, at specific coordinates in the timetable.
  • These criteria relate only to the attributes of the lesson rather than its coordinates in the timetable; since the latter is common to all alternatives.

Constructors

MkLessonCriteriaWeights 

Fields

Instances
Eq w => Eq (LessonCriteriaWeights w) Source # 
Instance details

Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

Show w => Show (LessonCriteriaWeights w) Source # 
Instance details

Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

NFData criterionWeight => NFData (LessonCriteriaWeights criterionWeight) Source # 
Instance details

Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

Methods

rnf :: LessonCriteriaWeights criterionWeight -> () #

Num w => Default (LessonCriteriaWeights w) Source # 
Instance details

Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

(XmlPickler w, Ord w, Real w) => XmlPickler (LessonCriteriaWeights w) Source # 
Instance details

Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

(Eq w, Num w) => SelfValidator (LessonCriteriaWeights w) Source # 
Instance details

Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

(Eq criterionWeight, Num criterionWeight) => CriterionWeights (LessonCriteriaWeights criterionWeight) Source # 
Instance details

Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights

Methods

areAllZero :: LessonCriteriaWeights criterionWeight -> Bool Source #

Constants

associationList :: [(String, LessonCriteriaWeights w -> CriterionWeight w)] Source #

The ordered list of tags & accessors.

tag :: String Source #

Used to qualify XML.

Functions

calculateWeightedMean Source #

Arguments

:: (Fractional weightedMean, Real criterionValue, Real criterionWeight) 
=> LessonCriteriaWeights criterionWeight 
-> Criterion criterionValue

areResourcesReused: Maximum if the proposed lesson already exists at the same time in other student-body timetable, & therefore allows resource-reuse, by merging them into a student-class.

-> Criterion criterionValue

minimumConsecutiveLessons: Maximum when the proposed lesson, belongs to a course which specifies the greatest possible minimum consecutive lessons.

-> Criterion criterionValue

remainingCourseLessons: Maximum when the number of lessons required for the course matches the number of days the student & teacher are mutually available, falling to minimum when there are fewer remaining lessons.

-> Criterion criterionValue

synchronisedCourseSetSize: Maximum if the course is a member of the largest possible set of synchronised courses.

-> Criterion criterionValue

isCoreKnowledgeRequirement: Maximum if the subject is categorised as a core knowledge-requirement for the student, otherwise minimum.

-> Criterion criterionValue

isSpecialistInTopic: Maximum if the teacher is a specialist in a given topic, otherwise minimum.

-> Criterion criterionValue

matchOfCourseClassSizeToLocationCapacity: Maximum when the maximum class-size specified for the course matches the capacity of the location, falling to minimum as the deviation increases.

-> Criterion criterionValue

relativeFacilityUtilisation: The number of facilities used (regardless of their nature), over the total number of facilities available at the location.

-> Criterion criterionValue

studentClassSizeOverCourseClassSize: The number of students in the class, over the course's maximum class-size; this makes little sense if the class-size can grow.

-> Criterion criterionValue

studentClassSizeOverLocationCapacity: The number of students in the class, over the location's capacity; this makes little sense if the class-size can grow.

-> Criterion criterionValue

bookingAtAnotherCoursesSpecifiedTime: Maximum when if there's zero probability that courses for this student-body's other knowledge-requirements, will specify the proposed booking-time.

-> Criterion criterionValue

bookingOfLocationByOtherTeachers: Maximum when the location has been booked by zero other teachers, tending to minimum as each additional teacher books a lesson in this location.

-> Criterion criterionValue

deviationFromTimeslotRequest: Maximum when the proposed booking-time matches a timeslot-request for the course, falling to minimum as the deviation rises.

-> Criterion criterionValue

interCampusMigrationsOfStudents: Maximum when the campus for the proposed booking matches that in which the student is located in adjacent time-slots.

-> Criterion criterionValue

interCampusMigrationsOfTeachers: Maximum when the campus for the proposed booking matches that in which the teacher is located in adjacent time-slots.

-> Criterion criterionValue

studentBodyCombinations: Maximum if there's no increase in the number of student-body-combinations for the proposed lesson, falling towards minimum with each additional student-body-combination.

-> Criterion criterionValue

teachersLocusOperandi: Maximum if either the teacher has no previous bookings, or their locus operandi is unchanged, falling towards minimum with large relative increases to the locus operandi.

-> Criterion criterionValue

wasteOfScarceFacilities: Maximum if the proposed lesson either doesn't waste any facilities, or failing that merely wastes those which are ubiquitous.

-> Writer [Maybe criterionValue] weightedMean

The individual criteria values, & their weighted mean.

  • Returns the weighted sum of the specified criteria, divided by the sum of the weights.
  • Each criterion increases in proportion to some desirable attribute of the proposed lesson.
  • Each criterion should be in the same range of magnitudes, so that none dominates the total, thus making the total a clear measure of the value attributed to each.
  • The magnitude of the value of each criterion should be independent of the dimensions of the problem, such that the balance isn't disturbed when it's changed; i.e. they should be dimensionless.
  • Lessons lacking the concept being measured shouldn't be disadvantaged, but assigned a constant median magnitude.

Mutators

perturbWeights Source #

Arguments

:: (Enum f, Fractional f, Real f, Show f, Random f, RandomGen randomGen) 
=> randomGen 
-> f

The magnitude of the random perturbation; resulting in an increase or a decrease, by a factor of up to (1 + x) .

-> Mutator f 
  • Perturb each weight by an independent random value, of configurable magnitude.
  • Under this transformation, criterion-weights of zero will remain unchanged.