Hi,
I'have a problem with a particularly constraint on my CSP problem.
My decision variable is a matrix, and i apply some constraints. One of this is:
for e in range(exams):
for a in range(columns):
for y in range(exams):
if y != e:
if time_table[y,a] > time_table[e,a]: #time_table -> decision matrix
model += time_table[e,a] >= time_table[e,a] + exams_duration[e];
It doesn't work. I saw that the problem is within the IF statement. I would like to know what i'm doing wrong. My problem is "scheduling exams in a period with a number of rooms (moreover exams_duration, rooms_capacity and so on)". I have to force that an exams scheduled in a particularly time, start after the duration of the previous exams, if it exists.
thanks for the help,
Regards
Gabriele
Hi,
I'have a problem with a particularly constraint on my CSP problem.
My decision variable is a matrix, and i apply some constraints. One of this is:
for e in range(exams):
for a in range(columns):
for y in range(exams):
if y != e:
if time_table[y,a] > time_table[e,a]: #time_table -> decision matrix
model += time_table[e,a] >= time_table[e,a] + exams_duration[e];
It doesn't work. I saw that the problem is within the IF statement. I would like to know what i'm doing wrong. My problem is "scheduling exams in a period with a number of rooms (moreover exams_duration, rooms_capacity and so on)". I have to force that an exams scheduled in a particularly time, start after the duration of the previous exams, if it exists.
thanks for the help,
Regards
Gabriele