scheduler

package
v0.0.0-...-9997e8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillCourses

func FillCourses(courses []*model.Course, labs []*model.Laboratory, schedule *model.Schedule, rooms []*model.Classroom, placementProbability float64, freeDayIndex int, congestedDepartments map[string]int, congestionLimit int) int

FillCourses tries to assign a time and room for all unassigned courses. Returns the number of newly assigned courses. TODO: insert labs after theory

func InitRuntimeProperties

func InitRuntimeProperties(courses []*model.Course, labs []*model.Laboratory, state int, conflicts []*model.Conflict, relativeConflictProbability float64) ([]*model.Course, []*model.Laboratory)

Assign properties according to state

func PlaceLaboratories

func PlaceLaboratories(labs []*model.Laboratory, schedule *model.Schedule, rooms []*model.Classroom, placementProbability float64, congestedDepartments map[string]int, congestionLimit int) int

func PlaceReservedCourses

func PlaceReservedCourses(courses []*model.Reserved, schedule *model.Schedule, rooms []*model.Classroom) int

Place reserved courses whilst ignoring some checks (mostly same logic as previous function)

func Rand64

func Rand64() uint64

Fast UINT64 RNG

func Validate

func Validate(courses []*model.Course, labs []*model.Laboratory, schedule *model.Schedule, rooms []*model.Classroom, congestedDepartments map[string]int, CongestionLimit int) (bool, bool, string, int)

Validate checks schedule for conflicts and unassigned courses. Returns false and a message for invalid schedules.

Types

type Configuration

type Configuration struct {
	ClassroomsFile              string
	CoursesFile                 string
	PriorityFile                string
	BlacklistFile               string
	MandatoryFile               string
	ConflictsFile               string
	SplitFile                   string
	ExternalFile                string
	ExportFile                  string
	NumberOfDays                int
	TimeSlotDuration            int
	TimeSlotCount               int
	RelativeConflictProbability float64
	IterSoftLimit               int
	DepartmentCongestionLimit   int
	ActivityDay                 int
}

func NewDefaultConfiguration

func NewDefaultConfiguration() *Configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL