Abbinamento classi a due a due da insiemi determinati

Started by Lizio, October 14, 2015, 07:09:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lizio

Buongiorno a tutti!

Continua la mia avventura, spero che questo serva almeno l'anno prossimo ad avere un orario più decente.

Veniamo al problema:
come posso fare a dire a FET che deve mettere due attività concomitanti, ma non fissate, bensì scelte da un insieme?

Facciamo un esempio:
La palestra deve essere occupata per forza da due classi contemporaneamente e per farlo l'ho dichiarata come due aule distinte, ora vorrei che una prima fosse in palestra con un'altra prima e non, magari, con una quinta.
Le ore di ginnastica sono tutte attività separate e ho messo il vincolo di spazio sulle due palestre fittizie, FET mi alloca bene le cose, ma le classi sono mescolate, ora vorrei provare ad avere prime con prime, seconde con seconde, ecc.

Qualche soluzione che non comporti il numero totale di classi al quadrato di vincoli da scrivere? (Ho 31 classi da piazzare e scrivere 900 e passa vincoli è proibitivo)

Grazie a tutti per l'aiuto.

Liviu Lalescu

Mi dispiace, ma non capisco. Forse poi scribere in italiano+inglese, e dare un esempio o il file .fet.

Lizio

Ok, I have 4 1st grade classes, 4 2nd grade, 6 3rd grade, 4 4th grade and 2 5th,  I have 1 gymn and it must be used by 2 classes at the same time, so I created "palestra1" and "palestra2" and I have put the space constrain on each activity of physical education to be tought either in palestra1 or in palestra2.

Now I want in the gymn 2 classes of the same grade and not 2 of different grades.

The problem is that in my school we have 31 classes...

I don't want to put toghether 2 classes of my choice as this would be a real hard constrain to be managed.
(right now my timetable does not close and I have to review all constrains to get a result, as soon as I get there I'll post my fet file.

Liviu Lalescu

#3
I think I understand now. I understand what you were saying about the quadratic number of constraints - I think you were referring to constraints activities not overlapping).

Unfortunately, I don't see another solution. There would be a possible temporary solution - to make a custom version just for you, not allowing 2 activities of sport to overlap if they are from different years.

Lizio

Wow! Thanks, but I don't want to make someone work for me.

I'll think about another solution, I'm thinking about using spaces toghether with timing... let's see if I can come out with something more easy to do.

Liviu Lalescu

Oh, it would be not a very big thing to work, but as you wish.

If you know a bit of programming/scripting, you could derive the .fet type of code from a list of Sport activities. For instance, write a list:

Year: 1,2,6,7
Year: 10,12,13
Year: 190,210,308,310

And a program will write:

<ConstraintActivitiesNotOverlapping>
       <Id>1</Id> (I am not sure here of the structure, you need to look in the .fet file with such a constraint)
       <Id>10</Id>
</ConstraintActivitiesNotOverlapping>

and add all constraints from 1 to each activities of the other years, and so on.

Then just copy/paste this code in your .fet file.