From e006e5f85f4cf6cd6f918fd4abbd587020b954df Mon Sep 17 00:00:00 2001 From: rodrigoarenas456 <31422766+rodrigoarenas456@users.noreply.github.com> Date: Tue, 9 Mar 2021 19:59:56 -0500 Subject: [PATCH] Improved example description --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4948243..7c50ae1 100644 --- a/README.md +++ b/README.md @@ -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],