StudentMinimizeScheduleHoles Produces NaN Minutes in 4.9

6 views
Skip to first unread message

سونا يوسُف

unread,
Jan 23, 2026, 12:19:54 PMJan 23
to UniTime Discussion Group

Hello, 

 I imported the student group XML file, followed by the Reservation XML file. After that, I added
org.cpsolver.coursett.criteria.additional.StudentMinimizeScheduleHoles
to General.AdditionalCriteria in order to minimize schedule gaps for student schedules.

However, this does not work in the newer version 4.9. The same setup was working correctly in the older version.

Now, when running the solver, it shows a value of NaN minutes, as shown in the attached screenshot.

 is there an additional configuration or change required for this criterion to work properly?

studentdistance.png

سونا يوسُف

unread,
Jan 23, 2026, 12:20:00 PMJan 23
to UniTime Discussion Group
studentdistance.png

Tomáš Müller

unread,
Jan 23, 2026, 12:31:21 PMJan 23
to unitime...@googlegroups.com
Hello,

The NaN occurs when there is no joint enrollment (i.e., a student taking two or more classes), because the criterion tries to divide by zero.

What do you do for student course demands? Please note that the "Student course demands" parameter on the solver page must be selected based on what student data are available.

From the documentation of the Course Timetabling Solver page:

  • Student course demands
    • Student course demands that are used during the timetabling to avoid student conflicts
    • Last Like Student Course Demands
      • Real student course enrollments from the last-like semester
      • Source of demands: XML import or the session roll-forward (see Import Last-Like Course Demands option on the Roll Forward Session page)
    • Weighted Last Like Student Course Demands
      • Real enrollments are weighted so that the courses are filled with students
        • Example: When there were 15 students in a course last year and this year the course has a limit of 20, the last-like students in that course are multiplied by 20/15 
      • Source of demands: XML import and class limits
    • Projected Student Course Demands
      • Projected demands calculated from the last-like student course demands using the projection rules from the Curriculum Projection Rules screen
      • Source of demands: XML import and Projection Rules
        • Unlike with Last Like Student Course Demands and Weighted Last Like Student Course Demands, in this case it is important to import students and their properties (academic areas, majors, and classifications), this XML import prior to importing last like student course demands.
    • Curricula Course Demands
    • Curricula Last Like Course Demands
      • A combination of curricula and (projected) last-like student course demands - the curricula help with course demands for new courses (and mandatory courses, etc.) while the last-like information provides data about courses across curricula that the students took together
        • Use case: curricula only contain information about mandatory and elective courses, demands for optional courses are taken from last-like enrollment data. Last like data is also used to estimate joint demands between courses better.
      • Source of demands: XML import and Curricula
    • Student Course Requests
    • Enrolled Student Course Demands
      • Real enrollments of students for this semester that are being timetabled (used mainly for testing)
      • Source of demands: XML import

--
You received this message because you are subscribed to the Google Groups "UniTime Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unitime-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/unitime-discuss/e4ad37b5-2d26-4f0c-9283-65fe0955436en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages