Chapter 2. Overview of the employee rostering starter application

The employee rostering starter application assigns employees to shifts on various positions in an organization. For example, you can use the application to distribute shifts in a hospital between nurses, shifts in a diner between its employees, or shifts on an assembly line between workers.

Optimal employee rostering must take a number of variables into account. For example, different skills can be necessary for shifts in different positions. Also, some employees might be unavailable for some time slots or might prefer a particular time slot. You can specify inputs for these variables using the tabs along the top of the application window.

Important

In the current release, the employee rostering starter application fills a fixed amount of shifts in predefined dates. You can not change the dates or shifts. Therefore, it is not possible to use this application for production tasks. You can, however, update any skill, spot, or employee value after you have added them to the system.

Figure 2.1. Employee rostering toolbar

opta tabs

2.1. Entering source information for employee rostering

Tenants

In the TENANT field at the top right corner of the application window, you can select one of the predefined tenants. Each tenant represents an independent set of data; any change in the data for one tenant does not affect any other tenants.

You can switch between tenants to use several independent data sets, for example, to prepare employee rosters for different locations.

Skills

In the skills section, you can set all skills that can be necessary in any position within the roster. For example, a 24-hour diner would require cooking, serving, bussing, and hosting skills, in addition to skills such as general human resources and restaurant operations.

To enter these skills, click the Skills tab.

For each skill:

  1. Type the name of the skill individually into the Skill Name field.
  2. Click Add.
opta skill name

Spots

Spots refer to the various positions at the business. For a diner, spots include the bar, the bussing stations, the front counter, the various kitchen stations, the serving areas, and the office. For each spot, you can select a required skill from the list that you entered in the Skills tab. The following table shows a sample list of spots and skills for every spot:

Table 2.1. Spots Example

Name

Required Skill

Bar

Serving

Bussing Station 1

Bussing

Bussing Station 2

Bussing

Front Counter

Hosting, Cash register

Grill

Cooking

Prep

Food prep

Soups

Cooking

Serving area 1

Serving

Serving area 2

Serving

Office

HR

For each spot:

  1. Enter the spot name into the Spot Name field at the bottom of the screen.
  2. Select a required skill from the Required Skill drop-down menu.
  3. Click Add.

Figure 2.2. Spot name example

opta spot name

Employees

The Employees tab contains a list of all people employed by the business and the skills they possess. In this list, you can set multiple skills for an employee if necessary.

For each employee:

  1. Enter the name in the Employee Name field at the bottom of the screen.
  2. Specify a relevant skill by typing in the Skills field and selecting an item from the suggestion list that appears. To specify several skills, repeat this process before proceeding.
  3. Click Add.

Figure 2.3. Employee name field

opta name

Spot Roster

The Spot Roster is a table of all shifts (time slots) during which the business is open and all spots that must be manned during each shift. Each required spot is represented by a red rectangle.

Spots can support multiple employees per shift. If a spot is not required for a shift, you can remove the spot completely from the roster.

Click the blue + icon in any cell to add a new spot for the given shift. To remove a required spot completely from a shift, click the blue X icon in the corresponding cell of the grid.

Figure 2.4. Spot roster example

opta spot roster

Figure 2.5. Spot icons detail (lock, edit, remove, add)

opta spot icons

2.2. Creating an optimal employee roster

Procedure

  1. Populate your shifts and spots with required employees as necessary.

    1. Click the edit icon of a spot to open the "Select employee" modal window.
    2. Choose the employee from the list and click the Assign button.
    3. The employee is now locked for the given spot and will not be changed by the solver.
    4. Click the lock icon on the spot to allow the solver to change an assignment.
    5. Click the remove icon to undo an employee assignment to a spot.
  2. Click the Solve button to create an optimized solution.

The engine takes up to 30 seconds to create a fully optimal result.

When the optimal result is available, the Spot Roster window displays the name of the assigned employee for each spot and shift.

Employee Roster

The Employee Roster displays the same schedule columns as the Spot Roster, but the rows contain employee names and the spots each employee is scheduled for during a given shift.

Figure 2.6. Employee roster example

opta emp roster

2.3. Setting employee availability

You can use the Employee Roster screen to set the shift preferences of employees. The engine attempts to accommodate the preferences when creating the optimal solution. You can click one of three buttons in a shift to declare preference for an employee.

Figure 2.7. Employee shift preferences

opta prefs

From left to right in the figure above, you can select the following options for an employee:

  1. Unavailable
  2. Undesired but available
  3. Desired

Making no selection means the employee has no preference for the given shift.

After making changes to employee availability, click the Solve button to create a new schedule.

Note

The Unavailable option also applies for employees who call in sick or are on vacation. If an employee calls out just before a shift, a manager can indicate the scheduled employee’s unavailability and then create a new schedule.

2.4. Constraints

The Red Hat Business Optimizer rules for this starter application use both hard and soft constraints. During an optimization, the engine may not violate hard constraints, for example, if an employee is unavailable (out sick), or that an employee cannot work two spots in a single shift. The engine tries to adhere to soft constraints, such as an employee’s preference to not work a specific shift, but can violate them if the optimal solution requires it.