Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I alter classrooms structure? #2

Open
blockchain-expert opened this issue Jan 1, 2021 · 1 comment
Open

How can I alter classrooms structure? #2

blockchain-expert opened this issue Jan 1, 2021 · 1 comment

Comments

@blockchain-expert
Copy link

Hi,
I would like to implement this algorithm for school-level timetable generator. I couldn't alter the classrooms from input data. When I alter the input data and execute, then it got "Index out of bound" error. It would be nice if you could explain what should I do. Also, what are those keys meant in the classroom section in input data like "a", "k", "n", "r", "s"? Any help would be appreciated.

@NDresevic
Copy link
Owner

Hi,

For altering the classroom's input data (or any other input) you would need to modify the load_data method (https://github.com/NDresevic/timetable-generator/blob/master/utils.py#L8). From line number 59 is where the parsing for classrooms starts, so you should change that part to fit your model. For my model each classroom is identified by name and type, so you might also need to change that model (https://github.com/NDresevic/timetable-generator/blob/master/model.py#L19), not sure how your data looks like. Here is also where those keys appear the first time ("a", "k", "n", "r", "s"). This is adapted to finding a schedule for my university and each key represents a type of classroom. For example, some classrooms have computers, some are auditoriums, etc. Each classroom has its own type and each class can be held in only one type of classroom (it can be in any of the classrooms but from the defined type).

How does your input data for classrooms look like? I could change a bit the loading to make it more robust or something like that, although for reading the input requirements there will always need to be some hardcoding to fit different input models.

Let me know if you have more questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants