Planer
This is a scheduling program for project presentations at Technische Hochschule Nürnberg Georg Simon Ohm
For easy use install GHCup
Usage
Start GHCi
Start GHCi in this repo with:
cabal repl
Load professors from CSV
Load professors from a CSV file:
λ p <- processCsv "professors1.csv"
Or use the example professors p1
to p5
generated in the program.
Calculate schedules
Calculate schedules and create a LaTeX file in presentations.tex
Schedule will also be saved in presentations.txt
:
λ schedule rooms startDate endDate profs
λ schedule ["H","P"] "2024-04-04" "2024-07-30" p
Generate even schedules
If you are unhappy with the room distribution, use scheduleEven
to make it more even if possible:
λ scheduleEven ["H","P"] "2024-04-04" "2024-07-30" p
Generate all possible schedules
To see every possible schedule, use generateSchedules
with the same parameters as schedule
.
Add professor to schedule
To add a professor to a calculated schedule:
λ addProfessor prof [Rooms] start endDate calculatedSchedule
Add professor unavailability
To add unavailability for a professor and try to find a new schedule:
λ addProfUnavailability prof [UnavailDates] [Rooms] start endDate calculatedSchedule
Save and load schedule
To save a schedule:
λ saveToFile schedule "fileName"
To load a schedule from a file:
λ loadFromFile "fileName"
Example usage
λ a = head $ generateSchedules ["H","P"] "2024-04-04" "2024-07-01" p
λ saveToFile a "test123"
λ b <- loadFromFile "test123"
CSV Format
name,projects,unavailableDays,availableDays
Duman,KI-Survey1,2024-04-04;2024-04-11,
Zapf,THNSensor,,2024-04-04;2024-04-11
- Duman is busy on 04.04 and 11.04
- Zapf is only available on 04.04 and 11.04
Professors can have multiple projects and dates use ;
to seperate.
Example Output
λ schedule ["H","P"] "2024-04-04" "2024-07-01" p
CSV Example
p =
name,projects,unavailableDays,availableDays
Duman,KI-Survey1,2024-04-04;2024-04-11,
Zapf,THNSensor,2024-04-11,
Meier,Memtest;Memtest2,2024-04-11;2024-04-18,
Schulz,MMO;MMO2,2024-04-18,
P1,project1;project1N,2024-04-23,
P2,project2;project2N,2024-04-11;2024-04-18,
P3,project3,2024-04-04,
P4,project4;project45,2024-04-18,
P5,project5,2024-04-04,
P6,project6,2024-04-11,
P7,project7,2024-04-18,
P8,project8,2024-04-18,
P9,project9,2024-04-04,
P10,project10,2024-04-11,
P11,project11,2024-04-18,