Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - mercurialuser

#1
Suggestions / Re: Manual timetabling by drag-and-drop
September 16, 2017, 02:05:37 PM
Volker you are perfectly right, I forgot room constraints...

Yesterday night I just wrote down some of the ideas I was thinking in the last days, so I'm sure they are confusing... sorry about this.


I want to make clear that I'm not saying that FET is not good, actually it is very good ! I also don't want to create a timetable from scratch.

Yesterday was the official school opening day in my city. Teachers had the timetable wednesday and 3 of them (out of 47) voiced for problems. One was able to exchange periods with another teacher, the second teacher request was denied, but the third, actually has big reasons to voice... Her timetable is not good and needs to be changed. He also agree to add another gap hour... believe me, it is very complex to do changes for this teacher. I found one that needs 6 different swaps to just move one of her lessons...

So I'd like to have a tool that can help me to test changes and check constraints without blocking my actions. Is TiTiTo able to do this? It seems it is. It also does a lot of other things that are probably useful in Germany and other countries but not in Italy, due to different staffing rules for teachers.

FET is great, but as already said in this thread and as answer to a question from me in another, if the timetable is "difficult", it is not easy to unlock some periods/students/teachers and get a *different* timetable and generating a new timetable from scratch means that it all teacher will have different timetables, also radically different (also worst)... a risk they don't want to have.

#2
Suggestions / Re: Manual timetabling by drag-and-drop
September 15, 2017, 10:22:06 PM
I want this feature so much that I started to code myself.

My idea is something similar to "Activity planning": the grid can have different contents, for example different grids in different tabs, using the view/model so that they stay in sync...
The one I prefer is  rows for teachers, columns for periods and in the cells the name of the students/class. Cells may be QLabel so that you can use html to style the text. If you need to put two student groups just use html to force a break... < br >
Another way is rows for classes, columns for periods, cell with subject/teacher, but it must be wider...

There should be QDocks so that they can be detached and put on another screen (I have two screens) to have more space for the main grids.

On these QDocks all the useful informations we need, like stats, a list of broken constraints, or penalties, or things to do.
One QDock should contain the weekly timetable of the teacher and another the weekly timetable of the class currently selected on the grid, so that it is easy to understand the situation.

One Qdock should contain the teachers list: a QTableWidget with two columns, the first a checkbox the second the name, when no row is selected, the main grid should display all the teachers, otherwise the main grid should list only the selected teacher. This should clean the grid when you need to exchange classes between few teachers.

Another QDock should contain the class list and work as the previous one. When you select a class, the main grid should list all the teachers that teach in that class.

Another QDock should contain the history.... well, I need to explain...

Changes should never be "final", we should record the movements of the cells as a sequence of instructions, something like SQL transactions. A lot of times we try to, for example, remove a gap for a teacher, start to move lessons around and discover that we created a gap for other 2 teachers... and we want to revert all the changes... we could have saved the original timetable or we can apply the changes in reverse order, like a sql rollback... Only if the changes are ok, we should commit, but also the commit is not final, is just a confirmed (and named) group of moves, so that they can be rolledback too... there are some pitfalls to take care but this message is already long.

About drag/drop... why add complications? The are several different and easier to implement methods... the first step in my program was to implement a QLine where to write commands:
<rownumber:teacher>, <columnnumber:period1>, <columnnumber:period2>

Lessons moves should always be inside one teacher... (at least in Italy school system...) so that in a cell there won't be two classes... remember that a move is actually a swap between the cells...

The second step can be to implement a right-click menu to specify the target of the move, or ... ok there are several ways...


The most important thing is that the swap must be able to break the constraints. FET can alert the user with messages, red cells, etc, but user must be free to try to move lessons around breaking all the constraints. ALL.

The GUI must help the user, for example when two cells are exchanged, the text or background must be painted in different color - I also chenge the class name in lower case... If a swap breaks a constraint like 2 teacher in the same class in the same period, both cells shoudl turn red...


Ok, I think you understood I have some ideas :-))))




#3
Get Help / Re: Fine tuning a timetable
September 11, 2017, 08:26:20 AM
I was able to get a timetable. It is not perfect but doable.

Some contraints were relaxed, some were made stricter.
#4

Considerato che il messaggio è diventato lungo scrivo qui sopra che allentando un po qui e un po la ma soprattutto fissando in specifica fascia oraria le ore di religione di 6 classi, FET è riuscito a trovare alcune soluzioni di cui stiamo verificando il rispetto dei vincoli... (leggi: poiché sto editando a mano il file .fet potrei aver fatto qualche cavolata....)

Quote from: Valdo on September 08, 2017, 04:55:58 PM

Come idea generale è sempre buona norma incominciare mettendo i vincoli importanti poi verificare se si chiude e poi aggiungere salvando sempre nuovi file i vari vincoli.
Questo procedimento ti permette di renderti conto quali vincoli lo rendono più difficile.

E' esattamente quello che faccio... ma non è così semplice come dici perché ad esempio ho lanciato una elaborazione 49 volte e solo UNA ha trovato una soluzione in circa 2 minuti, le altre 48 NON hanno trovato soluzioni in ore...
Quindi quando la soluzione è complessa devi avere pure molta fortuna a trovare un seed buono....

Quote from: Valdo on September 08, 2017, 04:55:58 PM
Intanto io se fossi in te per togliermi la curiosità metterei

Nel frattempo ho fatto una marea di prove. Ho disabilitato tutte le assegnazioni di attività in specifici periodi. Il sistema non è riuscito a chiudere in 16 thread contemporanei e 18 ore di calcolo.

Poi, essendomi reso conto di aver disabilitato alcune assegnazioni che sono importanti (ore di religione con molti non frequentanti in prima o ultima per far uscire i ragazzi) ho riabilitato quei vincoli e... magia... l'orario chiude e anche in tempi rapidi...allora ho iniziato ad aggiungere un altro vincolo... chiude... allora da max 3 ore 100% di italiano per le prime medie, a 2 100%... non chiude... al 97% non chiude... al 95% chiude...

Ma che significa "chiude"? Significa che in un tempo "finito" il sistema riesce a trovare una soluzione. Ma per come è costruito l'algoritmo, la stessa soluzione trovata in 2 minuti potrebbe trovarla in 80 giorni...

Quote from: Valdo on September 08, 2017, 04:55:58 PM

Po così d'acchito direi attenzione a questi:
Vincoli per docente:
- i classici non prima delle ore X, non dopo le ore Y
- possibilmente le prime ore, possibilmente le ultime ore...
- non più di 4 ultime ore

non sai mai come impattano e non ho capito bene come li hai impostati.

Desiderata arrivo alle X esco alle Y, quando sono strettamente vincolanti tipo presenza in altra scuola o necessità mediche o simili, li ho inseriti con la disponibilità del docente
Desiderata non più di 4 ultime ore l'ho inserito unico per tutti i docenti come max giorni per fascia oraria.

Possibilmente prime ore, possibilmente ultime.... forse ho usato una tecnica errata e quindi cerco suggerimenti. Per ora ho usato max 2 volte settimana la prima ora per chi vuole le ultime, max 2 volte l'ultima per chi vuole le prime... ma forse ci sono modi migliori...

#5
Quote from: Liviu Lalescu on September 08, 2017, 04:53:23 PM
You should add two constraints for each pair of activities, one with min 1 giorno 100%, another with min 2 giorni 95%-99%.

this is to avoid activities in the same day ... is it?
#6
Grazie a tutti per le risposte giunte e in anticipo a thebigbug se vorrà inviarci la sua situazione. Se è veramente più complessa potrebbe usare altre regole o in modo diverso.

Ci sono spunti interessanti e diciamo che gli insegnamenti appresi oggi sono vari:

a) se abbassi un vincolo a meno del 100% devi assicurarti che ci sia un vincolo superiore o di altro tipo che ti blocchi situazioni anomale... se metti che il tag italiano max 2 ore 98% devi assicurarti che ci sia un max 3 ore 100% (o altro vincolo) per evitare di avere 6 ore di italiano...

b) anche leggendo un thread nell'area inglese, a volte i desiderata dei docenti possono essere fuorvianti, inutili e persino dannosi...
Uno dei desiderata generali era di avere min days between activity 2 - 100% per musica, arte, tecnica.. non avere lezioni in giorni consecutivi per "poter dare i compiti"... poi scopro che la richiesta veniva dalla dirigenza e che le materie sono in realtà gestite a singole ore, ad esempio musica pratica (flauto) e storia della musica, arte pratica (disegno) e storia dell'arte... quindi è come se fossero geografia e matematica... non c'è proprio necessità di averle a due giorni di distanza ed infatti, chiesto ai docenti, il 90% si è detto favorevole... e il 10% non lo abbiamo potuto ancora interpellare ....
#7
La strada è quella giusta.

Crea un tag mat-fis e assegnalo alle attività di matematica e fisica.

Quindi setta che gli studenti (e non i docenti) possano avere massimo due ore al giorno con il tag mat-fis (devi abilitare le funzioni avanzate).

Ignora i warning di FET
#8
Get Help / Re: make fet-cl dump highest without stopping
September 06, 2017, 11:02:19 PM
You can use SIGUSR1 and 2 (in linux)

If I relax the constraints there should be no problem to resume the search...

After about 90 minutes I have 635 out of 639 activities placed. I'd like to tell FET to ignore any constraint and put the remaining activities in the timetable, or save the timetable while still searching.

It may be easy for me to place the missing actvities or I may accept the activities breaking a constraint... in the meantime FET can still be searching...
#9
Vorrei paragonare la mia situazione con le vostre e capire se c'è qualcosa che sbaglio...

La mia è una scuola media, 27 classi (3 sezioni complete). 47 docenti, di cui pochissimi hanno orario spezzato... Orario su 5 giorni, 6 ore.

Vincoli generici:
- max 1 buco al giorno
- max 2 buchi a settimana (3 per un paio di docenti)
- max 5 ore frontali al giorno
- max 4 ore continuative
- 2 palestre per 3 docenti (quindi due in contemporanea)

Vincoli per docente:
- i classici non prima delle ore X, non dopo le ore Y
- possibilmente le prime ore, possibilmente le ultime ore...
- non più di 4 ultime ore

Vincoli per materia:
- Italiano 10 ore:  3 2 2 1 1 1, con tag max 3 ore giorno
- Italiano 8 ore: 2 2 2 1 1, con tag max 3 ore giorno
- Matematica: 2 1 1 1 1, con tag max 2 ore giorno
- Inglese: 2 1, minima distanza 2 giorni 100%
- alcune materie da 2 ore: minima distanza 2 giorni, 100%
- le rimanenti (ed tecnica): minima distanza 1 giorno, 100%

Ci sono un paio di ulteriori vincoli che sarebbe troppo lungo descrivere.

Mi piacerebbe confrontarmi con voi e capire se questi sono vincoli normali (ad esempio, 2 buchi/week), se la suddivisione delle attività sono secondo voi consone e soprattutto, se per casi simili, riuscite a chiudere l'orario...

Io riesco in alcuni casi, poi appena stringo un poco i vincoli, nulla più...

... e non riesco a spiegarmi il perché...
#10
Get Help / make fet-cl dump highest without stopping
September 06, 2017, 10:00:21 PM

I'd like to have fet-cl write the highest timetable without stopping the program. I'm getting 63x out of 639 activity placed and so I'd like to see what it is happening, which activity is blocked by which constraint, etc etc..

It would be nice to be able to load the saved partial timetable and restart the search from that point... of course, I'd modify the constraints to be able to place the remaining activities...

#11
Get Help / Re: Fine tuning a timetable
September 06, 2017, 08:52:20 PM
My timetable is not difficult, it is very difficult... so it is not possible to just unlock some teachers or classes and get another timetable...

I tried to test TiTiTo last year, but I had to stop after the ' problem... did not have time to test the new version... I will try again....
#12
Get Help / Fine tuning a timetable
September 06, 2017, 03:05:06 PM

I was finally able to get a complete timetable. I had to "relax" some constraints and so I now have, for example, several teachers that teach the 6th period 4 days out of 5.

I'd like to unlock "something" to let FET try to shuffle lessons a bit... but when I tried in the past I never got a result. Can anybody please tell me how this feature actually works?

#13
Get Help / Re: constraints priorities: all vs 1 teacher
September 05, 2017, 10:22:28 AM
You say to create a pseudo activity, so FET can put the activity in the gaps if FET needs to... if FET put the pseudo activity as first or last period of lesson you can just discard it...


#14
Yes, I have a script that starts 16 fet-cl instances waiting 2 seconds between them to have different random seeds...
Another script tails the max_placed_activities.txt files and also does a diff...

#15
Get Help / 2 and 5 teaching periods only once in a week...
September 05, 2017, 07:34:19 AM
Italian school, students have 5 days, 6 periods each.
Teachers teach 18 periods.

I have a min hours per day set to 2, and some teachers have 2 days with 2 hours and unfortunately 2 days with 5 teaching hours...

Is it possible to tell FET that teachers may teach 2 periods and 5 periods only once in a week ?

I'm testing with minimum hours per day set to 3 but I feel it is a too strict requirements...