-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Support multiple people and weights
- Loading branch information
Showing
9 changed files
with
140 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
,18,19,20,21,22,23,24 | ||
,Fri,Sat,Sun,Mon,Tue,Wed,Thu | ||
Nurse 0,,D,D,D,D,D,D | ||
Nurse 1,E,E,E,E,E,E,E | ||
Nurse 2,N,N,N,N,N,N,N | ||
Nurse 3,D,,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: alpha | ||
description: Test shift request with multiple people and weights | ||
startdate: 2023-08-18 | ||
enddate: 2023-08-24 | ||
people: | ||
- description: Nurse 0 | ||
- description: Nurse 1 | ||
- description: Nurse 2 | ||
- description: Nurse 3 | ||
requirements: | ||
- id: D | ||
description: Day shift requirement | ||
required_people: 1 | ||
- id: E | ||
description: Evening shift requirement | ||
required_people: 1 | ||
- id: N | ||
description: Night shift requirement | ||
required_people: 1 | ||
preferences: | ||
- type: all requirements fulfilled | ||
- type: all people work at most one shift per day | ||
- type: shift request | ||
person: [0, 1] | ||
date: [18, 19, 20, 21, 22, 23, 24] | ||
shift: N | ||
weight: -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
,18,19,20,21,22,23,24 | ||
,Fri,Sat,Sun,Mon,Tue,Wed,Thu | ||
Nurse 0,,D,D,D,D,D,D | ||
Nurse 1,E,E,E,E,E,E,E | ||
Nurse 2,N,N,N,N,N,N,N | ||
Nurse 3,D,,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: alpha | ||
description: Test unwanted pattern with multiple people | ||
startdate: 2023-08-18 | ||
enddate: 2023-08-24 | ||
people: | ||
- description: Nurse 0 | ||
- description: Nurse 1 | ||
- description: Nurse 2 | ||
- description: Nurse 3 | ||
requirements: | ||
- id: D | ||
description: Day shift requirement | ||
required_people: 1 | ||
- id: E | ||
description: Evening shift requirement | ||
required_people: 1 | ||
- id: N | ||
description: Night shift requirement | ||
required_people: 1 | ||
preferences: | ||
- type: all requirements fulfilled | ||
- type: all people work at most one shift per day | ||
- type: unwanted shift type successions | ||
person: [0, 1] | ||
pattern: [N] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
,18,19,20,21,22,23,24 | ||
,Fri,Sat,Sun,Mon,Tue,Wed,Thu | ||
Nurse 0,D,D,D,D,D,D,D | ||
Nurse 1,E,E,E,E,E,E,E | ||
Nurse 2,N,N,N,N,N,, | ||
Nurse 3,,,,,,N,N |
29 changes: 29 additions & 0 deletions
29
core/tests/testcases/unwanted-pattern_1_people-2_weight.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apiVersion: alpha | ||
description: Test unwanted pattern with multiple people and weights | ||
startdate: 2023-08-18 | ||
enddate: 2023-08-24 | ||
people: | ||
- description: Nurse 0 | ||
- description: Nurse 1 | ||
- description: Nurse 2 | ||
- description: Nurse 3 | ||
requirements: | ||
- id: D | ||
description: Day shift requirement | ||
required_people: 1 | ||
- id: E | ||
description: Evening shift requirement | ||
required_people: 1 | ||
- id: N | ||
description: Night shift requirement | ||
required_people: 1 | ||
preferences: | ||
- type: all requirements fulfilled | ||
- type: all people work at most one shift per day | ||
- type: unwanted shift type successions | ||
person: [0, 1] | ||
pattern: [N] | ||
- type: unwanted shift type successions | ||
person: 0 | ||
pattern: [D] | ||
weight: 1 |