How to stop getting infeasibility?

48 views
Skip to first unread message

angeline...@gmail.com

unread,
May 1, 2019, 5:32:16 AM5/1/19
to AIMMS - The Modeling System
Hello. Currently, I am doing research about examination timetable scheduling where I use a mathematical model to do the examination timetable. My data for exams is 328 exam, with 26 available venues and 95 timeslots. The timeslots are separated into 5 timeslots which is 3 timeslots (9am-11am, 12pm-2pm, 3pm-5pm) is for the 2-hour exams while 2 other timeslots (9am-12pm and 3pm-6pm) is for 3-hour exam and it is for 19 days.

 I'm using 7 constraints to do this study. the constraints are completeness constraint, conflict constraint, unavailable constraint, gap constraint, precedence constraint, maximum exam per room constraint and room capacity restriction constraint.  I am having some trouble to run my room capacity constraint. when I'm running all the other constraint without the room capacity constraint, I can get an optimal solution. But when I try to run it together with the capacity constraint I'm getting infeasible. I do not know how to find the error or what is the thing that is causing the infeasibility. Can anyone please give guidance on this matter. I have included my AIMMS project link in here.



I have also included the constraint list image that I use in my research as a reference and also the validation in AIMMS. Can anyone please help me on how to get a feasible solution together with the room capacity constraint please, and also please screenshot the progress window if it shows an optimal solution.

Another question is I am trying to construct a constraint that will separate the 3-hour exam and 2-hour exam into different rooms. the mixing of the exams will be avoided. it means that one room will have only one exam which is 3-hour or 2-hour exam and this both exam will not be mixed in the same room. Does anyone have any idea on how to construct the constraint for this problem? 

For the AIIMS, all cases should be loaded to run the project. Please load "no available timeslot_3H" data for the similar parameter and for max allowed exam per room parameter, load the "Max exam per room (NEW)" data. I will much appreciate your help. 
Constraint list 1.png
Constraint list 2.png
Constraint validation in AIMMS.png

Wiet Mazairac

unread,
May 1, 2019, 10:33:51 AM5/1/19
to AIMMS - The Modeling System
Are you sure a solution to your problem exists?
Instead of formulating a hard constraint you could also introduce a penalty function.

For not mixing......

v_2hr_bool(room, day, timeslot)   [binary]
v_3hr_bool(room, day, timeslot)   [binary]
v_2hr_bool + v_3hr_bool <= 1
So, for every timeslot, you can either assign 2hr or 3hr exams.


v_2hr_assignment(room,day, timeslot, exam_2hr)   [binary]
v_3hr_assignment(room,day, timeslot, exam_3hr)   [binary]
v_2hr_assignment <= v_2hr_bool * big_m (use an indicator constraint here)
v_3hr_assignment <= v_3hr_bool * big_m (use an indicator constraint here)
This makes a link between the exams and the timeslots for different rooms.
You have a timetable(variable) for 2hr exams and for 3 hr exams.
The bools prevent you from simultaniously assigning different time-length exams to the same room in the same tiem-slot.

This is a bit conceptual because I didn't look at your files.
But I hope it will get you started.















Mohan

unread,
May 2, 2019, 2:48:43 PM5/2/19
to AIMMS - The Modeling System
Hello,

Your RoomCapacityRestriction doesn't look correct. It looks incorrect in the constraint list you shared as well.

You should make it as below.

Constraint RoomCapacityRestriction {
   
IndexDomain: (t,v);
   
Definition: {
        sum
[(c), X(c, t, v)*StudentNumber2(c)]<=RoomCapacity(v);
   
}
}

This means that for all venues and time slots, the number of students in that venue (sum on the LHS) will be less than the capacity of the venue.

Your original declaration had this indexed over (c, v) and summing over all time slots t. An exam happens in one time slot, students will write the exam in that time slot alone and will leave the room. Why would you want to aggregate the number of students that are entering that venue for each exam ? 

Can you let me know if changing this constraint solves your problem or not because I was unable to solve it myself. It is very tedious and confusing to load all the case files (I think around 20 of them). Can you save the entire data as one case file and share that ?

You can improve the formulation of your model for more efficiency by using index domain conditions. An example is below.

Variable X {
   
IndexDomain: (c,t,v)|StudentNumber2(c) <= RoomCapacity(v) and AvailableRoom_Time(v, t) and (not NonAvailableTimeslot_Break(t));
   
Range: binary;
   
Comment: "using domain condition to remove combination of rooms smaller than exam enrollment and also room v must be available in time slot t";
}

The domain condition will remove the combinations of (c, t, v) where number of students is more than room capacity (so it is not possible to schedule that exam in that venue) and this will just remove the necessity to have the above constraint.   |StudentNumber2(c) >= RoomCapacity(v) and AvailableRoom_Time(v, t) and (not NonAvailableTimeslot_Break(t))
Reply all
Reply to author
Forward
0 new messages