The STAFFVBC.frm Model

Visual Basic Staff Scheduling Example with a Callback Function

Suppose you run the popular Pluto Dogs hot dog stand that is open seven days a week. You hire employees to work a five day work week with two consecutive days off. Each employee receives the same weekly salary. Some days of the week are busier than others and, based on past experience, you know how many workers are required on a given day of the week. You need to determine how many employees to start on each day of the week in order to minimize the total number of required employees, while still meeting (or exceeding) staffing requirements.

Formulation
Let W1,..,W7 be the number of people who start their work week on Mon,..,Fri.
Let RHS1...RHS7 be the number of workers required on Mon,...,Fri.
Then, we wish to:

MIN W1 + .. + W7
S.T.
W1 + W4 + W5 + W6 + W7 >= RHS1
W1 + W2 + W5 + W6 + W7 >= RHS2
W1 + W2 + W3 + W6 + W7 >= RHS3
W1 + W2 + W3 + W4 + W7 >= RHS4
W1 + W2 + W3 + W4 + W5 >= RHS5
W2 + W3 + W4 + W5 + W6 >= RHS6
W3 + W4 + W5 + W6 + W7 >= RHS7

Solving our problem with the LINDO Callable Library:
The basic steps for solving an integer program in LINDO are:
1. Instantiate a LINDO environment.
2. Instantiate a model in the environment.
3. Specify the model.
4. Perform the optimization.
5. Retrieve the primal values.

Keywords:

Scheduling | Staff Scheduling | Callable Library | Callback Function | Programming | Visual Basic | Covering |