Giter Site home page Giter Site logo

Timeslots about student-lab-sectioning HOT 2 CLOSED

talhavawda avatar talhavawda commented on August 21, 2024
Timeslots

from student-lab-sectioning.

Comments (2)

talhavawda avatar talhavawda commented on August 21, 2024

[I created a new problem instance folder (2020-Sem1-CAES-Wvl-fixing-timeslots) based on the current one to test out my fixes]

I changed the timeslots in the Courses.xlsx input file (by -1 to all, such that the first timeslot is 0) but this did not fix the issue. All the session times just went back by 1 timeslot session (5 minutes).

From the org.cpsolver.coursett.Constants class, I've discovered that the SLOTS_PER_DAY and SLOT_LENGTH_MIN are set as constants (i.e. they are fixed) to 288 and 5 respectively. So that is why using my own slotsPerDay attribute in the Input data XML file wasn't working - The slotsPerDay attribute in the Input data XML file isn't being used by the solver as the solver code specifies the SLOTS_PER_DAY and SLOT_LENGTH_MIN as constants. Thus the default values for the number of slots per day (288) and thus the length of each slot (5 minutes) will be used regardless if I specify my own slots per day.

So I need to modify the timeslots according to the default values.


I changed the Courses.xlsx input file of this 2020-Sem1-CAES-Wvl-fixing-timeslots problem instance so that the proper timeslots are reflected in the solution/xml file:

I changed the allocatedTimeslot field to startTime but kept the sessionLength field as is (I also changed allocatedDay to sessionDay, and moved the venueCapacity column to after the sessionLength).
Both these fields are now strings instead of integers and both represent 24-hr time values in the following format - hh:mm
The sessionLength values are all now 03:00 and the startTime values are either 09:35 or 14:10

I've created a function generateTimeslot() in the InputProcessing.py file and updated the code when Processing the course offerings to call this function on the startTime and sessionLength values and use these new values when setting the attributes in the input data XML file.

It now works - the correct session times are shown in the solution file.

So I've now gone and modified the CoursesInputTemplate.xlsx and the corresponding Courses input file for the current 2020-Sem1-CAES-Wvl problem instance, as well as the 2020-Sem1-CAES-Wvl-OLD problem instance, and generated their new/updated input data XML files.

from student-lab-sectioning.

talhavawda avatar talhavawda commented on August 21, 2024

In the documentation / user manual, specify that all times (startTime and sessionLength times) must/should be a multiple of 5 minutes

from student-lab-sectioning.

Related Issues (18)

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.