Human Resource Planning - Alex Clarizio's Homepage

Alex Clarizio's Homepage

Writings for the curious minds.


Human Resource Planning

Jan 2, 2023 | Reading time: 2 minutes | 401 words
______

Operations research (OR) can be very useful for human resource planning as they can help organizations make more informed and effective decisions about how to allocate their human resources. Some advantages of using OR for human resource planning include:

  1. Improved efficiency: OR models can help organizations identify the most efficient way to allocate their human resources, reducing waste and maximizing productivity.
  2. Better decision-making: OR models can provide organizations with a systematic and structured way to analyze and evaluate different scenarios, helping them make more informed and reliable decisions.
  3. Enhanced communication: OR models can facilitate communication and collaboration within an organization, as they provide a common language and framework for discussing and resolving complex problems.
  4. Increased flexibility: OR models can help organizations respond more quickly and effectively to changing conditions, such as changes in demand, resource availability, or market conditions.
  5. Improved risk management: OR models can help organizations identify and mitigate potential risks, such as overloading employees with too much work or underutilizing their skills and expertise.

Here is a small prototype model showing how OR can be used to model human resource planning. The idea is that you have a few employees with different availability and demand to be satisfied (the demand being the number of resources per time unit). The planner has to decide who works when to ensure the demand is satisfied, knowing the resource availability.

Loading the data:

employees = [1, 2, 3, 4, 5]
availability = {
    1: [1, 1, 0, 1, 1],
    2: [1, 1, 1, 1, 1],
    3: [1, 1, 0, 0, 1],
    4: [1, 1, 1, 0, 1],
    5: [1, 0, 1, 1, 1]
}
demand = [3, 4, 2, 3, 4]
T = len(demand)

Loading the model:

from ortools.constraint_solver import pywrapcp

# Set up the solver
solver = pywrapcp.Solver('Human Resource Planning')

# Define the decision variables
assignment = {}
for e in employees:
    for t in range(T):
        assignment[e,t] = solver.IntVar(0, 1, 'assignment_%d_%d' % (e,t))

# Set up the constraints
for e in employees:
    for t in range(T):
        solver.Add(assignment[e,t] <= availability[e,t])
        if t > 0:
            solver.Add(assignment[e,t] <= 1 - assignment[e,t-1])

for t in range(T):
    solver.Add(solver.Sum(assignment[e,t] for e in employees) == demand[t])

# Solve the model
status = solver.Solve()

# Print the solution
if status == pywrapcp.Solver.OPTIMAL:
    for e in employees:
        print(f'Employee {e} is assigned to the following periods:')
        for t in range(T):
            if assignment[e,t].solution_value() > 0:
                print(t)
else:
    print('The model could not be solved')