This project is deprecated in favor of the CTU-TimeTableGenerator-new
Generates the best possible time table
The program generates all possible time tables for given classes and ranks them based from the best (lowest amount of time spent in school) to the worst following these rules:
- No. of "standard classes hours" from the first one to the last one in a day, times 10
- Free day = -20 points
- Day only with one lecture = -10 points
- Day with lectures only = -5 points
- NO_730 = +5 points when the first class starts at 7:30
- NO_915 = +1 point when the first class starts at 9:15
Parameters NO_730
and NO_915
can be enabled/disabled in the code. Please support the 730ne.cz petition.
- time table is generated only for 7 days, not taking in count another week
- only standard class times are supported (exception for BI-CS1, see
time_to_index
ortimeToIndex
functions) - and probably much, much more
Spoof HTTP requests to https://timetable.fit.cvut.cz/new/api/sirius/courses/CLASS_NAME/events?...
from timetable.fit.cvut.cz Using Chrome Dev tools and copy paste them to the rozvrh.json
file following this structure:
{
"FI-KSA": {"events":[...]},
"BI-LIN": <copy pasted response from timetables>,
...
}
Place file rozvrh.json
into same folder where's the script and run it. It's slow for bigger input. Very slow - around 90 minutes minutes with complete data. Be aware.
Compile with g++ -O3 --std=c++17 main.cpp
and pipe the input file to stdin of the program using cat rozvrh.json | ./a.out
. This one is actually fast, using the same algorithm.
Keep your eye on your RAM while this code runs. This is NP-hard problem and can take shitlaod a lot of RAM to complete. A lot means even 10 GB. Take that in mind.
Don't be afraid to create an issue or a pull request!