@@ -11,37 +11,49 @@ Workforce scheduling is a common industry problem that often becomes complex
11
11
due to real-world constraints. This example demonstrates
12
12
a scheduling scenario with a variety of employees and rules.
13
13
14
- ![ Screen Image] ( demo.png )
14
+ ![ Screen Image] ( static/ demo.png)
15
15
16
16
## Installation
17
17
18
- You can run this example without installation in cloud-based IDEs that support
19
- the [ Development Containers specification] ( https://containers.dev/supporting )
20
- (aka "devcontainers") .
18
+ You can run this example without installation in cloud-based IDEs that support the
19
+ [ Development Containers specification] ( https://containers.dev/supporting ) (aka "devcontainers" )
20
+ such as GitHub Codespaces .
21
21
22
- For development environments that do not support `` devcontainers `` , install
23
- requirements:
22
+ For development environments that do not support ` devcontainers ` , install requirements:
24
23
25
- pip install -r requirements.txt
24
+ ``` bash
25
+ pip install -r requirements.txt
26
+ ```
26
27
27
28
If you are cloning the repo to your local system, working in a
28
- [ virtual environment] ( https://docs.python.org/3/library/venv.html ) is
29
- recommended.
29
+ [ virtual environment] ( https://docs.python.org/3/library/venv.html ) is recommended.
30
30
31
31
## Usage
32
32
33
- Your development environment should be configured to
34
- [ access Leap’s Solvers ] ( https://docs.ocean.dwavesys.com/en/stable/overview/sapi.html ) .
35
- You can see information about supported IDEs and authorizing access to your
36
- Leap account [ here] ( https://docs.dwavesys.com/docs/latest/doc_leap_dev_env.html ) .
33
+ Your development environment should be configured to access the
34
+ [ Leap& trade ; Quantum Cloud Service ] ( https://docs.ocean.dwavesys.com/en/stable/overview/sapi.html ) .
35
+ You can see information about supported IDEs and authorizing access to your Leap account
36
+ [ here] ( https://docs.dwavesys.com/docs/latest/doc_leap_dev_env.html ) .
37
37
38
- To run the demo, type the `` python app.py `` command into your terminal and then open a web browser
39
- to the URL printed to the terminal.
38
+ Run the following terminal command to start the Dash app:
40
39
41
- Set any of the input options to configure the problem and then click the "Solve"
42
- button.
40
+ ``` bash
41
+ python app.py
42
+ ```
43
43
44
- ### Introducing the Demo
44
+ Access the user interface with your browser at http://127.0.0.1:8050/ .
45
+
46
+ The demo program opens an interface where you can configure problems and submit these problems to
47
+ a solver.
48
+
49
+ Configuration options can be found in the [ demo_configs.py] ( demo_configs.py ) file.
50
+
51
+ > [ !NOTE] \
52
+ > If you plan on editing any files while the app is running,
53
+ please run the app with the ` --debug ` command-line argument for live reloads and easier debugging:
54
+ ` python app.py --debug `
55
+
56
+ ## Problem Description
45
57
46
58
The employee availability chart shows employee shift preferences and unavailable
47
59
days (PTO). Requested shifts are in teal and marked with a '✓', while
@@ -58,24 +70,24 @@ In the chart, there are three different types of employees.
58
70
The chart displays employee preferences and availability over two weeks. It will
59
71
always display two weeks starting two Sundays from now, with one column for each day of the two week period.
60
72
73
+ A subset of the employees have requested full-time schedules which consists of 5 days on,
74
+ 2 days off, and is one of three options: Monday-Friday, Tuesday-Saturday, Sunday-Wednesday.
75
+
61
76
### Inputs
62
77
63
78
The scenario preset auto-populates all settings with scenarios of varying
64
79
sizes. If 'Custom' is selected, the following settings become available:
65
80
66
81
- Number of employees: Schedules always include 2 managers and 1 trainee.
82
+ - Number of full-time employees: The subset of the employees that have requested a 5 days on,
83
+ 2 days off schedule.
67
84
- Max consecutive shifts: The maximum number of consecutive shifts an employee
68
85
can be scheduled before a day off must be scheduled.
69
- - Min/max shifts per employee: This range determines the number of shifts an
86
+ - Min/max shifts per part-time employee: This range determines the number of shifts an
70
87
employee can work.
71
- - Min/max employees per shift: This range determines how many employees need
72
- to be assigned to each shift.
88
+ - Forecast: This determines how many employees are needed per day.
73
89
- Allow isolated days off: If unchecked, employees must be
74
90
scheduled for at least two consecutive days off between work days.
75
- - Require a manager on every shift: If checked, every shift
76
- must have exactly one manager on duty to supervise.
77
- - Random seed (optional): If set with an integer, it will ensure consistency
78
- between subsequent runs of the same example.
79
91
80
92
### Outputs
81
93
0 commit comments