Skip to content
Snippets Groups Projects
Commit 3f2d419f authored by beekmannju85374's avatar beekmannju85374 :writing_hand:
Browse files

Updated README.md

parent a07c0937
No related branches found
No related tags found
Loading
# Planer
## usage:
start ghci in this repo with:\
_cabal repl_
Load professors from csv file:\
_λ p <- processCsv "professors1.csv"_\
or use the example professors p1 to p5 generated in the program
Calculate schedules and create a LaTeX file in presentations.tex:\
_λ schedule rooms startDate endDate profs_\
_λ schedule ["H","P"] "2024-04-04" "2024-07-30" p_
or use scheduleEven if you are unhappy with the room distribution to make it more even if possible\
_λ scheduleEven ["H","P"] "2024-04-04" "2024-07-30" p_
To see every possible schedule use _generateSchedules_ with the same parameters as _schedule_
To add a prof to a calculated schedule use:\
_λ addProfessor prof [Rooms] start endDate calculatedSchedule_
To add unavailability for a prof and try to find a new schedule use:\
_λ addProfUnavailability prof [UnavailDates] [Rooms] start endDate calculatedSchedule_
## csv fortmat:
name,projects,unavailableDays,availableDays\
Duman,KI-Survey1,2024-04-04;2024-04-11,\
## Usage
### Start GHCi
Start GHCi in this repo with:
```haskell
cabal repl
```
### Load professors from CSV
Load professors from a CSV file:
```haskell
λ 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 be also saved in `presentations.txt`:
```haskell
λ 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:
```haskell
λ 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:
```haskell
λ addProfessor prof [Rooms] start endDate calculatedSchedule
```
### Add professor unavailability
To add unavailability for a professor and try to find a new schedule:
```haskell
λ addProfUnavailability prof [UnavailDates] [Rooms] start endDate calculatedSchedule
```
### Save and load schedule
To save a schedule:
```haskell
λ saveToFile schedule "fileName"
```
To load a schedule from a file:
```haskell
λ loadFromFile "fileName"
```
#### Example usage
```haskell
λ a = head $ generateSchedules ["H","P"] "2024-04-04" "2024-07-01" p
λ saveToFile a "test123"
λ b <- loadFromFile "test123"
```
## CSV Format
```csv
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
-> Duman is busy on 04.04 and 11.04\
Zapf is only available on 04.04 and 11.04
Professors can have multiple projects.
they can have multiple projects
## Example Output
## example output:
_λ schedule ["H","P"] "2024-04-04" "2024-07-01" p_
```haskell
λ schedule ["H","P"] "2024-04-04" "2024-07-01" p
```
![png](Example.png)
the csv:\
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,\
### CSV Example
p =
```csv
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,
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment