Skip to content

Commit

Permalink
Improved example description
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-arenas committed Mar 10, 2021
1 parent a43383f commit e006e5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ print("positions_requirements: ", positions_requirements)
Find the optimal number of persons to assign to a pre-defined list of shifts, under a requirement of persons per period
of day and capacity restrictions

#### Example:

```python
from pyworkforce.shifts import MinAbsDifference

# Columns are an hour of the day, rows are the days
# Rows are the days, each entry of a row, is an hour of the day (24).
required_resources = [
[9, 11, 17, 9, 7, 12, 5, 11, 8, 9, 18, 17, 8, 12, 16, 8, 7, 12, 11, 10, 13, 19, 16, 7],
[13, 13, 12, 15, 18, 20, 13, 16, 17, 8, 13, 11, 6, 19, 11, 20, 19, 17, 10, 13, 14, 23, 16, 8]
]

# Each entry of a shift, is an hour of the day (24 columns)
# Each entry of a shift, is an hour of the day (24)
shifts_coverage = {"Morning": [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"Afternoon": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],
"Night": [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1],
Expand Down

0 comments on commit e006e5f

Please sign in to comment.