Documentation ¶
Index ¶
- func FillCourses(courses []*model.Course, labs []*model.Laboratory, schedule *model.Schedule, ...) (bool, int)
- func InitRuntimeProperties(courses []*model.Course, labs []*model.Laboratory, state int, ...) ([]*model.Course, []*model.Laboratory)
- func PlaceLaboratories(labs []*model.Laboratory, schedule *model.Schedule, rooms []*model.Classroom, ...) int
- func PlaceReservedCourses(courses []*model.Reserved, schedule *model.Schedule, rooms []*model.Classroom) int
- func Rand64() uint64
- func Validate(courses []*model.Course, labs []*model.Laboratory, schedule *model.Schedule, ...) ([]*model.Course, bool, bool, string, int)
- type Configuration
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, state int) (bool, 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 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 Validate ¶
func Validate(courses []*model.Course, labs []*model.Laboratory, schedule *model.Schedule, rooms []*model.Classroom, congestedDepartments map[string]int, CongestionLimit int) ([]*model.Course, 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
Click to show internal directories.
Click to hide internal directories.