-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.js
30 lines (26 loc) · 1.21 KB
/
Main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"use strict";
import { rooms } from "./Rooms.js";
import { constructGroupingsbyDepartment,
geneticAlgorithm,
getAllSubjects,
assignProfessorToSubjects,
subjectSessionPrep,
fetchData } from "./GA.js";
import { professors } from "./Professors.js";
import { department } from "./Department.js";
import { config } from "./config.js";
import { approvedSchedArr } from "./ApprovedSched.js";
export const userDepartment = "CCS";
// console.time("Time Elapsed");
const allSubjects = getAllSubjects(department,config);
let subjWithProfArray = assignProfessorToSubjects(professors,allSubjects);
let prepdSubjects = subjectSessionPrep(subjWithProfArray,config);
let chosenSched = geneticAlgorithm(rooms,department,prepdSubjects,approvedSchedArr,professors,config);
//TO-DO
//refine Mutation function - reroll Professor - Resolved
//Create a contingency function that will try to resolve the remaining recessive classes
//using a greedy algorithm as a last resort: Best fit Algorithm
console.log(constructGroupingsbyDepartment(department,chosenSched,config));
// console.log(chosenSched)
// console.timeEnd("Time Elapsed")
//Fitness ruleset in the fitness function needs constant and thorough refining.