Академический Документы
Профессиональный Документы
Культура Документы
FETManual
Version0.7c
lastmodified12.06.2009
FETwrittenbyLiviuLalescu
http://www.lalescu.ro/liviu/
ManualwrittenbyVolkerDirr
http://www.timetabling.de/
FETHomepage
http://www.lalescu.ro/liviu/fet/
Tableofcontents
Preamble
Features
InstallingFET
UsingFET
File
Data
Basicsetting
Institutionname&comments
Daysperweek&Periodsperday
*Teachers,subjects,activitytags&rooms
Years,groupsandsubgroups
Activities
Prearrangement
Addanactivity
Addafortnightlyactivity
Addateamteachingactivity
Constraints
Weightsofconstraints
Basiccompulsorytimeandroomconstraints
Notavailableteachers,studentsorrooms&breaks
Minndaysbetweenasetofactivities
max&minperiodsperday
maxdaysperweek
Gaps
Maxhourscontinuously
studentsearly
activityendsday
2activitiesareconsecutive
2activitiesareordered
http://timetabling.de/manual/FET-manual.en.html
1/32
6/21/2015
Mingaps(hours)betweenasetofactivities
Workinginanhourlyintervalmaxdaysperweek
preferredtime(s)
Samestartingtime
Notoverlapping
Homeroom(s)
Preferredroom(s)
Buildings
Statistics
Timetable
Generatingatimetable
Viewatimetable
Beforereleasingatimetable
Howtochangearunningtimetable?
Beforechangingarunningtimetable
Changingarunningtimetable
Teachers'FreePeriods
Printtimetables
Printmultipletablesonasinglepage
2tableonasinglesheetbycss
2,4or8tableonasinglesheetbyyourprinterdriver
Stylethehtmlfileswithcss
Comments
Selectors
Colours
HideElements
Validatethecssfile
Settings
Help
Preamble
Tableofcontents
FETisfreesoftwareforautomaticallyschedulingthetimetableofaschool,highschooloruniversity.
Itusesafastandefficienttimetablingalgorithm.Itisfreesoftware,opensource,licensedunder
GNU/AGPL3.GetthelatestnewsandversionfromtheofficialFEThomepage
(http://www.lalescu.ro/liviu/fet/).
Thisisasmallmanualwithhopefullyalotofusefulexamples.
Importantdefinitionsaremarkedblue.
Usefulhintsaremarkedgreen.
Criticalwarningsaremarkedred.
Wiseexamplesaremarkedyellow.
LiviuLalescu(http://www.lalescu.ro/liviu/)startedhisprojectattheendofyear2002ashewas
workingonhisdiploma.Hegothisexaminationincomputerprogramming(softwarespecialization)
inJune2003.FEThadaverylargepaletteofconstraints,butsadlytheevolutionaryalgorithmwas
onlyabletosolveeasytimetables.Evengreateffortsduringthefollowingyearsinresearchthe
geneticalgorithmwasnevergoodenoughtosolvecomplextimetables.Insummer2007thebig
breakthroughwasdone.Anewheuristicalgorithm(basedonrecursiveswappingofactivities)was
http://timetabling.de/manual/FET-manual.en.html
2/32
6/21/2015
abletosolvedifficulttimetablesinafewminutes.
Features
Tableofcontents
Therearealotofnicefeatures.FETisabletoautomaticallycareaboutallgroups
(classes/courses/students),hasaverylargepaletteofconstraintsandofcoursenicestyleablexhtml
timetables.
Timeconstraints(misc)
Basiccompulsorytimeconstraints
Break(allteachers+allstudentsnot
available)
Timeconstraints(teachers)
Ateacherisnotavailable
Maxdaysperweekforateacher
Maxgapsperweekforateacher
Maxgapsperweekforallteachers
Maxgapsperdayforateacher
Maxgapsperdayforallteachers
Maxhoursdailyforateacher
Maxhoursdailyforallteachers
Minhoursdailyforateacher
Minhoursdailyforallteachers
Maxhourscontinuouslyforateacher
Maxhourscontinuouslyforall
teachers
Ateacherworksinanhourlyinterval
maxdaysperweek
Allteachersworksinanhourly
intervalmaxdaysperweek
Timeconstraints(students)
Astudentssetisnotavailable
Maxgapsperweekforastudentsset
Maxgapsperweekforallstudents
Astudentssetbeginsearly
Allstudentsbeginearly
Maxhoursdailyforastudentsset
Maxhoursdailyforallstudents
Minhoursdailyforastudentsset
Minhoursdailyforallstudents
Maxhourscontinuouslyforastudents
set
Maxhourscontinuouslyforall
students
Timeconstraints(activities)
Anactivityhasapreferredstarting
time
Anactivityhasasetofpreferredtime
slots
Asetofactivitieshasasetof
preferredtimeslots
Asetofsubactivitieshasasetof
http://timetabling.de/manual/FET-manual.en.html
Spaceconstraints(misc)
Basiccompulsoryspaceconstraints
Spaceconstraints(rooms)
Aroomisnotavailable
Spaceconstraints(teachers)
Ateacherhasahomeroom
Ateacherhasasetofhomerooms
Maxbuildingchangesperdayfora
teacher
Maxbuildingchangesperdayfor
allteachers
Maxbuildingchangesperweekfor
ateacher
Maxbuildingchangesperweekfor
allteachers
Mingapsbetweenbuildingchanges
forateacher
Mingapsbetweenbuildingchanges
forallteachers
Spaceconstraints(students)
Asetofstudentshasahomeroom
Asetofstudentshasasetofhome
rooms
Maxbuildingchangesperdayfora
setofstudents
Maxbuildingchangesperdayfor
allstudents
Maxbuildingchangesperweekfor
asetofstudents
Maxbuildingchangesperweekfor
allstudents
Mingapsbetweenbuildingchanges
forasetofstudents
Mingapsbetweenbuildingchanges
forallstudents
Spaceconstraints(subjects)
3/32
6/21/2015
preferredtimeslots
Anactivityhasasetofpreferred
startingtimes
Asetofactivitieshasasetof
preferredstartingtimes
Asetofsubactivitieshasasetof
preferredstartingtimes
Minndaysbetweenasetofactivities
Anactivityendsstudentsday
Asetofactivitiesendsstudentsday
Asetofactivitieshassamestarting
time(day+hour)
Asetofactivitieshassamestarting
day(anyhours)
Asetofactivitieshassamestarting
hour(anydays)
2activitiesareordered
2activitiesareconsecutive
Asetofactivitiesarenotoverlapping
Mingaps(hours)betweenasetof
activities
Asubjecthasapreferredroom
Asubjecthasasetofpreferred
rooms
Spaceconstraints(subjectsandactivity
tags)
Asubject+anactivitytaghavea
preferredroom
Asubject+anactivitytaghaveaset
ofpreferredrooms
Spaceconstraints(activities)
Anactivityhasapreferredroom
Anactivityhasasetofpreferred
rooms
Tableofcontents
InstallingFET
TODO:requirementsTODO:samelikereadme.(reallywriteittwice?Maybeshortthereadmeand
writelongversionhere?)TODO:commandlineusingFET
UsingFET
Tableofcontents
EvenFETisatidyQtapplication,youshouldreadthismanualcarefully,becauseitincludesmany
hintsandwarningshowtouseitcorrect.
File
Tableofcontents
Ofcourseit'spossibletoopenandsaveafile.
FETdoesn'thaveaoptiontoprintinthismenu.Thetimetableswillbewrittenintotheresults
directoryafteratimetableisgenerated.PleasereadchapterPrinttimetablesifyouwanttoknowhow
toprintatimetable.
Saveyourdatasetregularly.Especiallyifyouaddormodifyconstraints.FETdoesn'thaveaundo
optionrightnow.Sometimesit'sverydifficulttoundothelastmodification.AlsoifFETdidn'tfinda
solutionafterseveralhoursyoumaybewanttoundobutalreadyforgotlastchanges.
ThesaveddatasetcontainonlytheBasicsettings,ActivitiesandConstraints.Itdoesn'tincludethe
generatedtimetablesolution.
YouneedtodoTimetableSavedata+timetableas...ifyouwanttosavethegeneratedtimetable.
ThegeneratedtimetableisalsosavedbydefaultintotheresultsdirectoryifyouuseTimetable
Generatemultiblevariants.
http://timetabling.de/manual/FET-manual.en.html
4/32
6/21/2015
Data
Tableofcontents
ThedatacontaintheBasicsettings,ActivitiesandConstraints.Itdoesn'tincludethegenerated
timetablesolution.
Basicsetting
Tableofcontents
Institutionname&comments
Tableofcontents
Institutionnameandcommentsareoptionaldata.
Theinstitutionnamewillbeprintedascaptiontoallsmalltimetables(butyoucanstillstyleandhide
iteasilylater).
Commentswillbeprintedatthebeginningofthetimetables(beforetableofcontent).
Usethecommenttowriteaboutproblems,latestaddedconstraint,missingconstraintorconstraints
thatshouldbemodified.Don'tforgettoupdateregularlythecomments.Anoldcommentisasbadas
amissingorwrongcomment.
Tableofcontents
Daysperweek&Periodsperday
MostschoolsjustneeddaysfromMondaytoFriday.
Thistermsareprintedintothetimetablehead.Useshortcutstogetsmallertables.(MONinsteadof
Monday,TUE...).
APeriodisadistanceintime.
Theperiodsareprintedintothe
timetable.Souseshortcutstoget
smallertimetables.Youcanuseany
phraseasperiodname.
Example1
1stPeriod
2ndPeriod
3thPeriod
4thPeriod
5thPeriod
6thPeriod
Youhavetocareaboutthatevery
periodhasthesamedistance(isas
longaseveryotherperiod),becauseFETtakealwaysduration1perperiod.
(Exceptifyouaddaperiodthatalwaysgetspecialactivitiesorabreak.Inexample4aperiod09.3510.00canbeaddedandthisperiod
alwaysgettheconstraintbreak.Butthatisonlyacosmeticintrusion.)
Sobythisexampleanactivitywithduration1take45minutesandanactivitywithduration2take90
minutes.
Activitiescannotgetnonintegerdurationlike1.5.
Yourinstitutionhasactivitieswith90minutesdurationonMonday,WednesdayandFridaybutonly
60minutesdurationonTuesdayandThursday.
Makeperiodsthattake30minutes.Soactivitiesthattake60minutesmustgetduration2and
activitiesthattake90minutesmustgetduration3.
IfFETcannotfindasolutionyoushouldthinkaboutincreasingthenumberofperiodsorthenumber
ofdays.IfFETisabletosolveyourdataseteasilyandyoudon'tknowotherconstraintstoaddyou
shouldmaybethinkaboutdecreasingnumberofperiodsornumberofdays.Butyoushouldrethink
aboutallconstraintsagain!(EspeciallyNotavailableteachers,studentsorroomsconstraints.)
http://timetabling.de/manual/FET-manual.en.html
5/32
6/21/2015
*Teachers,subjects,activitytags&rooms
Tableofcontents
Addteachers,subject,activitytags,roomsandbuildings.
Alsothesenamesareprintedintothetimetable.Souseshortcutstogetsmallertimetables.
Anactivitytagisanoptionalinformationtoanactivity.
Activitytagsareforexamplelecture(reading),exerciseorlaboratory.
Ifactivitieswithduration2muststartinoddperiods(1st,3th,5th,...)theactivitytagmightbeodd.
Ifsomeactivitiesmust(orshould)beinstructedonlyinthemorningtheactivitytagmightbe
morning.
BeforeusingactivitytagspleasereadwholechapterConstraintsandverycarefullysectionpreferred
time(s).
Thinktwicebeforeusingactivitytags.Irecommendtouseactivitytagsonlytosetconstraints.First
ofalltrytosetconstraintswithoutaactivitytags,becauseitwillbeeasier.
Youdon'tneedtoaddhomerooms.Normallyeverygroup(classorteacher)hasit'sownhomeroom.
Therewillneverbearoomconflictifeverygrouphasit'sownroom.Addonlyroomsthatcouldhave
aconflict(artsroom,gym,sciencelab,...)orifyouhavemoregroupsthanrooms.
Everyroomhascapacity1.Soonlyoneactivitycanbeplacedperroom.Ifyouhaveahugegym
(thatmaybecanbeseparatedinto3partsbycurtains),thenenter3roomsforthegym.
Youdon'tneedtoaddbuildings.Addonlybuildingsifyouwanttouseabuildingsconstraint(like
MaxbuildingchangesperdayorMingapsbetweenbuildingchanges.)
Ifyouneedtoadddifferentbuildingsyoualsoneedtocareaboutglobalclearroomnames.Ifyou
haveroomname123inbuildingA,thenyoucan'tnamearoom123inbuildingBtoo.Soi
recommendtoincludethebuildingnameintotheroomname.Forexampleroom123inbuildingA
shouldgetthenameA123.
Years,groupsandsubgroups
Tableofcontents
It'sveryimportanttounderstandthedifferencebetweenyears,groups,subgroups,classes,courses,
divisionsandcategories.Butit'snotveryeasy.Pleasereaddefinitionsandallexamples.
Year(form):Asetofstudentsatthesamestageoftheirschooling.ForexampleaGermanprimary
schoolhasyears1to4.Ayearcontain(inmostcases)severalgroups(classes).
Group,Class,courseanddivision:Asetofstudentswhovisitthesameactivities.Sotheymeetthe
sameteacherstostudythesamesubjectsatthesametime.
Category:Asetofgroupsthatmighthaveactivitiessimultaneously.
Class(divisionofthefirstcategory):Asetofstudentswhomeet(nearlyalways)thesameactivities.
FETavoidusingthetermclass,becausethistermisuseddifferentincolloquiallanguage.Depending
onthecontextastudentssaythathevisitclassAorclass1orclass1A.InthisexampleFETwillcall
1asyear,Aasdivisionofacategoryand1Aasgroup.
Example1:PrimarySchool
http://timetabling.de/manual/FET-manual.en.html
6/32
6/21/2015
AGermanprimaryschoolhas4years.Buttherearedifferentnumberofgroups(classes)(depending
onthenumberofstudentsperyear).ForexampleGroup1A,1B,1C,2A,2B,2C,3A,3B,4A,4B.
Toenterthefirstyearofthisexampleaddyear1.Thendivideyearautomaticallybyselecting
categories.Increasenumberofdivisionsupto3andcallthemA,BandCinthefirstcategory.Now
checkthegroupstoseewhathappen.Toavoidspacebetweenyearandcategorynamejustremove
thespaceoftheseparatorcharacter(s)inthedivideyearautomaticallybyselectingcategories.
course
subject(duration)
Course(divisionofthesecondcategory):Aset
Biology Biology(4),chemistry(1),physics(2)
ofstudentswhomeet(sometimes)thesame
Chemistry Biology(1),chemistry(4),physics(2)
activities.
Physics Biology(2),chemistry(1),physics(4)
Example2:SecondarySchool
AGermansecondaryschoolhasyearsfrom5to10.Ineveryyearareagainseveralclasses(groups).
Butthestudentscannowchooseacourse(groupcategory2).Sothisstudentsvisitseveralsame
activities(butthenumberofactivitiesisnormallylowerthenthenumberofactivitiesofaclass)
Toenterthisexampleaddyear10.Then
divideyearautomaticallybyselecting
categories.Increasenumberofdivisionsup
to4andcallthemA,B,CandDinthefirst
category.IncreasetheNumberofcategories
upto2andthenumberofdivisionofthis
categoryupto3.CallthemBiology,
ChemistryandPhysics.Nowcheckthe
subgroupstoseewhathappen.Themost
importantistoseethatyougetthegroups
10A,10B,10C,10D,10Biology,
10Chemestryand10Physicsbythis.(Soin
thisexamplethefirst4groupsareclassesand
thelast3arecourses.ToFETtheyarejust
groups.Itdoesn'tknowthedurationofthe
groups(atthismoment).
Becarefulifyouhavea(nearly)100%filled
timetable.Theseactivitiesarenecessarily
scheduledsimultaneouslyifpupilsofthese
activitieshavenounusedperiodintheir
timetable.Soifyoudotheactivityplaning
youhavetobesurethatthetimetableis
solvable.Inthisexamplethedurationofacourseis4+1+2=7.Soit'simpossiblethatallphysics
activitiesareinstructedbythesameteacherbecausephysicshastotalduration2+2+4=8.Butif
physicsinthephysicscourseisinstructedbyadifferentteacherthenintheothercourses,thenthis
coursesarepossible.
Itdoesn'tmatterinthisexampleifthephysicscoursegetonlybiologyduration1.FETisabletocare
aboutthat,eventhedurationisdifferentbetweenthecourses.
Yourcanaddasecondsetofcoursesbyusingcategory3.
Youcanaddathirdsetofcoursesbymanuallydoingthesamelikedivideyearautomaticallyby
selectingcategories,butit'salittlebittricky.Insomecasesyoudon'tneedtoaddanewcategory
(readnexthint).
Thestudentshavedifferentreligionsinthesameclasses.So
http://timetabling.de/manual/FET-manual.en.html
course
subject(duration)
7/32
6/21/2015
theyhavereligionincourses.
christianreligion christianreligion(2)
jewishreligion jewishreligion(2)
Ifthereisonlyonesubject,thenittheeasiest(andifpupils
muslimreligion muslimreligion(2)
havenounusedperiodintheirtableitistheonlypossible
solution)toscheduledallatthesametime.Thereareseveral
philosophy
philosophy(2)
possibilitiestodoit(compareAddanactivityandconstraint
Asetofactivitieshassamestartingtime(day+hour)).Inmostcasesyoujustaddthesubjectreligion.
It'sclearifthereligionischristian,jewish,muslimorphilosophy,becauseyoucanseethisbythe
teachersname.
Thinkaboutneededcategoriesfirst.Thefirstcategoryshouldalwaysbetheclass.Thesecondand
thirdcategoryshouldbethecategorieswiththelongesttotalduration.Othercategoriesmustbedone
manuallyorbythehintsimultaneousactivities.
Maybeyouknowthat(byaccident)nostudentsisinGroup10Aand10Bioatthesametime.You
candeletethecorrespondingsubgroups.Youmaybegetbettertimetablesbythis.Butyouneedtodo
itonlyifpupilshaveunusedperiodsintheirtimetable.Becareful!Thisalsomeanyou(maybe)
cannotputastudentswithgroup10Biointo10Alater.Youmaybegetnewstudents(becauseparents
movedhouse).SoIhighlydon'trecommendthis!
Example3:HighSchool
TODO
TODO
Example4:University
TODO
TODO
Activities
Tableofcontents
Anactivitycontainnormallyasubject,astudentset,ateacherandaduration.
Itcanalsocontainactivitytags,morestudentsetsormoreteachers.Itcanbesplittedintoseveral
(sub)activities.Alsopseudoactivitiesarepossible.(Theydon'thaveanyteacherorstudent)
Prearrangement
Tableofcontents
Beforeaddingactivitiesyouneedtodoaplanning.CurrentlyFETdoesn'thelpyouwiththis.Soyou
alreadyneedtothinkaboutallactivities(teachers,studentsandrooms):
Thinkaboutstudents:Haseverystudentthecorrectnumberofactivities,subjectsandduration?
Thinkaboutteachers:Haseveryteacherthecorrectnumberofactivities,subject,durationand
students?(Istheteacherallowedtoteachthatsubjectand/oryear?)
Thinkaboutactivities:Isitpossiblethatactivitiesofcoursesaresimultaneously?(Thinkabout
teachersandrooms!)Isitpossiblealsowithactivitiesthatshouldbesimultanousbecauseofother
reasons?
Thinkaboutrooms:Ifyouwilluseroomconstraintsthancareinyourlessonplanningaboutasless
roomchanhesaspossible,becauseitwillbeeasiertogenerateatimetable.
Alsothinkaboutunwrittenruleslikethis:
Giveateacherasmanyactivitieswiththesamegroupaspossible,becausegeneratingthetimetable
willbeeasierandalsomostteacherwilllikethat(becausetheycanswapactivitieswithoutany
problemthemselves,theydon'tneedtolearnnewnames,...).
Maybegiveateacherasmanyactivitiesinthesameyear(becausehecancomparestudentsbetter
hedon'tneedtopreparesomuchdifferenthoursandsohecanspendmoretimeonpreparehis
http://timetabling.de/manual/FET-manual.en.html
8/32
6/21/2015
lessonshecanmaybesavesomemeetings...)Butbecarefullsometimesthisisabadrule.For
examplemaybeinthelastyearmustbedonefinalexaminationinashorttime.Somaybetheteacher
hasnotimetodoallthattestinsuchashorttime.
Studentskeepateacher2(or3years).Example:Aclassgetinyear5and6thesamemathteacher,
butthatclassgetanothermathteacherinyear7and8andsoone.
Addanactivity
Tableofcontents
To
add
an
activityyoujustneedtoadd(doubleclickwiththemouse,orselectandpressenter)students,subject
andteachers.Normallyanactivitycontain1teacher,1groupand1subject.Youshouldalwaysenter
thenumberofhoursthatthisactivityisinstructed.TheMinndaysbetweenasetofactivities
constraintisoneofthemostimportantconstraints.Sothisconstraintisaddedbydefaultifyouadd
morethenone(sub)activity.
Subjectgeographyisonlyinstructed1periodperweek.
Addtheteacher,thegroup,thesubjectandpressaddcurrentactivity.
Subjectartisinstructed2periodsperweek.Bothperiodsmustbeconsecutive.
Addtheteacher,thegroup,thesubject,increasedurationupto2andaddtheactivity.
SubjectEnglishisinstructed4periodsperweek.Butofcoursethisperiodsshouldnotbe
consecutive.All4periodsmustbeatdifferentdays.
Addtheteacher,thegroup,thesubject,splitthisactivityinto4activitiesperweek,modifyweightup
to100andaddtheactivities.
Subjectphysicsisinstructed2periodsperweek.Itdoesn'tmatterifbothperiodsareonthesameday
ornot.
http://timetabling.de/manual/FET-manual.en.html
9/32
6/21/2015
Addtheteacher,thegroup,thesubject,splitthisactivityinto2subactivitiesperweek,maybe
modifyweightunder100%andaddtheactivities.
Subjectsportisinstructed3periodsperweek.One(sub)activityshouldhaveduration2andthe
other(sub)activitymusthaveduration1atanotherday.
Addtheteacher,thegroup,thesubject,splitthisactivityinto2activitiesperweek,increaseduration
ofthefirstsubactivityupto2,modifyweightupto100andaddtheactivities.
Subjectnativelanguageisinstructed4periodsperweek.Theperiodsshouldbeatdifferentdays,but
theymostnotbeatdifferentday.Iftheyareatthesamedaytheymustbeconsecutive.
Addtheteacher,thegroup,thesubject,splitthisactivityinto4activitiesperweek,keepweight95%
(ormodifylikeyouwant),checktheforceconsecutiveboxandaddtheactivities.
Subjectforeignlanguageisinstructed4periodsperweek.Theperiodsshouldbeatdifferentdays,
buttheymostnotbeatdifferentday.
Addtheteacher,thegroup,thesubject,splitthisactivityinto4activitiesperweek,keepweight95%
(ormodifylikeyouwant)anddon'tchecktheforceconsecutivebox.
Subjectmathematicsisinstructed4periodsperweek.Theperiodsshouldbeatdifferentdays,but
theymostnotbeatdifferentday.Buttheyarenotallowedtobeconsecutiveiftheyarescheduledat
thesameday.
Addtheteacher,thegroup,thesubject,splitthisactivityinto4activitiesperweek,keepweight95%
(ormodifylikeyouwant)anddon'tchecktheforceconsecutivebox.Thenyoumustaddanew
constraint***.
Subjectreligionisinstructed2periodsperweek.Itshouldbeinstructedondifferentdays.Maybe
religionisacourseofthe4thcategory(comparesectionYears,groupsandsubgroups)andyoudon't
wanttoaddthatcategorymanually,oryouwastolazytoaddanothercategoryorpupilshaveno
unusedperiodintheirtimetable,soit'sclearthattheseactivitiesmustbesimultaneously.
Ifyoudon'thaveroomproblemsyoucanaddallreligionteachers,theyear(youcanalsoaddall
groups,butthatwillfloodtheprintedtimetablewithtoomuchinformation)andthesubject.Splitthis
activityinto2subactivitiesperweek,keepweight95%(ormodifylikeyouwant)andaddthe
activity.
Ifyouhaveroomproblems,thenyouhavepossibleseveralvariants,thatdoesn'tdifferinthe
timetablesolution.Theyjustdifferinthevisualprintedtimetable.
Variant1:Thesweetesttimetablesareprintedifyouaddanewcategory.Andaddactivitieslike
always.
Variant2:Add"all"activitiesjustasoneactivity(likewithoutroomproblems),addasmanypseudo
activities(withoutateacherandroom)asroomsareneededandaddconstraintSamestartingtimeto
theseactivities.
Variant3:Addseveralactivities.Eachactivitycontainateacherandonegroup.AddconstraintSame
startingtimetotheseactivities.Ifyouhavemoreteachersthengroups,thenoneormoreteachers
don'thaveagroupintheiractivity.Ifyouhavemoregroupsthenteachers,thenoneormoregroups
don'thaveateacherintheirgroup.
PleasereadsectionWeightsofconstraintsandMinndaysbetweenasetofactivities.
It'sallowedtoaddpseudoactivities.Pseudoactivitiesdoesn'tincludeastudentssetorateachersset.
Soundsstupid,buttheyareusefultocareaboutsomeconstraints.ComparesectionsNotavailable
teachers,studentsorrooms&breaks,Gaps,Preferredtime(s)andPreferredroom(s).
Checkthestatisticsafterallactivitiesareadded.
Addafortnightlyactivity
http://timetabling.de/manual/FET-manual.en.html
Tableofcontents
10/32
6/21/2015
Therearetwobigpossibilitiestoaddactivitiesthattakeplaceonceeverytwoweeks.The
recommendedoneistouseoneofthefollowingworkarounds.Theotheroneistodoitonavery
exactway.
Theadvantageoftheworkaroundsisaverysimpleinputoftheactivities.Thedisadvantageisthat
youmightnotgetthebesttimetableandit'snoteasytodifferfortnightlyactivitiesfromregular
activitiesintheprintedtimetable.
Usingaworkaround
Allworkaroundsbasedonasimpleidea:Justaddafortnightlyactivityasaregularactivityandcall
thestudentsandteachersthatthisactivityisonlyinstructedeverysecondweek.
Ifstudentsarenotallowedtohavegaps,thenfortnightlyactivitiesshouldgetconstraintactivityends
dayorconstraintpreferredtime(s)withfirstperiodsaspreferdtimes.Ifstudentsalsoneedconstraint
studentsearly,thenyoushouldonlyuseconstraintactivityendsday.
Becarefulifyouhaveroomproblems.InmanycasesHomeroom(s)willnotcareaboutfortnightly
activities.YouneedtouseaPreferredroom(s)constraint.
Ateacherinstructanactivitytogroup1Ainoddcalenderweekandtogroup1Binevencalender
week.
Variant1:Addonlyoneactivityforthis.Justaddbothgroupsintooneactivity.Thisimply,that
"both"activitiesarescheduledatthesameperiod.
Variant2:Addtwodifferentactivitiesforthis.Thisimply,thatbothactivitiesarescheduledat
differentperiods.Sothisisnotrecommendedifyouroomproblems,becausearoomwillbealways
occupied,evenitisnotused.
Astudentssetisinstructedbydifferentteachersindifferentcalenderweeks.
Variant1:Addonlyoneactivityforthis.Justaddbothteachersintooneactivity.Thisimply,that
"both"activitiesarescheduledatthesameperiod.
Variant2:Addtwodifferentactivitiesforthis.Thisimply,thatbothactivitiesarescheduledat
differentperiods.Sothisisnotrecommendedifyouroomproblems,becausearoomwillbealways
occupied,evenitisnotused.
Youhavetwofortnightlyactivitieswithdifferentteachersandstudents.
Variant1:Addtwodifferentactivitiesforthis.Thiswilleffectthebesttimetableifyouhaveno
roomproblems.
Variant2:Addonlyoneactivityforthis.Justaddallteachersandstudentsintooneactivity.This
imply,that"both"activitiesarescheduledatthesameperiod.
AteacherT1instructgroupG1andateacherT2instructgroupG2.Inthefollowingweekthe
teacherschangethegroups.SoT1instructG2andT2instructG1.
Variant1:Addjustoneactivitywithallteachersandstudents.Thisimply,that"allfour"activities
arescheduledatthesameperiod.Butconsiderthatonlyoneroomisreserved.Sojustusethisifyou
havenoroomproblems.
Thenexttwovariantsshouldbeusedifyouhaveroomproblems.Theydoesn'tdifferinthetimetable
solution.Theyjustdifferinthevisualprintedtimetable.
Variant2:AddtwoactivitiesandaddconstraintSamestartingtimetotheseactivities.Variant3:Add
"both"activitiesjustasoneactivity(likevariant1),addapseudoactivity(withnoteacherandno
room)andaddconstraintSamestartingtimetotheseactivities.
Variant3:Addfourdifferentactivitiesforthis.Thiswilleffectthatfourdifferentperiodsareneeded!
Soinmanycasesthisisnotrecommended.Especiallyifyouhaveroomproblems.
Theexactway
http://timetabling.de/manual/FET-manual.en.html
11/32
6/21/2015
Theexactwaycanmaybefindabettersolution,butisnotrecommended,becauseit'smuchmore
work.Soenteringthedatasetandgeneratingatimetableneedmuchmoretime(atleast2times).
Youneedtoenter2weeksinthebasicsettings.Enterallactivities2times.Onetimewithactivitytag
"oddweeks"andtheothertimewithactivitytag"evenweeks".Theforthrightlyactivitiesarejust
enteredonetime.Setaconstraintpreferdtimetoactivitieswithactivitytag"oddweek"toperiodsof
the"oddweek".Dothesamewith"evenweeks".Becarefulmanyconstraintsmustbeaddedtwo
times!
Tableofcontents
Addateamteachingactivity
Teamteachingmeantwoormoreteachersinstructonegroupinthesameperiod.
Becarefulifyouhaveroomproblems.InmanycasesHomeroom(s)willnotcareaboutteam
teachingactivities.YouneedtouseaPreferredroom(s)constraint.
Anactivityshouldhave2ormoreteachersforteamteaching.
Justaddaactivitywithallneededteachers,thegroupandsubject.
Anactivityissplittedinto4activitiesperweek.Onlyoneoftheseactivitiesshouldbeinstructedby
two(ormore)teachers.
Therearetwovariantsthatdifferonlyinthevisualoutput.
Variant1:Addanactivitywiththegroup,oneteacherandsplititinto4activities.Keeptheidofone
outofthesplittedactivitiesinmind.Addanotheractivitywithnogroupandtheotherteacher.Use
constraintSamestartingtimefortheotherandthememorisedactivity.
Variant2:Addanactivitywiththegroup,oneteacherandsplititinto3activities.Addasecond
activitywiththegroupandbothteacher.AddthisactivitytothealreadyexistingMinndaysbetween
asetofactivitiesconstraint.
Constraints
Tableofcontents
Weightsofconstraints
Tableofcontents
Everyconstrainthasaweight.Aweightof100%meanthatthisconstraint
mustberespected.Alowervaluemeanitshouldberespected,it'snot
necessary.It'sprettydifficulttoexplaintheexactfunction,butasimple
illustrationisthefollowing:50%weightmeanthatinaverageFETretries
twotimestoplaceanactivitywithoutaconflict.IfFETisn'tabletoplacethe
activitywithoutaconflictafteraverage2timesitkeepstheconflictandtries
toplacethenextactivity.
Thisisnotanexactexplanationofthealgorithm,becausetheactivitiesmight
getunallocatedorcyclereopened.
Alwayssavethedatafileunderadifferentname(justnumberthem)after
addingormodifyingaconstraint.
Checkifyourtimetableis(still)solvablebeforeaddingnewconstraints.It
mightbeimpossibletosolvethetimetable.
weight
50%
75%
80%
90%
95%
99%
99.5%
99.75%
99.80%
99.90%
99.99%
100.00%
averageno.
ofretries
2
4
5
10
20
100
200
400
500
1000
10000
unlimited
Everyconstraintslowsdownfindingasolution.
Sojustaddneededconstraint.Forexampleifteachers/pupilshave(nearly)nounusedperiodintheir
timetableyou(maybe)don'tneedtoaddconstraintslikeminormaxperiodsperday.
Howtodoagoodandcorrectweight?
Inmyopinionnearlyallconstraintsshouldhaveweight100%.Especiallyconstraintsthathavean
http://timetabling.de/manual/FET-manual.en.html
12/32
6/21/2015
othermaximumvalue(likemaxdays/periods/gaps).TheMinndaysbetweenasetofactivities
constraintisalittlebittricky.Itshouldbealways100%,onlycourseactivitiesin100%filled
timetablesshouldhavesometimeslowervalues.ReadsectionYears,groupsandsubgroupsandMin
ndaysbetweenasetofactivitiestounderstandwhy.
Soofcourseit'saniceideatowritedownalistofallneededconstraintsandorderthemby
importance.ButIdonotrecommendtosetweightto100%tothemostimportantconstraint,maybe
99%tothesecondimportantconstraintandsoonuntilthelastone.
Irecommendtoaddallconstraintsstepbystepwithweight100%(exceptafewMinndaysbetween
asetofactivitiesconstraints).Ifyouaddaconstraintwithanothervalue(likemax
days/periods/gaps)thenalsouseweight100%,butuseahighvalue.Afterallconstraintsareadded
andifFETisstillabletofindasolution,begindecreasingthemaxdays/periods/gapsvalues.
Basiccompulsorytimeandroomconstraints
Tableofcontents
Thebasicconstraintsare:
Timeconstraints(misc)Basiccompulsorytimeconstraints
Spaceconstraints(misc)Basiccompulsoryspaceconstraints
Thisbasicconstrainsmusthaveweight100%andmustalwaysbeincludedinthedataset.
Thebasictimeconstraintscareaboutthatateacherneverhastoinstructtwoormoreactivitiesatthe
sametime.Alsostudentsmusthavemaximumoneactivityperperiod.
Thebasicroomsconstraintscareaboutthataroomwillneverhaveincluded2ormoreactivities.
Notavailableteachers,studentsorrooms&breaks
Tableofcontents
Thenotavailableandbreakconstraintsare:
Timeconstraints(teachers)Ateacherisnotavailable
Timeconstraints(students)Astudentssetisnotavailable
Spaceconstraints(rooms)Aroomisnotavailable
Timeconstraints(misc)Break(allteachers+allstudentsnotavailable)
Itmighthappenthatteachers,studentsorroomsarenotavailable.
Thisconstraintsmusthaveweight100%.
IfateacherorstudenthasconstraintNotavailable,thenthis"free"periodmightbeagap.Sothink
twiceifyoualsouseconstraintsthatcountgaps.InsteadofusingconstraintNotavailabletoateacher
orstudentyoucanalsoaddapseudoactivityanduseconstraintAnactivityhasapreferredstarting
time.Apseudoactivitywillnotcountedasgap.
AteacheristeachingatanotherschoolonWednesdayandThursday.
AddconstraintAteacherisnotavailable.
YoucanalsouseapseudoactivitywithconstraintAnactivityhasapreferredstartingtime(compare
nextexample).
AstudentssethasindustrialplacementatanotherinstitutiononMondayperiod1and2.
Variant1:AddconstraintAstudentssetisnotavailable.Inthestudentstimetableisonly
displayed.
Variant2:Addanactivitywithsubjectindustrialplacement,noteacher,duration2andthe
correspondingstudentsset.AddaconstraintAnactivityhasapreferredstartingtimeforthisactivity
onMonday1stperiod.Nowthestudentstimetablelookssweeter,butbecarefulthatallother
constraintsstillcanberespected.
http://timetabling.de/manual/FET-manual.en.html
13/32
6/21/2015
Thegymissharedwithanotherschool.
Talkwiththetimetablemakeroftheotherschoolandcometoanarrangementwhocanusethegym
atwhichperiod.Addconstraint(s)Aroomisnotavailable.
Constraintbreakisaeasywaytosaythatallteachersandstudentsarenotavailable.
Theactivitiesofafulltimeschool(alldayschool)areinthemorningandintheevening.Butthey
mustnotbeatFridayevening.
AddconstraintBreak(allteachers+allstudentsnotavailable)todefineFridayeveningperiodsas
break.
Studentsandteachersalwayshavelunchatperiod7.
AddconstraintBreak(allteachers+allstudentsnotavailable)ateverydayperiod7.Butthisisonly
acosmeticuse.Maybeit'sbettertojustnotenterperiod7inthedataperiodsperday.
Studentsandteachershavelunchatperiod7or8.
Addaactivitytoeverygroupofthefirstcategorywithsubjectlunch,noteacher,duration1,splitthis
activityintoasmanyactivitiesasthestudentsareworkingperweekandincreaseweightof
constraintMinndaysbetweenasetofactivitiesupto100%.Doitsimilartoeveryteacher.Be
careful,becauseateachermaybeworklessdays.AddconstraintAnactivityhasasetofpreferred
timesandsetperiod7and8arepreferdateverydaywithweight100%.Becarefulifyouuse
constraintMinhoursdaily,becauseactivitylunchisa"normal"activitytoFET.
Minndaysbetweenasetofactivities
Tableofcontents
Thisconstraintis:
Timeconstraints(activities)Minndaysbetweenasetofactivities
ReadalsosectionAddanactivity.
Asetofactivitiesshouldbeinstructedondifferentdays,buttheymustnotinstructedondifferent
days.
AddconstraintMinndaysbetweenasetofactivitieswithweightunder100%.(Thisisdone
automaticallyifyouaddanactivity).Soinfavouredcaseallactivitiesareinstructedatdifferent
days.Inworstcaseallconstraintsareinstructedatonlyoneday.
Asetofactivitiesshouldbeinstructedondifferentdays,buttheymustnotinstructedondifferent
days.Butiftheyareinstructed,thentheymustbeinstructedconsecutive.
AddconstraintMinndaysbetweenasetofactivities(Thisisdoneautomaticallyifyouaddan
activity)andchecktheforceconsecutivebox.Soinfavouredcaseallactivitiesareinstructedat
differentdays.Maximum2activitiescanbesetconsecutiveatasingledaybythisconstraint.Soitis
notpossiblethat3splittedactivitiesareinstructedatonlyoneday.Inworstcaseyouhave2splitted
activitiesconsecutiveat2differentdays.
Becarefulifpupilshave(nearly)no
course
subject(duration)
unusedperiodintheirtimetable.
naturescience biology(2),chemistry(2),physics(2)
Timetablesmightbecameimpossibleto
industrialart
industrialart(6)
solve,becausein100%filledtimetables
foreignlanguage
French(4),Latin(2)
activitiesofthesamecourses(category)
arescheduledsimultaneously.
Ifthebiologyteacherwantgetonly1activitywithduration2,thenthechemistryandphysicsteacher
mustbothalsogetonly1activitywithduration2orbothmustget2activitieswithduration1.
Iftheindustrialartteacherwanttohave3activitieswithduration2,buttheFrenchteacherwantto
have4activitieswithduration1,thenthetimetableisimpossibletosolve.
http://timetabling.de/manual/FET-manual.en.html
14/32
6/21/2015
Bothteachershavegoodreasonswhytheyneedduration1or2consecutive.Frenchisaintellectual
subjectand4activitieswithduration1atdifferentdayswillhaveamuchbetterlearningprogress.
Industrialartisatechnicalsubjectanditisbettertoworkataprojectwithoutmanyinterrupts.
Sothinkaboutconflictslikethisasearlyaspossible.Talktotheteachers,explaintheproblemand
findanagreement.Amaybesolutionisthis:TheFrenchteacherget4activitieswithduration1and
100%weightofconstraintMinndays.Thismeanthetheindustrialartteacher"only"getaactivity
thatissplitedinto4parts(twowithduration2andtwowithduration1).Inthestrictsensethis
activitydoesn'tneedaconstraintMinndaysbetween,becausetheMinndaysconstraintofthe
Frenchactivityalreadycareaboutthat.FETalsocareaboutthatLatinisdirectlyinstructedbeforeor
afterFrench,becauseindustrialartneedduration2.Alsohavealookatthenaturesciencenow.
Thisalsomeanitisimpossiblethatallsubjectshaveonly1activitywithduration2.Ifphysicsand
Latinisinstructedbythesameteacherthenphysicscanneverhave2periodsconsecutive.Ifphysics
andFrenchisinstructedbythesameteacher,thennonaturesciencecanhave2periodsconsecutive.
IfyoudoyourcoverplaningyoumustalsocarefullythinkaboutconstraintMinndaysbetweenaset
ofactivities(Normallynotintheclasses(category1),butinthecourses(category2andabove)).
max&minperiodsperday
Tableofcontents
Themax&minperiodsperdayconstraintsare:
Timeconstraints(teachers)Maxhoursdailyforateacher
Timeconstraints(teachers)Maxhoursdailyforallteachers
Timeconstraints(teachers)Minhoursdailyforateacher
Timeconstraints(teachers)Minhoursdailyforallteachers
Timeconstraints(students)Maxhoursdailyforastudentsset
Timeconstraints(students)Maxhoursdailyforallstudents
Timeconstraints(students)Minhoursdailyforastudentsset
Timeconstraints(students)Minhoursdailyforallstudents
Constraintsmaxandminperiodsperdayforstudentsareusefulifyouwantabalancedday.
Yourtimetablehas5daysperweekand6hoursperday,sothereareoverall30
activities
periodsperweek.Thestudentshavedifferentnumberofactivities(periods)per Group perweek
week.
1A,1B 20,19
Sowithoutanyconstraintitmighthappenthatgroup1Bhave6periodson
2A,2B 21,20
MondaytoWednesday,1periodonThursdayandnoperiodonFriday.
3A,3B 25,24
Studentsinyear1and2can'tconcentrateverylong,soitusefultolimitmax
hoursdaily.AddconstraintMaxhoursdailyforastudentssetwithmaximum4 4A,4B 30,29
periodsand100%toyear1.Youcan'taddthisconstraintstotheotheryears,becausethetimetable
willnotsolvableifyouadd.(Youcanmaybeaddittotheotheryearswithadifferentweight.)
AddconstraintMaxhoursdailyforastudentssetwithmaximum5periodsand100%toyear2.You
can'taddthisconstraintstoyears3and4.
Youdon'tneedtoaddconstraintMaxhoursdailyforallstudentswithmaximum6periodsand100%
toyear3and4,becauseyourtimetablehaveonly6periodsperday.
Youdon'tneedtoaddconstraintMinhoursdailyforastudentssettogroup4Aand4B,becauseit
doesn'tmakesense.
YoucanaddconstraintMinhoursdailyforastudentssetwithminimum5periodsperiodstogroup
3A,butmaybethisistodifficult.Youcan'taddthisconstrainttogroup3B.SoIrecommendtoadda
minimumof4periodsperdaytoyear3.
It'smaybeusefulifyear2getminimum4periodsperweek.
YoucanaddconstraintMinhoursdailyforastudentssetwithminimum4periodsperiodstogroup
1A,butmaybethisistodifficult.Youcan'taddthisconstrainttogroup1B.SoIrecommendtoadda
minimumof3periodsperdaytoyear1.
http://timetabling.de/manual/FET-manual.en.html
15/32
6/21/2015
Insteadofusingmaxperiodsperdayyoucanusepreferredtime(s).It'snotthesame(it'sonlythe
sameifyoualsouseconstraintnogapsandstudentsearly),butverysimilar,fasterand(maybe)a
littlebitmorepowerful.
Youcandoitsimilartoteachers,butthinkalwaystwice.Inmyopinionthemaxperiodsperday
constraintisonlyusefulifyourinstitutionshasmanyperiodsperday.
Theminperiodsdailyconstraintforateacheris(inmyopinion)notalwaysuseful.Beforeusingthis
constraintsyoushoulddothis:Useconstraintmaxperiodsperdaytogetamorebalancedtimetable.
Thinkaboutusingconstraintmaxdaysperweekforeverysingleteacher.It'smaybemuchbetter,
becauseithasarougheffectandtheteacherdon'tneedtodrivetotheinstitution.
Inmanyschoolsitisnotallowedthatactivitiesareomitted.Ifimpededteachersmustberepresented
byotherteachersyoumightgetbigtroubleifyouaddtomanyminperiodsdailyconstraintfor
teachers,becausetheremightbenotenoughteacherstocoveractivities.Pleasereadchapter
Teachers'FreePeriods.
BecarefulwithMinhoursdailyforallteachersconstraints.Thetimetableisnotsolveable,ifyouset
thisconstraintwithvalue2butatthesametimeyouhaveateacherthatonlyteachs1periodinthe
wholeweek.
Variant1:YouneedtoaddconstraintsMinhoursdailyforateachertoallotherinsteadofconstraint
Minhoursdailyforallteachers.
Variant2:Addapseudoactivitytotheproblematicteacher(Anactivitywiththeteachername,but
withoutastudents).Becarefullifyouhaveteacherhomeroomconstraints.
Tableofcontents
maxdaysperweek
Themaxdaysperweekconstraintsis:
Timeconstraints(teachers)Maxdaysperweekforateacher
Ofcourseifthecontractofemploymentguaranteeamaxnumberofdaysperweek,thenthisisan
importantconstraint.
Atimetableisnotsolvableifyouaddconstraintmaxdaysperweekwithonly3daysandweight
100%ifthesameteacherinstructasetof4ormoreactivitiesthathaveconstraintMinndays
betweenasetofactivitieswithweight100%.Becareful!Mostactivitieshavethisconstraint
(compareAddanactivity).
Irecommendtocheckthisconstraintagainafterallotherconstraintareadded,mostofthemalready
haveweight100%andFETisstillabletofindasolution.
Mostteacherlikeafreeday.Checktheteacherstatistics.Checkifateacherisableto(maybe)getfree
day.Sothenumberofperiodsperdayoftheteachermustbelowerorequalthenthenumberof
periodsperweekofthetimetableminusthenumberofperiodsperday.Alsocheckifalowernumber
ofworkingdaysdoesn'tcontroverttoaconstraint(especiallyaconstraintMinndaysbetweenasetof
activities).AddconstraintMaxdaysperweekforateacherwithweight100%ifnothingargueagainst
it.Don'taddtomanyconstraintatonetime.Maybebeginwiththeteacherthatinstructthelowest
numberofperiodsperweek.Checkifthetimetableisstillsolvable.Addthenextteacherifitisstill
solvable.Removetheconstraintifthetimetableisnotsolvableandtrytoaddthefollowingteacher.
Inmanyschoolsitisnotallowedthatactivitiesareomitted.Ifimpededteachersmustberepresented
byotherteachersyoumightgetbigtroubleifyouaddtomanyfreedays,becausetheremightbenot
enoughteacherstocoveractivities.PleasereadchapterTeachers'FreePeriods.
Ifyouneedconstraintlikemaxdaysperweekforstudentssetjustaddanactivitywiththestudents
http://timetabling.de/manual/FET-manual.en.html
16/32
6/21/2015
set,subjectfree,noteacherandthenumberofperiodsperdayofyourtimetableasduration.
Ifyouneedconstraintlikemaxdaysperweekforstudentssetyoucanthinkabouteffectingsimilar
withconstraintMinhoursdailyforastudentsset.
Ifyouneedconstraintlikemaxdaysperweekforallteachersyoucanthinkabouteffectingsimilar
withconstraintMinhoursdailyforallteachers.
Gaps
Tableofcontents
Themaxgapsconstraintsare:
Timeconstraints(teachers)Maxgapsperweekforateacher
Timeconstraints(teachers)Maxgapsperweekforallteachers
Timeconstraints(teachers)Maxgapsperdayforateacher
Timeconstraints(teachers)Maxgapsperdayforallteachers
Timeconstraints(students)Maxgapsperweekforastudentsset
Timeconstraints(students)Maxgapsperweekforallstudents
Agapisanunusedtimeslot(orseveral)betweentwoactivities,betweenanactivity&abreakor
betweentwobreaks.
Thatmeanforexampleunusedtimeslotsinthefirstandlastperiodarenogapsabreakisnotagap.
Thelawofmanycountriesrulethatstudentsofprimaryandsecondaryschoolsdon'thaveagap.
AddconstraintMaxgapsperweekforallstudentswithvalue0andweight100%.
Theupperyearsareallowedtohavegaps,butnottheloweryears.
AddconstraintMaxgapsperweekforastudentssetwithvalue0andweight100%tothelower
years.
Aupperyearsareallowedtohavemaximumonegapperweek.
AddconstraintMaxgapsperweekforastudentssetwithvalue1andweight100%totheupper
years.
Alsotheteacherlikeaslessgapsaspossible.
TheeasiestwaytodoitistouseconstraintMaxgapsperweekforallteachers.
Useweight100%andstartwithahighMaxgapsperweekforallteachersvalue.Trytosolvethe
timetableanddecreasethevaluestepbystep.
Inmanyschoolsitisnotallowedthatactivitiesareomitted.Ifimpededteachersmustberepresented
byotherteachersyoumightgetbigtroubleifyouaddto"good"gapconstraints,becausetheremight
benotenoughteacherstocoveractivities.PleasereadchapterTeachers'FreePeriods.
ItsoundfairifyouuseMaxgapsperweekforallteachersinsteadofdifferentvaluestoeverysingle
teacherbyconstraintMaxgapsperweekforateacher.Butyoumightthinkoverhasted.For
examplethechefandit'sdeputyalwayshavemuchpaperworkintheoffice.Sotheydon'thavereally
gaps,theycanexpedientusethis"gaps".Alsotraineeteachersdon'thavereallygaps,becausethey
alsohavetoobserveactivitiesfromotherteachers.Thetimetablemightbesolvableifafewteachers
haveahighermaxgapsperweekvalue.
MaybeFETcansolvethetimetableifallteachershavemaximum2gapsperweek,butitcan'tsolve
thetimetableifallteachershavemaximum1gapperweek.Maybeit'sfairifallteachersthathave
freedaysgetaconstraintmaxgaps2andallteachersthatareworkingeverydaygettheconstraint
maxgap1.
http://timetabling.de/manual/FET-manual.en.html
17/32
6/21/2015
Don'tforgetateacherifyouuseconstraintMaxgapsperweekforateacherinsteadofMaxgapsper
weekforallteachers.
Mostteachershouldhavemaxgap3andonlyafewoneshouldhave2(oralowervalue).
AddconstraintMaxgapsperweekforallteacherswithvalue3andweight100%.Addconstraint
Maxgapsperweekforateacherwithvalue2(orlower)andweight100%toeveryteacherthat
shouldhavethelowervalue.
Mostteachershouldhavemaxgap2andonlyafewoneshouldhave3(orahighervalue).
Youcannotdoitlikeinthepreviousexample,becausealwaysthelowestvaluehashighestpriority.
AddconstraintMaxgapsperweekforallteachers.Addaactivitieswithsubjectgap(orthereason)
andduration1toeverysingleteacherthatshouldhavemoregaps.Becarefullifyouhaveteacher
homeroomconstraints.
Youaddedconstraintmax2gapperweekforallteachers.Butsometeachershavebothgaps
consecutiveatasingledayandyoudon'tlikethat.
AddconstraintMax1gapperdayforallteachersatthesametime.
Ineedacontraintlikemingapsperweek.
Thereisnominngapsperweekconstraint.Butthereare2constraintsthatnearlydothesame..
Variant1:UseconstraintMaxhourscontinuously.
Variant2:Pleasereadpreviousexamplesagain.Inshort:Addpseudoactivitiesandmaybealsouse
constraintpreferredtimes.
Maxhourscontinuously
Tableofcontents
Themaxhourscontinuouslyconstraintsare:
Timeconstraints(teachers)Maxhourscontinuouslyforateacher
Timeconstraints(teachers)Maxhourscontinuouslyallteachers
Timeconstraints(students)Maxhourscontinuouslyastudentsset
Timeconstraints(students)Maxhourscontinuouslyforallstudents
Thisconstraintscanbeusedtoaffecttheminimumnumberofgapsperday.Ifsomeonegeta
constraintMaxhourscontinuouslywithvalue4,thenitmeanhewillneverteachermorethen3hours
continuously.Soifhework4hoursperday,thenhewillgetatleast1gap.Ifhework7hoursaday,
thenhewillgetatleast2gaps.
studentsearly
Tableofcontents
Thestudentsearlyconstraintsare:
Timeconstraints(students)Astudentssetbeginsearly
Timeconstraints(students)Allstudentsbeginearly
Astudentsdaywillalwaysstartinthefirstperiodwithanactivityifyouusethisconstraint(except
youalsousedaconstraintlikeinsectionNotavailableteachers,studentsorrooms&breaksinthe
firstperiod).
Moststudentscometoschoolbybus.Butitarriveonlyatthefirstperiodandstudentsarenot
allowedtohavegaps.
AddconstraintAllstudentsbeginearlywithweight100%.
Moststudentscometoschoolbybus,itarriveonlyatthefirstperiod.Theloweryearsarenot
allowedtohavegaps.Buttheupperyearsareallowedtohavegaps.
AddconstraintAstudentssetbeginsearlytotheloweryearswithweight100%.
http://timetabling.de/manual/FET-manual.en.html
18/32
6/21/2015
Moststudentscometoschoolbybus,itarriveonlyatthefirstperiodandstudentsarenotallowedto
havegaps.Thebusbringthembackonlyafterfourth,fifthandsixth(last)period.
AddconstraintAllstudentsbeginearlywithweight100%.AddconstraintMinhoursdailyforall
studentswithvalue4andweight100%.
activityendsday
Tableofcontents
Theactivityendsdayconstraintsare:
Timeconstraints(activities)Anactivityendsstudentsday
Timeconstraints(activities)Asetofactivitiesendsstudentsday
Thisconstraintisveryimportantifstudentshaveconstraintnogapsandnotallstudentsofangroup
(orseveralgroups)visitthisactivity.Alsofortnightlyactivitiesmaybeneedthisconstraint.
Theschoolofferremedialeducationtothestudentsofanyear.Sonoteverystudentsneedtovisit
thisactivity.Butyoudon'twanttoaddanewcategory,becauseyouaretolazyorpupilshave
(nearly)nounusedperiodintheirtimetable.
Therearetwovariants:
Variant1:Addanactivitywithsubjectofremedialeducation,addthecorrectteacher,durationand
theyear(insteadofthisyoucanalsoaddallgroups,butitdoesn'tlooksofineintheprinted
timetable).AddconstraintAnactivityendsstudentsdaythisactivity.
Variant2:Ifyouhaveseveralactivitiesthatmustendastudentsdayandthatactivitieshavean
commonattribute(forexampleaspeacialsubject),thenyoucanuseconstraintAsetofactivitiesends
studentsdaytoselectseveralactivitieswithasingleconstraint.
Ifyouneedactivitystartsday,thenuseAnactivityhasasetofpreferredtimesandchooseevery1st
periodaspossibletime.
2activitiesareconsecutive
Tableofcontents
The2activitiesareconsecutiveconstraintis:
Timeconstraints(activities)2activitiesareconsecutive
Constraintconsecutivemeanthattheseactivitiesarescheduledatthesamedaywithoutanygap,break
oranotheractivitybetweenthem.
Studentshavesubjectsmathematicslisteningfirstanddirectlyafterthisactivitytheyshouldhave
mathematicspractisebyanotherteacher.
Addconstraint2activitiesareconsecutivetotheseactivities.
2activitiesareordered
Tableofcontents
The2activitiesareorderedconstraintis:
Timeconstraints(activities)2activitiesareordered
Constraintorderedmeanthatthefirstactivitymustbescheduledbeforethesecondactivitiy.
Studentshavesubjectsmathematicslisteningandmathematicspractise.Oflisteningshouldbebefore
practise.
Addconstraint2activitiesareorderedtotheseactivities.SoiflistiningisonWendesday3thperiod,
thenpractisewillbelaterinthatweek.
Becarefulwiththisconstraint,becauseitisveryrestrictthetimetableverymuch.
http://timetabling.de/manual/FET-manual.en.html
19/32
6/21/2015
Inmyopinionthisconstraintsoundsnice,butensnaretoanunhelpfuluse.
Ifyouordertwoactivities,thenitmighthappenthatlistiningisonMondayandthepractiseison
Tuesday.Soundscorrectandmaybealsosoundlikethisisneeded,butthinkmorecarefully.What
happeniftheactivityonTuesdaydoesn'ttakeplacebecauseofillteacher,illstudents,holiday,field
day,schooltriporotherreasons.The"needed"orderisconfused.Itisnearlyimpossibletokeepsuch
anorderthewholeyear.Sowhyaddingsuchanstrictconstraintifyoucan'tkeeptheorderoverthe
wholeyear?Justbecauseofthefirstweek?Inmyopinionthatisnonsense.Evenifthefirstweek
startwithanpractiselessonthatrealydoesn'tmatter.Youhaveenoughotherthingstodointhefirst
lesson(Gettoknowyourstudents,checktheirpreviousknowledge,giveanoverviewabouttheyear
ormaybejustdoalistinglesson.).
SoinmyopinionthisconstraintshouldbeonlyusedifyoualsouseaconstraintAsetofactivities
hassamestartingday(anyhours)tothatactivities.
Mingaps(hours)betweenasetofactivities
Tableofcontents
TheMingaps(hours)betweenasetofactivitiesconstraintis:
Timeconstraints(activities)Mingaps(hours)betweenasetofactivities
ConstraintMingaps(hours)betweenasetofactivitiesmeanthatthereareaminimumnumberof
periodsbetween2activities.Sothisconstraintissomethingliketheoppositeofconstraint
consecutive.
Workinginanhourlyintervalmaxdaysperweek
Tableofcontents
TheWorkinginanhourlyintervalmaxdaysperweekconstraintsare:
Timeconstraints(teachers)Ateacherworksinanhourlyintervalmaxdaysperweek
Timeconstraints(teachers)Allteachersworksinanhourlyintervalmaxdaysperweek
...
preferredtime(s)
Tableofcontents
Thepreferredtime(s)constraintsare:
Timeconstraints(activities)Anactivityhasapreferredstartingtime
Timeconstraints(activities)Anactivityhasasetofpreferredtimeslots
Timeconstraints(activities)Asetofactivitieshasasetofpreferredtimeslots
Timeconstraints(activities)Asetofsubactivitieshasasetofpreferredtimeslots
Timeconstraints(activities)Anactivityhasasetofpreferredstartingtimes
Timeconstraints(activities)Asetofactivitieshasasetofpreferredstartingtimes
Timeconstraints(activities)Asetofsubactivitieshasasetofpreferredstartingtimes
Preferredtimesareverypowerfulandfundamentalconstraints,youcannearlydoeverythingwith
them.EspeciallyconstraintAsetof(sub)activitieshasasetofpreferredtimesisveryhelpful
(comparenextexample).Itcancareaboutactivitieswiththesameteacher,thesamestudents,the
samesubjectorthesameactivitytag.
Whatisthedifferencebetweenpreferredtimeslotandpreferredstarting
time?
Thereisnodifferenceifthecorrespondingactivitieshaveduration1.
Thereareonlydifferencesifdurationis2ormore.
Havealookattherightexample.
Anactivitywithduration2canbestartatperiod1and2ifyouuse
constraintpreferredtimeslot.
http://timetabling.de/manual/FET-manual.en.html
1stPeriod allowed
2ndPeriod allowed
3thPeriod allowed
4thPeriod notallowed
5thPeriod allowed
6thPeriod notallowed
20/32
6/21/2015
Butanactivitywithduration2canstartatperiod1,2,3and5ifyouuseconstraintpreferredstarting
time.
Themainsubjects(oftenthenativelanguage,aforeignlanguage,mathematics)areinstructedina
Germansecondaryschool4timesperweek.Itmighthappen,thatastudentssethasamainsubject
alwaysinthelastperiod.Thatisprettybadbecausethestudentsarealreadytiredandcan'tlearnas
goodasinearlierperiods.
AddconstraintAsetofsubactivityhasasetofpreferredtimes.Seletctcomponentnumber1.Selecta
mainsubject.Selectactivitypreferdtimesperiods1to4.Addthatconstraint.Repeatitonemore
time,justwithcomponentnumber2.Bythisconstraintsitcan'thappenthatallactivitiesare
instructedatperiod5orlater.Therearenowatleast2activitiesinthe4thperiodorbefore.
Nowtheteachercaninstructnewthingsorwritetestsinactivitiesthathaveaearlierperiodandjust
dopracticeinactivitiesthatarescheduledlater.
AsalwaysIprefertouse100%weight.Ifthisconstraintistodifficult,thenmaybejustdoitwiththe
firstcomponent.Ifthetimetableisstilltoeasytosolveyoucanmaybealsodoitwiththe3th
componentorwithperiods1to3.
Butbecareful.Someactivitiesstillmustbeabletoschedulelate!Soyoushouldn'tuseconstraintA
setofactivityhasasetofpreferredtimestodothis.
Ofcoursedon'tdothiswithallsubjects,becausesomesubjectscan/mustbescheduledlate.
Anexternalteachercomeataspecialperiodtoyourschool.
UseAnactivityhasapreferredstartingtime.
AllstudentsshouldbeabletocelebrateMassinthefirstPeriodexceptFriday.
AddanactivitytoeveryyearwithsubjectMassandthepriestasteacher.UseAnactivityhasasetof
preferredtimes.Selectcorrespondingactivitiesandselectthefirstperiodsaspreferredtimes.
Activitieswithduration2must(orshould)startonlyinoddperiods(1st,3th,5th,...).
UseoddasactivitytagandaddaconstraintAsetofactivitieshasasetofpreferredstartingtimesto
all1st,3thand5thperiods.Don'tuseconstraintAsetofactivitieshasasetofpreferredtimeslotsto
effectthis,becausethatmeanactivitieswithduration2ormorecannotbeplaced!
Activitiesmust(orshould)beinstructedonlyinthemorning(orintheevening).
Usemorning(orevening)asactivitytagandaddtobothactivitytagsaconstraintAsetofactivities
hasasetofpreferredtimes.
Samestartingtime
Tableofcontents
Thesamestartingtimeconstraintsare:
Timeconstraints(activities)Asetofactivitieshassamestartingtime(day+hour)
Timeconstraints(activities)Asetofactivitieshassamestartingday(anyhour)
Timeconstraints(activities)Asetofactivitieshassamestartinghour(anydays)
EverysingleyearshouldbeabletocelebrateMassinthefirstPeriod.
AddaactivitytoeveryyearwithsubjectMassandthepriestasteacher.AddconstraintAsetof
activitieshassamestartinghour(anydays)orAsetofactivitieshasasetofpreferredtimes.Select
correspondingsubjectorpriestandchoosethefirstperiodsaspreferredtimes.
Intheeasierwayyoudon'tneedconstraintAsetofactivitieshassamestartingtime(day+hour).Just
moveallneededteachersandstudentsinoneactivity.Butbythistheygetonlyoneroom.Butthere
areatleast3needfulexamples:
Intheclassesaremaleandfemalestudents.Youmaybewanttoschedulesportseparatedbygirlsand
boys.Ofcourseyoucandoitbyusinganewcategory.Butin(nearly)100%filledtimetablesthis
http://timetabling.de/manual/FET-manual.en.html
21/32
6/21/2015
meanthattheymusthavesportsimultaneously.
Ifthefirstactivityissubjectsport,teacher1andgroup10A,thesecondactivityissubjectsport,
teacher2andgroup10B.AddconstraintAsetofactivitieshassamestartingtime(day+hour)tothis
toactivities.Nowteacher1caninstructallboysofgroup10Aand10Bteacher2caninstructallgirl
ofthisgroups.
Thisworkwellifthenumberofgroups/classesisnotoddinayear.Ifthenumberofgroupsisodd,
thenjustconnecttoclassesoftwodifferentyearstogether(maybe10Cand9C).
Thenativelanguageteacheristeaching4periodsperweekinagroup.Butat1outofthe4periods
anotherteacheristeamteaching.Soyoucan'tjustaddthisteachertotheactivity,becauseinthe
other3periodsheshouldteachsomewhereelse.
Variant1:Addanpseudoactivity.Thisactivityjustincludetheteamteachingteacher.Nowadd
constraintAsetofactivitieshassamestartingtime(day+hour)withthepseudoactivityandoneout
ofthefournativelanguageactivities.Youneedtounchecktheblockcheckboxtoseeasingle
activities.Ifyouhaveteacherhomeroomsthisvariantmeantworoomsalockedfortheteam
teachingactivity.
Variant2:Addoneactivitywithbothteachersandduration1.Addasecondactivitywiththenative
languageteacherandtotalduration3.AddthefirstsingleactivityintotheautomaticgeneratedMinn
daysconstraintofthelastactivities.
Studentshavesubjectsmathematicslisteningfirstanddirectlyafterthisactivitytheyshouldhave
mathematicspractisebyanotherteacher.
Addconstraint2activitiesareconsecutivetotheseactivities.
Notoverlapping
Tableofcontents
Thenotoverlappingconstraintis:
Timeconstraints(activities)Asetofactivitiesarenotoverlapping
Activitieswithsameteacherorsamestudentsorsameroomareneveroverlappingbydefault.
(compareBasiccompulsorytimeandroomconstraints).Sothisconstraintisonlyneededinvery
specialsituations.
Thereare2veryimportantguyswithaspecialskill.Youknowthatoneofthemissometimesaway
(orill)andtheotherguyneedtorepresenttheother.Ofcoursethatisonlypossibleifhehaveno
activityatthesametime.
UseconstraintAsetofactivitiesarenotoverlapping.
Homeroom(s)
Tableofcontents
Thehomeroomsconstraintsare:
Spaceconstraints(teachers)Ateacherhasahomeroom
Spaceconstraints(teachers)Ateacherhasasetofhomerooms
Spaceconstraints(students)Asetofstudentshasahomeroom
Spaceconstraints(students)Asetofstudentshasasetofhomerooms
Homeroomsarethedefaultrooms.TheyareallocatedifthereisnoPreferredroom(s)constraint.
Manyinstitutionshavehomeroomstogroupsorteachers.Youdon'tneedtoaddhomeroom
constraintsifeverygroup(orteacher)haveit'sownhomeroom.Soyoudon'tneedtoaddhomeroom
constraintsbecauseyoualreadyknowthattherewillneverbeaconflict.Addhomeroomsconstraints
onlyifsomegroups(orteachers)shareroomsorifyouwanttodisplaythemintothetimetable.
FETdidn'tallocateahomeroomifaactivitycontainmorethen2teachersorstudentssets.Usea
http://timetabling.de/manual/FET-manual.en.html
22/32
6/21/2015
Preferredroom(s)constraintforthatactivitiesifyouneedtoallocatearoom.
Don'tuseteachershomeroomconstraintsandstudentshomeroomconstraintsatthesametime.
Readchapterpreferdroomsbeforeyouaddhomerooms.
Everyteachershouldgethisownhomeroom.Sadlytherearemoreteachersthenroomsatthe
institution.
Yourinstitutioninstruct6periodsperdayat5daysaweek.Sotheinstitutionhas30periodsper
week.Nowcountthenumberofperiodsthateveryteacherisworkinginhishomeroom.Youwillsee
thatsometeacherworkmanyhoursintheirhomeroom.Buttherewillalsobeteacherthatworkless
hoursintheirhomeroom.Notonlybecausetheyarehalftimeteachers,alsobecausetheymaybejust
teachmathinthehomeroombutphysicinthelab.Someteacherevendon'tneedahomeroom,
becausetheyteachonlyinspecialrooms.Nowcountthenumberofteachersthatneedhomerooms
maybeyoualreadyhaveenoughrooms.Ifnotyouneedtochecktwovariants:
Variant1:Checkif2(ormore)teachercanshareahomeroom.Sothenumberofteachingperiods
fromallteachersthatshareasingleroomcanbemaximumthenumberofperiodsperweekofthe
institution.Addthesameroomtoallteachersthatshouldshareasingleroom(constraintAteacher
hasahomeroom).
Variant2:Maybeyouhavebadluckandtherearenoteachersthatcanshareasingleroom.Inthat
caseone(orsome)teacherneedtwo(ormore)homerooms(constraintAteacherhasasetofhome
rooms).BeforeusingthisconstraintyoushouldthinkaboutusingconstraintAnactivityhasa
preferredroomtoactivitiesofthatteacher.
Youcountedthenumberofhomeroomperiodsofeveryteacherandwrotedownalistofteacherthat
couldshareahomeroom.Butwhichteachersshouldshareasinglehomeroom?
Checkifteachersthatinstructinthesamespecialroomcanshareahomeroom.Forexampleteacher
T1instructmathandphysicsandteacherT2instructhistoryandphysics.Physicsisinstructedinthe
lab.Mathandhistoryisinstructedinthehomeroom.SoifteacherT1instructphysics,thenthelabis
usedbyT1.SoT2willneverbeabletoinstructphysicsatthesametimeasT1,butthatalsomean
thehomeroomofT1isfreeandT2canusethathomeroom.
BecarefulifyoushareaspecialroomwithanotherinstitutionandsoyoualsouseAroomisnot
availableatthesametime.Forexampleyouhaveahughgymthathas3roombutyoucan'tuseit
everydaybecausealsoanotherschooluseit.TeacherT3instructmathandsportsandteacherT4
instructhistoryandsports.Sothisteacherscanmaybenevershareahomeroom,becausetheymust
usethegymatthesametime.
Sometimes(especiallyifyoujustneedthelastlinkof2teachers)it'sthebestiftheteacherswiththe
lowestnumberofhomeroomperiodssharearoom.
Preferredroom(s)
Tableofcontents
Thesamestartingtimeconstraintsare:
Spaceconstraints(subject)Asubjecthasapreferredroom
Spaceconstraints(subject)Asubjecthasasetofpreferredrooms
Spaceconstraints(subject+activity)Asubject+activitytaghaveapreferredroom
Spaceconstraints(subject+activity)Asubject+activitytaghaveasetofpreferredrooms
Spaceconstraints(activity)Anactivityhasapreferredroom
Spaceconstraints(activity)Anactivityhasasetofpreferredrooms
Preferdroomconstraintshaveahigherprioritythenhomeroomconstraints.Thisconstraintsare
normallyusedforspecialrooms.
http://timetabling.de/manual/FET-manual.en.html
23/32
6/21/2015
Subjectchemistrymustalwaysbeinstructedinthechemistrylab.
AddconstraintAsubjecthasapreferredroomifyouhavejustonechemistryroom.
AddconstraintAsubjecthasasetofpreferredroomsifyouhaveseveralchemistryrooms.
Subjectphysicsmustalwaysbeinstructedinphysicslab,butifphysicslabisalreadyoccupieditis
allowedtobeinstructedinthechemistrylab.
Thisexampleissadlynotpossible,butverysimilarconstraintispossible:Subjectphysicsmust
alwaysbeinstructedinphysicslaborchemistrylab.
AddAsubjecthasasetofpreferredrooms.
Soitmighthappenthatphysicsisinstructedinchemistrylabeventhephysicsroomisfree.Soplease
checkyourselfifthishappenandmanuallycorrectit.
Subjectbiologymustalwaysbeinstructedinbiologylabinyear7to10,butmustnotbeinstructed
inyear5and6.
Setactivitytagroomneededtoallbiologyactivitiesofyear7to10.AddconstraintA
subject+activitytaghaveapreferredroomwithweight100%.AddconstraintAsubjecthasa
preferredroomwithweightunder100%.
Youneedtoallocateseveralroomsforasingleactivity.
Adddummyactivitieswitha(dummy)subject,maybeadummyteacherandwithoutastudentsset.
AddconstraintAsetofactivitieshassamestartingtime(day+hour)toconnectdummyactivities
withtheotheractivity.Youdon'tneedthedummyteacher,butitmaybehelpyoucheckingthe
timetable.Don'tforgetthatthisdummyteachermaybeinfringeuponotherconstraints(especially
gapsconstraints)Addroomconstraintstothedummyactivities.
Youhaveagymthatcanbeseparatedinto3parts.Sometime3verylargegroupsaretogetherinthe
gymandit'salittlebittofullinthegym.Youcan'tremovearoom,becausesometimesmustbe3
groupsinthegym.
Therearetwodifferentvariantstosolvethisproblem.Bothareverysimilar,butdependingonyour
exactdatasetoneofthemis(maybe)muchbetterand/oreasiertoenter:
Variant1:Writedownallverylargegroups.Adddummyactivitieswithsubjectsport,dummy
teacherandwithoutastudentsset.AddconstraintAsetofactivitieshassamestartingtime
(day+hour)toconnectadummyactivitywithtwolargesportactivities.Youdon'tneedthedummy
teacher,butitmaybehelpyoucheckingthetimetable.Don'tforgetthatthisdummyteachermaybe
infringeuponotherconstraints(especiallygapsconstraints)
Variant2:Writedownallsmallestgroups.AddAsetofactivitieshassamestartingtime(day+hour)
toconnect3smallsportactivitygroupstogether.
Anactivityissplittedinto4activitiesperweek.Onlyoneoftheseactivitiesneedthecomputerlab
andnotthehomeroom.
JustaddtheactivityasnormalanduseconstraintAnactivityhasapreferredroomtoone(sub)
activity
Buildings
Tableofcontents
Thebuildingsconstraintsare:
Spaceconstraints(teachers)Maxbuildingchangesperdayforateacher
Spaceconstraints(teachers)Maxbuildingchangesperdayforallteachers
Spaceconstraints(teachers)Maxbuildingchangesperweekforateacher
Spaceconstraints(teachers)Maxbuildingchangesperweekforallteachers
Spaceconstraints(teachers)Mingapsbetweenbuildingchangesforateacher
Spaceconstraints(teachers)Mingapsbetweenbuildingchangesforallteachers
Spaceconstraints(students)Maxbuildingchangesperdayforasetofstudents
Spaceconstraints(students)Maxbuildingchangesperdayforallstudents
http://timetabling.de/manual/FET-manual.en.html
24/32
6/21/2015
Spaceconstraints(students)Maxbuildingchangesperweekforasetofstudents
Spaceconstraints(students)Maxbuildingchangesperweekforallstudents
Spaceconstraints(students)Mingapsbetweenbuildingchangesforaasetofstudents
Spaceconstraints(students)Mingapsbetweenbuildingchangesforallstudents
TODO:niceexample?
Statistics
Tableofcontents
Checktheteachersandstudentsstatisticsbeforegeneratingatimetable.Youcancheckifallactivities
are(hopefully)addedcorrect.It'salsousefultocheckthestatisticsifyouwanttoaddsome
constraints.(likemaxdaysperweekormaxgaps)
Timetable
Tableofcontents
Maybenoteverytimetableissolvable.RemoveconstraintsifFETfailtofindasolution.Contactthe
authorifyouknowthatasolutionispossible.Don'taddtomanyconstraintsatonetimeandalways
savewithanewfilename.
Generatingatimetable
Tableofcontents
Therearetwodifferentwaystogeneratetimetables:
timetablegeneratenew
timetablegeneratemultiplevariants
Generatingatimetableisveryrandomprocess.Soitmighthappenthatgeneratingatimetablejust
needafewsecondsandgeneratingatimetablewiththesamedatasetneedthenexttimeseveral
minutes.Ican'tsayhowmuchtimeisneededtoyourtimetable,butIknowdatasetsthatneedseveral
hourstosolveevenonamoderncomputer.
Don'twonderifthenumberofplacedactivitiesstoporevendecreasesometimes.Thatisnormal.Just
trysomesamplefiles.Theyareallsolvable.
Viewatimetable
Tableofcontents
Ifyougeneratedasingletimetablebytimetablegeneratenew,youcanviewthetimetablesby:
timetableview(students)
timetableview(teachers)
timetableview(rooms)
***youcanlockactivitieshere***whoneedit?Goodexample?
Irecommendtoviewthetimetableswithanwebbrowser.Theyaresavedinhtmlformat.OnLinux
systemstheyarestoredin~/fet-results/andonWindowssystemstheyarestoredinasubdirectory
/results/oftheFETdirectory.
Beforereleasingatimetable
Tableofcontents
Irecommendtodofourthings:
1. Youshouldtellallteachersatameetingorbyapaperallconstraintsyouwanttocareabout.
Askallteachersifthatconstraintsarecorrectorifconstraintsaremissing.Maybeit'sthebestif
http://timetabling.de/manual/FET-manual.en.html
25/32
6/21/2015
theotherteachermustwritedownalltheirconstraintsandwishes.Soyouwillnotforgeta
constraintandnoonecanaffrontyoulaterthatyoudidn'tcareaboutaspecialconstraint.By
talkingaboutconstraintsinameetingtheotherteacherwillunderstandbetterwhysomehave
moregapsthenothersandthiswillreducealotoftroubleandmisunderstandings.
2. Checktheconflicts.txtfileintheresultdirectory.
3. IfyourinstitutionneedtocoverimpededteachersyoushouldchecktheTeachers' Free
Periodsfileintheresultdirectory.(compareTeachers'FreePeriods)
4. Beforereleasingatimetabletothestudentsyoushouldreleaseanunofficialtimetabletothe
teachers.Dothatasearlyaspossible,sotheotherteacherscancheckyourwork.
It'sveryimportanttodothatbeforethesemesterstarts.Normallyainstitutionhasameetingbefore
thenextsemesterbegin,soyoushoulddoitatthelatestatthismeeting!Ofcoursethistwohints
meansthatyouhavetoworkalittlebitmorebeforeyoucanreleaseatimetable,butyouwillhave
muchmoretroubleandworkifyoureleaseabuggytimetable.
Howtochangearunningtimetable?
Tableofcontents
Beforechangingarunningtimetable
Tableofcontents
Becriticalyourself.DidyoucareaboutthehintsthataredescribedinchapterPrearrangement?So
youasktheteachersforconstraintsbeforereleasingatimetableandreleasedanunofficialtimetable
first?
Ifyoudidn'tcareaboutthatyouhavebadluck.Addtheneededconstraintsandcareaboutnew
constraints(seebelow).Don'tforgettocareaboutthishintsthistime!
Ifyoucareaboutthatthathintsyoushouldinquirewhyyouneedtochangethecurrenttimetable.
Ifateacherforgottotellyouaconstraintandyouseethatit'snotnecessary,Irecommendtobestiff.
Don'tbetoamiableandcourteous.Don'taddhisconstraintanddon'tgenerateanewtimetable.I
recommendthat,becausefirstofallbesurethatyoumightgetanewbugbysolvinganotherone.
Especiallybecausetherearenewconstraintsyoucurrentlydon'tknow(seebelow).Youwillgetalot
oftroubleifyoudon'tcareaboutthem!Secondlyotherteacherswillalsocomelaterandaskfornew
constraints,butmaybeyouwillnotbeabletocareaboutthemand/oryougetnewbugsbythat.Soif
youcareaboutateacherwhodidn'tcareaboutyou(Youalreadyaskedhimtotellyoumissing
constraintsandaskedhimtochecktheunofficialtimetable!)youwilljusthavealotofworkandalot
oftroubleinthecollege.Allotherteachersjustwillbedissatisfiedandsomemightthinkthatyougive
specialprivilegestoafewteachers.Onlybybeingstricttheotherteacherwillrespectyoudeadlinesin
thefuture.Ofcoursenecessaryconstraintsmustbeadded.
MaybeyouwonderwhyIamtalkingaboutnewbugs,becauseyoufollowedmyrecommendationand
setweightofallconstraintsto100%andFETfoundasolutionwithoutanyconflict.Butbythis
"only"thewholetimetableisfairandconflictfree.Someteachersmaybedon'tviewthewhole
timetable,theymaybejustseetheirpersonaltimetableandthatmightbenotasgoodasbefore.
Example:Thefirsttimeyouaddedallconstraintswith100%weight.Thenyouaddedconstraintmax
gapperweekandreducedthatvaluestepbystep.FETwasabletosolvethetimetablewithmax5
gapsperweek,butitwasn'tabletosolveitwith4gapsperweek.Soyoureleasedtimetablewithmax
5gapsperweek.Somedayslateryouchangedtherunningtimetable(Youaddedorchangedsome
constraints).FortunatelyFETwasstillablesosolvethetimetablewithmax5gapsperweek.Sothe
"whole"timetableisfairandyoureleasedit.Butsometeachersmightbeangry,becausetheygotin
theoldtimetableonly1oreven0gapsbyaccident.Inthenewtimetabletheyhavemore(upto5)
gaps.Soyouseetheproblem?Someguymightbeangry,butaddingaconstraintwithalowermax
gapsperweektothatteachersisnotgood,becauseit'snotfairtotheotherteachersandalsothe
timetablewillbemuchmoredifficult(orevenimpossible)tosolve.ThatiswhyIrecommendto
http://timetabling.de/manual/FET-manual.en.html
26/32
6/21/2015
"Neverchangearunningtimetable"ifitisnotnecessary.
Tableofcontents
Changingarunningtimetable
Ifyoumustregeneratethetimetableyoumustcareaboutnewconstraints,notonlythemissingone!
Someteachersgetfreeperiodsorevenwholedaysfree(byaccident).Thisteachermaybealready
havesomeother(private)activitiesthatyoudon'tknow!Theymighthaveconsultationtoadoctor,
don'thaveababysitterfortheirchildren,....Soaskallteachersiftheyhavecompulsoryfreeperiods
now.Addthisconstraints(asaruleAteacherisnotavailable).Alsoaddthemissingconstraint.
HopefullyFETisstillabletofindasolution.Ifnotyoumustthinkaboutincreasingthenumberof
maxgapsormaybealsoremovingsomeconstraints.
Tableofcontents
Teachers'FreePeriods
Inmanyschoolsitisnotallowedthatactivitiesareomitted.Therearemany
reasonswhyanactivitymightbeomitted:Ateacherismaybeill,isona
schooltripwithhisclass,visitafurthereducation,....
Mr.Coverwood
MON TUE WED
Ifimpededteachersmustberepresentedbyotherteachersyoumightgetbig
troubleifyouaddto"good"gapconstraints,tomany"mindaysperweek"or
tostrict"minhoursperday"constraintstoteachers.Theproblemisthatthere
mightbenotenoughteacherstocoveractivities.Ofcoursethenumberoffree
periodstoeveryteacherisstillthesame,butespeciallymanyteacherswith
freedaysmeanthatyouneedaveryloyalcollege.Thatconstraintincrease
chancethatteachersmustrepresentattheirfreedayotherteachers!Somight
gettroublebythat,mainlyifyoucaninformthatteachersonlyafewminutes
orhoursbeforehemustrepresentanactivity.Theteacherismaybenotat
home,becausehedootherthingsathisfreeday.Soalwayscheckthe
"Teachers'FreePeriod"timetablebeforeyoureleasean(unofficial)timetable.
5a
5a
math math
6b
math
5a
math
7c
6b
math math
Irecommendtocheckthe"LessDetailed"tablebeforeyoureleaseatimetable.Onlyifyouhavea
veryloyalcollegeyoumaybeneedtocheckonlythe"Detailed"table.
Fistofallyouneedtocheckeveryperiodoftheweek.Havealookifthereareenoughteachersper
period.Ifyouseeaperiodwithonlyoneteacheritmeanthatyoucancoveronlyoneillteacheratthat
period.Soiftwoteachersareillatthesomedayyouarenotabletocoverbothactivities.Ifthereisan
emptyperiod,thenyoucan'tevencoverasingleactivityatthattime.
Foryourdailyworkyounormallyusethe"LessDetailed"timetable.Usethe"Detailed"tableonlyin
emergency(becauseinthe"LessDetailed"tablearenotenoughteacherstocoverallactivities).
Therearedifferentteachers'freeperiodsvisibleinthetable.
IntheLessdetailedtableare5differentkindsofteachers'freeperiods:singlegaps,boardergaps,
biggaps,muststaylongerandmustcomeearlier.
Inthedetailedtablearealsothiskindsofteachers:muststaymuchlonger,mustcomemuchearlier,
freedayandnotavailable.
"mustcomeearlier":Theteachermustcome1periodearliertoschool
asnormal.Soit'simportedtotellthatteacherasearlyaspossiblethat
hemustdriverearlierasnormaltoschool.
Mr.Coverwood
MON TUE
WED
5a
5a
mustcome
"mustcomemuchearlier":Theteachermustcome2ormoreperiods
math math muchearlier
earliertoschoolasnormal.Soit'simportedtotellthatteacherasearly
single border mustcome
2
aspossiblethathemustdriverearlierasnormaltoschool.
gap
gap muchearlier
1
http://timetabling.de/manual/FET-manual.en.html
27/32
6/21/2015
"muststaylonger":Theteachermuststay1periodlongerasnormal.
"muststaymuchlonger":Theteachermuststay2ormoreperiod
longerasnormal.
border big
gap
gap
Gap:Theteachermustnotcomeearlierandmustnotstaylonger,
becausehealreadyinstructedstudentsatthatdayandwillinstruct
(other)studentslaterthatday.
"singlegap":TheteacherhasanactivitydirectlybeforeANDdirectly
afterthatfreeperiod.
6b
math
7c
math
big mustcome
gap
earlier
5a
math
6b
muststay
math muchlonger
"bordergap":TheteacherhasanactivitydirectlybeforeORdirectlyafterthatfreeperiod.(Sohehas
onegapdirectlybeforeORdirectlyafterthatfreeperiod.)
"biggap":Theteacherhasanfreeperiod(gap)directlybeforeANDdirectlyafterthatgap.
Maybeyouwonderwhyteachersthathaveabreakaremissinginthistable.Prettyeasy.Ifthatperiod
isabreak,youwillneverneedtocoveranactivity,becauseallteachershavefreeatthattime.
Ifyouneedtocoveranactivity,youmustchooseateacherinthe"Teachers'FreePeriod"table.It's
difficulttosaywhichteacheryoushoulduse.Itriedtoordertheteachersbyageneralrule.Butin
somecasesit'sbettertochooseanotherteacherfirst.Maybeit'sbettertochooseateacherthatinstruct
thesamegroupfirst.Maybeit'sbettertochooseateacherthatinstructthesamesubject.Maybeit's
betternottochoosethefirstteacher,becausehealreadyinstructsomanyperiodsthisdayorweek.
Maybeaftersometimeyouunderstandbetterthistimetableandwanttohidethedescriptionsinthat
timetable,becausetheyjustfloodthetimetablewithunneededinformation(becauseyouarealeto
differthefreeperiodsbythedifferentcolours.).YoucanhidethedescriptionsbyHideElementswith
css.
Printtimetables
Tableofcontents
Thedefaulttooltoprintatimetableisawebbrowser,notaofficeprogram(likeOpenOfficeWriteror
Calc),becausethetimetablesaresavedinhtmlformatandtheimportfiltersofofficetoolsarenot
verygoodatthemoment.
Youwanttopublishapdffile.
Checkifyourwebbrowseroroperatingsystemsupportprintingtopdforexportingtopdf
SometimesitiscalledpdfPrinterorprintintofileaspdf.Youshouldsearchinyourprintersettings
orinFileExportofyourwebbrowser.Windowsusernormallyneedtoinstallapdfprintdriver
first.
Checkifyouusethelatestversionofthewebbrowser.Trydifferentwebbrowsersoftware.
EveryWebbrowserhasdifferentadvantages.ChangingthefontsizeisveryeasywithFirefox.Opera
highlightstextveryfast.....Sopleasetryatleast2ofthiswebbrowsers:
Firefoxhttp://www.firefox.com/
Operahttp://www.opera.com/
Konqueror(defaultLinux/KDEwebbrowser)
InternetExplorerhttp://www.microsoft.com/
Intheeasiestcaseyoujusthavetoopenatimetablefilewithawebbrowserandprintitbyselecting
FilePrint.
http://timetabling.de/manual/FET-manual.en.html
28/32
6/21/2015
Apagebreakisdoneaftereverytableifyousavedthehtmlfilesatleastwithhtmllevel2(FET
settingshtmllevel).Butthatdoesn'tmeanthateverytableisonasinglepage!(comparenexthint)
Checktheprintpreviewwithyourwebbrowser(FilePrintPreview)beforeprinting.Checkevery
singlepage!
Ifatimetabledoesn'tfitonasinglepaperyoucandothreethings:
makethetablessmaller(seebelow)
makethepaperlarger(Reducebordersintheprintersettings,cropthebordersinthepagesettingsof
yourwebbrowseroruseanlargerprinter.)
maybechooselandscapeformat(inyourprintersettings)
Youcanmakethetablessmallerby:
awebbrowser
stylingthehtmlfilewithcss
editingthehtmlfilemanually(noteasy)
Youcan(maybe)reduce(andincrease)thesizeoftablesveryeasilywithawebbrowser.Sadlyevery
webbrowserhidethisfeatureatdifferentplaces.
Opentheprintpreviewofyourwebbrowserandcheckifyoucantogglethescale.
GotosomethinglikeFilePageSetuporFilePrintOptionsandcheckifyoucando
somethinglikeFittoPaperWidth,ShrinktoFitPageWidth,propersizeautomaticallyorchoosean
otherscale.
Youcanreduce(andincrease)thesizeoftableseasilywithcssby:
reducingfontsize
collapseborders
hideelements(maybehidecaption,activitytags,rooms,tablefoot,...)
Youcanreducethesizeoftableswithhtmlby:
removingunneededcolumnsorrows
Printmultipletablesonasinglepage
Tableofcontents
Therearetwodifferentwaystoprintmultipletableonasinglepage:
bycss
byprinterdriver
2tableonasinglesheetbycss
Tableofcontents
Ifyouhaveenoughspacetoprintalwaystwotimetablesonasinglepagethenyouneedapage-break
aftereverysecondtable.Openthecssfilewithaneditor.Youcanseeinthebeginningthefollowing
lines:
table {
page-break-before: always;
text-align: center;
}
table.modulo2 {
}
Justremovethedeclarationpage-break-before: always;fromselectortableandpasteitinto
selectortable.modulo2.Soitshouldlooklikethis:
http://timetabling.de/manual/FET-manual.en.html
29/32
6/21/2015
table {
text-align: center;
}
table.modulo2 {
page-break-before: always;
}
Checktheprintpreview.Checkeverysinglepage!Thesizeoftablesisnotalwaysthesame.Sothere
aremaybe2largertablesthatdoesn'tfitonasinglepage.Read***tounderstandhowsolvethat
problem.
2,4or8tableonasinglesheetbyyourprinterdriver
Tableofcontents
Irecommendtochecktheprintpreviewofyourwebbrowserfirst.Thereshouldn'tbemuchfreespace
onapage.Sooneortwotimetablesshouldusenearlythewholepage.Nowcheckifyourweb
browserorprintersupporttoprintseveralpagesonasinglesheet.Havealookifyoucanset
somethinglikethatinFilePrintPropertiesorinFilePageSetup.Ifyourprinterdoesn't
supportprintingseveralsheetsanasinglesheetyoucancheckifyourpdfprintdriversupportthat.So
print(save)intoapdffilefirstandprintthatpdffile.
Stylethehtmlfileswithcss
Tableofcontents
cssmeanscascadestylesheet.Thisistheeasiestwaytostylethetimetables.Forexampleyoucan
changecolourandfontsizeorhideelements.Yourtimetablesmustbesavedwithhtmllevel5toget
accesstoallfeatures(FETsettingshtmllevel).
Editacssfilewithaneditor.Don'tdothatwithanofficesoftware.Linuxusercanuseoneofthe
enclosededitors(Kate,Kwrite,...)Windowsusercanworkwithnotepad++
http://sourceforge.net/projects/notepadplus/
Openthecssfile.Thefileisinthesamedirectoryasthehtmlfiles.Ifyouhaveangoodeditoryou
shouldseethatthecsstextisdisplayedindifferentcolours.Thatsyntaxhighlightingisdone
automaticallybyyoureditoranditwillhelpyoureadingandsearchingbugs.
Comments
Tableofcontents
Firstofallyoucanseelinesthatstartwith/*andendwith/*likethis:
/* CSS Stylesheet of german_sample.fet
Stylesheet generated with FET 5.4.18 */
Thatisacomment.Thistextisjusttoyou.Thewebbrowserdon'treadthatlines.
Selectors
Tableofcontents
Secondofallyoucanseemanystatementslikethis:
table {
page-break-before: always;
text-align: center;
}
table.modulo2 {
}
http://timetabling.de/manual/FET-manual.en.html
30/32
6/21/2015
Herearetwostatements.Astatementstartwithanselector,followedbyopeningcurlybrace,maybea
declarationandaclosingcurlybrace.
Inthisexampletheselectortablehasadeclaration.Buttheselectortable.modulo2hasn'ta
declaration.Ifyoualreadyknowhtml,youwillremarkthatthenameofselectorsaresimilartohtml
elementnamesorclasses,becausethisselectorswillaffectthatelements.Ifyoudon'tknowhtml,you
willneedtounderstandwhatthisstatementaffectinthehtmlfile.Youcancheckitprettyeasy.Just
writecolor: red;intoONEdeclaration.Soitshouldlooklikethis:
table {
page-break-before: always;
text-align: center;
color: red;
}
table.modulo2 {
}
Savethecssfileandreloadthehtmlfile.Asyoualreadyimaginetablesarecolouredredinthehtml
documentnow.
Removecolor: red;outofthedeclarationofthecssfileandpasteitinthenextdeclaration.Save
thecssfileagainandreloadthehtmlfileagain.declarationYouwillseethatonlyeverysecondtable
isrednow.Repeatthisuntilwith(all)otherselectorsuntilyouunderstandtheaffectofallselectors.
Colours
Tableofcontents
Youalreadyknowhowtocolouranelement.Youcanalsosetabackgroundcolourbybackgoundcolor.Justdoitlikethis:
td.teacher, div.teacher {
background-color: gray;
color: blue;
}
Ifyouaddthislinesintotheselectortd.teacher, div.teacherthenallteachernamesarewritten
withbluecolourongraybackground.
Cssknowthiscolours:black,gray,silver,white,purple,fuchsia,maroon,red,olive,yellow,green,
lime,navy,blue,teal,aquaandorange.
HideElements
Tableofcontents
Anicefeaturetoreducethesizeoftablesistohidesomeelements.Forexampletohideallactivity
tagsjustwritedisplay:none;intoselectorspan.activitytag.Soitshouldlooklikethis:
span.activitytag {
display:none;
}
Validatethecssfile
Tableofcontents
Ifyoueditthecssfileitmighthappenthatyoudosomemistakes.Toavoidandfindbugsturnon
syntaxhighlightingofyoueditorandcheckthecssfilewithancssvalidator.(forexample
http://jigsaw.w3.org/cssvalidator/#validatebyupload)
http://timetabling.de/manual/FET-manual.en.html
31/32
6/21/2015
Settings
Tableofcontents
XXX
Help
Tableofcontents
Helpisalwaysneeded.Youcanfindhintsandwarningshere,butalsoweneedhelp.Sopleasetellus
mistakes,niceexamplesorothersuggestions.Helpotherguysintheforum,helpcodingorthink
aboutdonating.
Yours
VolkerDirr
http://timetabling.de/manual/FET-manual.en.html
32/32