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

Problems when create exam #168

Open
Animeakihabara opened this issue Apr 19, 2024 · 15 comments
Open

Problems when create exam #168

Animeakihabara opened this issue Apr 19, 2024 · 15 comments

Comments

@Animeakihabara
Copy link

After settings information for the course, i add new exam and got these errors.
2024-04-19 10 26 01
2024-04-19 10 26 08

As you can see, it show that i have an exam, but when i clicked these exam it got the error.

What should i check for now to state these error?

@tomas-muller
Copy link
Contributor

Looks like there is something incorrectly loaded into the solver. Please unload or reload the examination solver.

@Animeakihabara
Copy link
Author

wow, i have fixed it. I also have a question about exam period, is there any way I can add multiple time length with same start time in a day, like 700 length 90 in 11/09/2023 and 700 length 120 in 11/09/2023.

@tomas-muller
Copy link
Contributor

The examination periods should not overlap in time with each other. However, a shorter exam can be placed in a longer period. So, if the period is for 120 minutes, it can accommodate both 90-minute and 120-minute exams.

tomas-muller added a commit that referenced this issue Apr 19, 2024
- avoid Null exception when the examination is not loaded in the currently loaded examination solver
- fixes issue #168
tomas-muller added a commit that referenced this issue Apr 19, 2024
- avoid Null exception when the examination is not loaded in the currently loaded examination solver
- fixes issue #168
@Animeakihabara
Copy link
Author

Thanks for the update, for now i have already add examination but i got problems about loading exam into solver, it seem like it too slow when I load about 4k-5k examinations(it took about 30 minutes) and the solver time is very very slow, how can I deal with these speed?

@tomas-muller
Copy link
Contributor

Is there any chance the Java/Tomcat is running low on available memory? That can slow down everything to a crawl.

You can verify that the -Xmx parameter is being used by doing ps Aww | grep catalina in the terminal. The -Xmx parameter tells Java the limit on how much memory it can allocate (so, -Xmx2g means it can use up to 2 GB of RAM).

You can also see how much memory the Tomcat/UniTime has available by checking the Administration > Solver > Manager Solvers page; see the Available Memory in the bottom table (Available Servers).

@Animeakihabara
Copy link
Author

i use 128gb Ram and this is my settings up for memory usage:
Screen Shot 2024-04-22 at 22 58 50

@tomas-muller
Copy link
Contributor

Has the tomcat been restarted with these settings? It says it has "only" 3.5 GB available, especially if the limit is 100 GB.

Also, I cannot really comment on the problem size without seeing the data. It is usually not just the number of classes or exams, but it also depents on the domain sizes (how many periods/times and rooms each exam/class can use). How many students and student course/class enrollments do you have?

@Animeakihabara
Copy link
Author

these picture i took when it running solver. About the data I am facing with:

  • 12k-15k classes
  • 5k exam
  • 8-10 periods/days for the whole week, and I have 3-4 weeks for exam time
  • number of student is about 30k and student enrollments is about 1.4 millions

@tomas-muller
Copy link
Contributor

That is pretty huge. The largest problems I know about where UniTime is being used have about 2k exams, 40k students with 150k student-exam enrollments, 30 periods, and 500 rooms. The problem loads into the solver in about two minutes, and the solver is run for up to two hours (to really optimize the number of student conflicts), though the first complete solution (where all exams are assigned) is found in a few minutes using one CPU core.

I would really need to see the data to see if anything can be done with the speed. Whould you be willing to share the database dump, or at least the XML export from the solver (Export XML button on the Examination Solver page). You can share the file directly with muller@unitime.org.

@Animeakihabara
Copy link
Author

I have already send it, you can check the session DH2025

@tomas-muller
Copy link
Contributor

Your problem has 4576 examination periods (45 periods a day and going over 100 days), many of which overlap in time. The examination problem expects a set of non-overlapping periods, which allows the solver to assume that there are no direct conflicts if two exams are assigned in different periods. Also, with 670 rooms available to all exams, this makes over 30 million placements for each exam. And this is not counting the fact that each exam is allowed to be split into up to four rooms.

The UniTime solver does not expect the domain sizes this huge -- even computing/checking the bounds (the current versus the best possible placement for each exam) takes minutes.

The solver load itself, on the other hand, only takes a few minutes. It is computing the solution information (the Current Timetable table on the examination solver page) that takes forever -- as it goes over every single exam and their placement to check the bounds (so that the numbers, such as room, period, and distribution penalty, can be presented as percentages).

So, my recommendations are:

  • dramatically reduce the number of available periods and avoid periods that overlap in time

Also helps

  • remove rooms that are not suitable for examinations from the problem (do not have them marked as final examination rooms)
    • there is space for that: even if there are only four weeks (20 days) and four periods a day, if the exams are spread evenly across these periods, that is about 62 exams and rooms a period that would be needed -- that is ten times less than you have in the problem
  • use required/prohibited period and room preferences where applicable to reduce the domain size and avoid assigning an exam to a room or a period that does not work for it (room groups and room features can be used to easily filter out rooms that are not suitable, e.g., do not have the required equipment)
  • set the maximal number of rooms on exams that cannot be split to 1

@Animeakihabara
Copy link
Author

I am slightly confused about "set the maximum number of rooms on exams that cannot be split to 1". In my case, each room has just half of the capacity for examination. Students belonging to 1 subject could take the exam together, which means students in class 1 of subject A can take the exam with someone in class 2 of subject A, so I set it up to 4 to make sure that I can do this. Is that true/possible?

@tomas-muller
Copy link
Contributor

The Maximum Number of Rooms set on an examination allows a large exam to be split into multiple rooms, limited by this number. If set to 1, an exam must be placed in one exam; if set to zero, the exam gets no room (only the period is assigned).

By default, only one exam can be in a room during each period. This can be changed, e.g., by using the Can Share Room distribution preference to allow two or more exams to share a room, assuming that the room is big enough to fit the exams.

Each room has a normal seating capacity and examination seating capacity. This means that when an exam requires examination seating (e.g., placing students in a way that there is an empty spot between any two students) it must fit the room (or rooms, when split) given the examination capacity.

@Animeakihabara
Copy link
Author

What about the case, i have 70 students in a class of a subject, I have room which have enough seat for lecture or lab like 75, 80 seats. But for the examination, these room now just have 37, 40 seats (every room just have at most 1/2 capacity if its use for exam), for now I must split 70 students in to at least 2 rooms, is that possible to do that. And even more when i have 3 classes of same subject above which mean i have about 200+ students of this subject, is there anyway that let me distribution 200+ students in to about at least 6 rooms for examinations?

@tomas-muller
Copy link
Contributor

If you wish the exam to be in the same room as the class, you can set the normal seating type for the exam. Otherwise, you can allow the exam to be split into multiple rooms (by setting the maximum number of rooms on the exam to more than one). The solver will try to minimize the room splits, so if there is a big enough room available, it will use that.

The limit on the number of rooms that an exam can be split into is 32.

On the other hand, the data you shared with me showed that there were 287 rooms with an examination capacity of 70 or more and 13 rooms with 200 or more. My point was based on this data — there were enough rooms to fit all the exams many times over, even with only four periods a day and three weeks of five examination days a week (so, 60 periods instead of 4576).

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