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

Optimize the algorithm to generate possible weekly schedules #1

Open
Yivan000 opened this issue May 13, 2023 · 3 comments
Open

Optimize the algorithm to generate possible weekly schedules #1

Yivan000 opened this issue May 13, 2023 · 3 comments
Assignees
Labels
FOR: skedmaker Issue related to SkedMaker

Comments

@Yivan000
Copy link
Member

Yivan000 commented May 13, 2023

The current implementation of the schedule algorithm is extremely slow. It needs optimizing.

as of 0.0.1:

No. of subjects Time taken
2 subject ~500 ms
3 subjects ~500000 ms
4 subjects ~2000000 ms
@Yivan000 Yivan000 added the FOR: skedmaker Issue related to SkedMaker label May 13, 2023
@Yivan000
Copy link
Member Author

Yivan000 commented May 25, 2023

I have devised a new algorithm in this commit:
dcf8db5

The new algorithm is far superior than the previous one, since it uses bitwise operators to check for conflicts.

as of 0.1.0:

No. of subjects Time taken
2 ~0 ms
3 ~15 ms
4 ~100 ms
5 ~25000 ms
6 ~600000 ms
10 3+ hours

@Yivan000 Yivan000 self-assigned this Jun 7, 2023
@Yivan000
Copy link
Member Author

Yivan000 commented Jun 24, 2023

Closing this as fixed for now as of 0.1.0. For new ideas as to generating schedules more efficiently, please comment them below.

@Yivan000 Yivan000 pinned this issue Jun 28, 2023
@Yivan000
Copy link
Member Author

Reopening due to slow initialization.

@Yivan000 Yivan000 reopened this Jun 28, 2023
@Yivan000 Yivan000 added this to the SkedMaker core issues milestone Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FOR: skedmaker Issue related to SkedMaker
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant