コンテンツにスキップ

Application to Scheduling Problems (Part 2)

2025-12-05-15-03-44

This page provides a step-by-step explanation of the mathematical formulation in Application to Scheduling Problems (Part 1), including specific constants settings, and the interpretation of the optimization results.

In the previous part, we established that the Workforce Scheduling Problem (WSP) requires balancing multiple real-world constraints and introduced the following energy function:

E=αEα+λ1E1+λ2E2+λ3E3+λ4E4+λ5E5.E = \alpha E_\alpha + \lambda_1 E_1 + \lambda_2 E_2 + \lambda_3 E_3 + \lambda_4 E_4 + \lambda_5 E_5.

Let’s break down the mathematical meaning of each term.


In this section, we will explain in detail the formulation for Application to Scheduling Problems (Part 1).

The objective is to minimize the makespan (total completion time) while the problem treats operational requirements as constraints. Specifically, the math ensures:

  • Total performed work matches the estimated person-months.
  • Tasks are assigned continuously without awkward gaps.
  • Workers are not supposed to multitask.
  • Assignments respect preferred time windows.
  • Tasks follow a strict sequential order within projects.

Combining these constraints allows us to optimize scheduling in a real situation.

This subsection provides a detailed explanation of each term.

The first term is the objective term for minimizing makespan (the overall scheduling period).

Eα=pfttxp,f,t.E_\alpha = \sum_{p}\sum_{f}\sum_{t} t\, x_{p,f,t}.

By multiplying the decision variable by time tt, the value of this term becomes larger as time passes. The QUBO solver naturally seeks to assign tasks to the smallest possible tt to minimize the total energy.

This constraint ensures the assigned work meets the required person-months, adjusted for worker efficiency.

E1=f(ptdp,fxp,f,t20dtAf)2.{E_1 = \sum_{f}\left(\sum_{p}\sum_{t} d_{p,f}\,x_{p,f,t} - \frac{20}{d_{t}} A_{f}\right)^{2}}.

We sum the assignments for task ff and multiply by the worker’s workload multiplier dp,f.d_{p,f}. This must equal the required person-days (20×Af,20\times A_f, assuming 20 workdays per month). We divide by dt=0.1d_t =0.1 to align the units with our discrete time steps.

This term ensures that if a worker starts a task, they continue working on it without unnecessary interruptions.

E2=pft(xp,f,txp,f,(t+1))2.{E_2 = \sum_{p}\sum_{f}\sum_{t}\left(x_{p,f,t} - x_{p,f,(t+1)}\right)^{2}}.

This term implies that if the worker pp is assigned to task ff at time t,t, they should ideally continue that same task at time t+1.t+1. Without this term, the solver may produce highly inefficient schedules, such as assigning a 3-hour task to 9:00—10:00, 14:00—15:00, and 16:00—17:00.

The fourth term is a constraint that prohibits assigning multiple tasks to the same worker at the same time.

E3=pt ⁣(fxp,f,t12)2.{E_3 = \sum_{p}\sum_{t}\!\left(\sum_{f} x_{p,f,t} - \frac{1}{2}\right)^{2}}.

This ensures that for any worker pp at any time tt, the sum of tasks assigned is either 0 or 1. We use a target value of 1/21/2 rather than 11 to provide flexibility. A target of 11 would force an assignment at every single time slot, which would conflict with our goal of finishing the project early.

This penalty term ensures that tasks are not assigned during restricted periods, using the predefined constant:

Df,t={1 ⁣:Task f can be assigned at the time t.0 ⁣:Otherwise.D_{f,t} = \begin{cases} 1 \colon & \text{Task $f$ can be assigned at the time $t$}. \\ 0 \colon & \text{Otherwise}. \end{cases} E4=ftp(1Df,t)xp,f,t.E_4 = \sum_{f}\sum_{t}\sum_{p} (1 - D_{f,t})\, x_{p,f,t}.

This term has non-zero value if a task is assigned (xp,f,t=1x_{p,f,t} = 1) during a time when it is not allowed (Df,t=0D_{f, t}=0). Otherwise (Df,t=1D_{f, t} = 1), no penalty is generated, and the assignment is controlled by the other constraints. Table 1 shows the value (1Df,t)xp,f,t(1 - D_{f,t})\, x_{p,f,t} for each combination of xp,f,tx_{p, f, t} and Df,t.D_{f, t}.

Table 1: Penalty outcomes for combinations of xp,f,tx_{p, f, t} and Df,tD_{f, t}

xp,f,tx_{p,f,t} (Task Assignment)Df,tD_{f,t} (Allowed Period)Penalty Value
000
101
010
110

This constraint ensures that tasks within a project are executed in the predefined order.

E5=(ij)t(pxp,j,t)(pttxp,i,t).{E_5 = \sum_{(i \prec j)} \sum_{t} \left(\sum_{p} x_{p,j,t}\right) \left(\sum_{p'} \sum_{t' \ge t} x_{p',i,t'}\right)}.

Here, (ij)(i \prec j) means that task ii must be completed before task jj begins. The term calculates the product of

  • the number of workers on task jj at time tt:
pxp,j,t.\sum_{p} x_{p,j,t}.
  • the number of workers on task ii at time tt or later:
pttxp,i,t.\sum_{p^\prime} \sum_{t^\prime \ge t} x_{p^\prime,i,t^\prime}.

If task ii is still being worked on or not started while task jj has already started, the value increases by (pxp,j,t)(pttxp,i,t).(\sum_{p} x_{p,j,t})(\sum_{p^\prime} \sum_{t^\prime \ge t} x_{p^\prime,i,t^\prime}). Since the quantum annealing seeks to minimize energy, it will avoid these overlapping configurations.

In summary, when the condition, where task jj is started at time tt, is satisfied:

pxp,j,t>0,\sum_{p} x_{p,j,t}>0,

task ii should not be being worked on at time tt or later:

(pxp,j,t)(pttxp,i,t)=0.\qty(\sum_{p} x_{p,j,t})\qty(\sum_{p'} \sum_{t' \ge t} x_{p',i ,t'})=0.

In this section, we use a quantum annealing device to determine whether the proposed QUBO formulation can effectively generate feasible solutions.

We implemented the model with the problem size defined below. Since this is a fully connected problem, the number of required variables is calculated as workers×tasks×time steps.\text{workers}\times\text{tasks}\times\text{time steps.} For this experiment, the configuration is 3×5×190.3\times 5\times 190. While the total duration is set to 19 days, we divide each day into dtd_t units to account for variation in worker effort. With dt=0.1,d_t=0.1, the total number of time steps becomes 190. Therefore, the problem utilizes 2,850 variables (3×5×190).(3\times 5\times 190).

Because our problem significantly exceeds the limit that quantum annealing hardware can handle, we utilize the LeapHybridSolver (a Binary Quadratic Model (BQM) solver) provided by D-Wave systems.

To test the model, we defined the specific parameters shown in Table 2 below.

Table 2: Problem scale for verification

ProjectTasks (Execution Sequence)WorkersDuration
2 ProjectsProject 1: (0→1→2), Project 2: (3→4)319 days

Next, we define the concrete values for the constants introduced in Application to Scheduling Problems (Part 1). These values represent the specific requirements of the scheduling scenario. For this example, the task effort and timing requirements are defined in Table 3.

Table 3: Task effort and preferred timing

TaskAfA_f (Effort: Person-months)Df,tD_{f,t} (Deadline in time units)
Task 00.2850
Task 10.37100
Task 20.34150
Task 30.30190
Task 40.29190

As shown in Table 3, Task 0 requires 0.28 person-months of effort. The value for Df,tD_{f, t} represents the time window in which the task is allowed to be assigned (deadline). For instance, Task 0 must be completed within 50 time units. Assuming a 5-day work week (20 days per month), this means Task 0 must be scheduled within the first week (5 days).

To account for varying skill levels, we define a workload multiplier for different proficiency levels in Table 4.

Table 4: Workload multiplier by skill level

Skill LevelMultiplier (dp,fd_{p, f})
Level 10.50
Level 20.71
Level 31.00
Level 41.25
Level 51.42

By multiplying the assigned time by these values, we calculate the “actual” work completed. For example, a Level 3 worker’s effort is counted at 100%, while a Level 1 worker only completes half the effective work in the same timeframe.

Finally, using the definitions in Table 4, we assign a specific skill level to each worker for each task in Table 5.

Table 5: Relationship between workers and workload multipliers (dp,fd_{p, f})

Task 0Task 1Task 2Task 3Task 4
Worker 00.500.710.501.250.50
Worker 10.500.501.250.710.71
Worker 21.420.710.500.710.50

We have set up the variables to create the formula and defined specific constant values so far. We will see actual results from the quantum annealing solver in the following section.

This section shows results with the following hyperparameters: α=2.0,λ1=100.0,λ2=131.0,λ3=150.0,λ4=50.0,λ5=500.0.\alpha=2.0,\,\lambda_1=100.0,\,\lambda_2=131.0,\,\lambda_3=150.0,\,\lambda_4=50.0,\,\lambda_5=500.0.

As analyzing the results in Figure 1, we can see that the solver successfully minimized the makespan to approximately 12 days (Term 1 effect) although the limit was 19 days. The output also demonstrates that tasks were assigned in the correct sequences (0→1→2 and 3→4) (Term 6 effect) and no multitasking occurred, as shown by the lack of overlapping bars (Term 4 effect). Furthermore, we can see that Tasks 0 and 1 were completed within their respective one-week and two-week windows (Term 5 effect).

2025-12-04-15-50-27
Figure 1: Gantt chart results via quantum annealing

The red line in Figure 2 indicates the allocation at the smallest time unit. Notice that tasks are scheduled in continuous blocks rather than fragmented segments, ensuring high efficiency (Term 3 effect).

2026-02-16-13-52-33
Figure 2: Minimum allocation unit on the Gantt chart

Finally, Figure 3 confirms that the actual assigned workload matches the required effort (AfA_f) for every task (Term 2 effect).

2025-12-04-16-53-29
Figure 3: Comparison of assigned task volume and required task volume

These results prove that the QUBO formulation successfully produces a feasible and high-quality solution that is comparable to results from classical solvers like Gurobi.


This page provided a detailed explanation of the mathematical formulation for workforce scheduling and demonstrated how to achieve an optimized result by setting constant values. When formulating a problem in QUBO format, the most critical step is the mathematical representation of your specific requirements. Although the example used here is complex and advanced, it provides an excellent material to learn the essentials of optimization.

We encourage you to practice the translation of verbal requirements into mathematical equiations using simpler scheduling tasks or everyday examples. Building this intuition will eventually enables you to develop custom optimization models for a wide variety of real-world problems.

This research is currently being prepared for publication. Details are subject to change.


Second-year master’s student in the Ohzeki group at Graduate School of Information Sciences, Tohoku University

Kaito Yashiro

(Translated by Ami Koshikawa)