The Capacity Planning Algorithm is designed to optimize the allocation of resources to activities over a period of time. It ensures that activities are covered as efficiently as possible while considering activity priority and minimizing resource overtime.
The expected typical use case, that has been used to test the functionality and efficiency of the algorithm, is a period of one year.
Purpose
The algorithm addresses the challenge of resource allocation by balancing two key objectives:
-
Maximizing activity coverage based on priority.
-
Maximizing resource usage, while minimizing resource overtime to optimize operational efficiency.
It takes into account various constraints, such as skill requirements, resource availability, and activity duration, to find an optimal allocation strategy.
How it works
The algorithm operates in an iterative cycle of two sequential sub-algorithms:
-
Candidate Finder – Identifies potential activity-resource(s) assignments, defined as candidates. The problem is decomposed into n subproblems, where n is the number of days in the planning horizon (e.g., 365 subproblems for a year). Each subproblem is solved by a Candidate Finder independently in parallel using all available computing cores.
-
Candidate Validator – Validates (accepts or rejects) candidates based on heuristic rules and assigns time accordingly.
Since the Candidate Finders can select candidates that collide with each other, and as a consequence the Candidate Validator might reject some of them, more than one iteration might be needed to assign all the available time.
This cycle repeats until all possible assignments are made or no further allocations are feasible. After a first cyclical process where the overtime is excluded from the resources' capacity, a second cyclical process starts, this time taking into account also the resources' overtime. When the second cyclical process ends, the solution is returned.
|
|---|
Candidate Finder
The objective of a Candidate Finder is to maximize the quality of assigning each activity to a specific group of resources, favoring higher priority activities.
To establish if a specific resource could be assigned to an activity, the following conditions must be met:
-
The work day of the resource is included in the scheduling window of the activity.
-
The resource has all the constraints of the activity.
-
The resource has at least one of the skills needed by the activity.
-
The capacity of the resource is enough to cover one unit of time of the activity.
Each Candidate Finder identifies the best candidate assignments for a given day without knowledge on other days results, so the algorithm is designed to also take into consideration resources' skill waste and length of an activity’s scheduling window to balance out this limitation and improve the quality of the candidates selected. For this reason, three weights have been introduced to control how the different factors (time frame priority, time frame size and skill waste) influence activity selection.
Candidate Validator
Takes the set of candidates generated by all the Finders across all days and selects how much time to assign to each of them. While the Finders only consider a single day each, the Validator has a global view of the problem.
First, candidates are ordered based on heuristic rules, some of which have a weight that can be parametrized in the input. These weights determine how much the factor influences candidate ordering. Each is a value between 0 and 1, where higher values give more importance to the corresponding criterion. A value of 0 disables the influence of that factor.
The heuristics that can be parametrized based on the weights' configuration.
After ordering, the Validator processes candidates greedily, either accepting or rejecting them.
If a candidate is accepted, the algorithm determines the number of hours to assign based on:
-
Remaining demand of the activity.
-
Remaining capacity of the resources.
-
Assignment cost considerations. The cost consideration could be skipped if
validatorMaximizeAssignedUnitsis set totrue.
A candidate is rejected when no time can be assigned to it, due to conflicts with other candidates. For example, an activity that was selected by many candidates, could have exhausted its demand before getting to the candidate evaluated, or one of the resources could have less capacity than the unit duration for the same reason.
Iterative Process
Since some candidates may be rejected, there could still be unallocated activities and available resources after the first iteration.
A new iteration begins, running the Candidate Finders again to propose new candidates to the Candidate Validator.
This iterative process continues until either:
-
All possible assignments are made.
-
No further allocations can be achieved, given the constraints.