Optimize constraint multi activities has same timeslot

Started by thanhnambkhn, October 04, 2016, 04:32:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thanhnambkhn

Dear all,
In case of my time table:
- A day has 5 hours at morning and 5 hours at afternoon
- there are two types of set of activities:
+ type 1: morning activities ( from 1-5) with any teachers, subjects, students
+ type 2: afternoon activities ( from 6-10) with any teachers, subjects, students

- if teachers or students (class) work at hour 5 (end of morning) , they should not work at hour 6 at same day (first of afternoon)

How should I setup Timetable constraint?
I have thought about Time constraint: a set of activities has a set of preferred time slot. But I dont know whether it effects Fet performance?

Liviu Lalescu

For each students set/teacher, for each day, add a constraint activities occupy max time slots from selection, with their activities, selected slots = 5 and 6, max occupied = 1.


thanhnambkhn

Dear Liviu Lalescu,
Thank for your answer.

I understand your recommendation. For the constraint each teacher/ students, either work on hour 5th or 6th or neither both, FET can solve that by adding the constraint "Occupied max time slots from selections". It's ok!

But with two type of activities (group of activities must be at the MORNING: hour 1st -> 5th, group of activities must be at the AFTERNOON: hour 6th -> 10th;).
How to config that?
Should I add constraints
- "An activity has a set of preferred time slots" for every MORNING activities; time slots from: Hour 1st -> 5th / all day.
- "An activity has a set of preferred time slots" for every AFTERNOON activities; time slots from: Hour 6th -> 10th / all day.

Liviu Lalescu


thanhnambkhn

Thank you. I will try.
You work so late. I see the forum's time is 03:04:12 AM

Liviu Lalescu

Quote from: thanhnambkhn on October 04, 2016, 10:11:17 AM
Thank you. I will try.
You work so late. I see the forum's time is 03:04:12 AM

No :)

My time is forum time + 9h. I keep the site on an American host, but I am living in Romania.

By the way, you can set your personal time zone on the forum.

thanhnambkhn


thanhnambkhn

#7
Quote from: thanhnambkhn on October 04, 2016, 09:54:37 AM
Dear Liviu Lalescu,
Thank for your answer.

I understand your recommendation. For the constraint each teacher/ students, either work on hour 5th or 6th or neither both, FET can solve that by adding the constraint "Occupied max time slots from selections". It's ok!

But with two type of activities (group of activities must be at the MORNING: hour 1st -> 5th, group of activities must be at the AFTERNOON: hour 6th -> 10th;).
How to config that?
Should I add constraints
- "An activity has a set of preferred time slots" for every MORNING activities; time slots from: Hour 1st -> 5th / all day.
- "An activity has a set of preferred time slots" for every AFTERNOON activities; time slots from: Hour 6th -> 10th / all day.

Hi Liviu Lalescu,
I found an other way to set these above constraints, I create two Activities Tags, with name "Morning" and "Afternoon".
- All Morning activities have same tag name is "Morning".
- All Afternoon activities have same tag name is "Morning".

After that, I set constraint: "Set of activities have a set of preferred time slots":
- All activities with tag name "Morning" have preferred time slots such as: "Hour 1st --> 5th; all days"
- All activities with tag name "Afternoon" have preferred time slots such as: "Hour 6th --> 10th; all days"

I thought this solution is better. I tried to generate time table with FET, the result is good also.

----------------------------------------------------------------------------------------------------------

But I have faced to some problems with this type of time table. Please help me to solve:
- How to set all Students with "Morning" activities start at hour 1st (first of morning)
- How to set all Students with "Afternoon" activities start at hour 5th (first of afternoon)
(without morning and afternoon, I am able to use constraint: "All students begin early - max beginning at second hour = 0")

- How to set all Students with "Morning" activities have no gap ?
- How to set all Students "Afternoon" activities have no gap?
Here gap doesn't include the time from the last hour at the morning to the first hour at the afternoon)

Note: One Students (one class) have both "Morning" activities and "Afternoon" activities.

Liviu Lalescu

This is more complicated. Maybe you can use the Morocco (and Algeria) tricks, described in examples/Morocco/Hadkourt/ .

thanhnambkhn

#9
There are some differences between my time table behavior (Vietnamese) and Morocco time table.
- A teacher able to teach at both morning and afternoon.
- There are some students (not all) whose activities don't required morning or afternoon (it means that it's activities are able to be at Hour 1st --> 10th; regardless morning or afternoon)

I am thinking about an other trick. With students whose activities require morning or afternoon, I will split this students into 2 students.
Such as: students 6A becomes students 6A-morning and 6A-afternoon.
How do you think about this trick? Is it possible?

Liviu Lalescu

I am not sure.

But I told you to use the official FET, see the directory I told you, there are described the tricks to use official FET for Moroccan schools (txt files and an example fet file). You can get rid of what you don't need.

thanhnambkhn

Quote from: Liviu Lalescu on October 06, 2016, 09:36:16 AM
I am not sure.

But I told you to use the official FET, see the directory I told you, there are described the tricks to use official FET for Moroccan schools (txt files and an example fet file). You can get rid of what you don't need.

Hi Liviu Lalescu,
I had read Moroccan example immediately after you told me. But I saw some differences between my timetable and Moroccan school.
I have tried my trick (split 2 Students into 2 Student Morning and Afternoon); the result currently is good also.

Liviu Lalescu