How to randomize number of periods in the morning

Started by ngoctp29121982, May 05, 2023, 06:51:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ngoctp29121982

Hello Livi!
How are you these days?
I have 1 problem when working with FET.
My school attends morning-afternoon; There are 30 classes in the morning and in the afternoon there are 5 classes, there are 10 classes.... So how can I make all random classes study 30 periods in the morning?

Liviu Lalescu

ngo, I have real problems understanding your questions, I am sorry.

ngo showed me on Facebook a screenshot, with a timetable with 6 mornings and 6 afternoons and 5 hours per half day.

I suppose he wants from some selected activities, that they occupy all the mornings hours.

ngo, I think you could use the constraint of type activities occupy min time slots from selection (or 'A set of activities occupies min time slots from selection'). Add all the necessary activities.

Or, maybe you could use min mornings per week and min hours per morning for the necessary students?

ngoctp29121982

I want every morning students to randomly study 5 lessons x 6 days is 30 lessons and in the afternoon is the remaining number of classes. For example, I have 47, divided into 30 morning lessons and 17 afternoon lessons

Liviu Lalescu

OK then, I think it is easy my second approach:

Quote from: Liviu Lalescu on May 05, 2023, 07:03:52 PMOr, maybe you could use min mornings per week and min hours per morning for the necessary students?

ngoctp29121982

OK, it took a long time, because there are many classes and each class has different lectures

Liviu Lalescu

Isn't a single constraint students min 6 mornings per week + a single constraint students min 5 hours per morning what you need? Just two constraints?

Or, as I saw now, if you don't allow empty mornings (that check box), just add just the students min 5 hours per morning constraint?

You will also need to add a constraint students min hours daily.

It should work.