Giter Club home page Giter Club logo

ctu-timetablegenerator's Introduction

This project is deprecated in favor of the CTU-TimeTableGenerator-new

CTU-TimeTableGenerator

Generates the best possible time table

What can it do?

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.

What is NOT supported

  • 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 or timeToIndex functions)
  • and probably much, much more

How to use

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>,
    ...
}

Python

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.

C++

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.

Warning

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.

I am very generous and I want to help

Don't be afraid to create an issue or a pull request!

ctu-timetablegenerator's People

Contributors

antoninkriz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.