The load solver uses the following pseudo-code to pass the ask from the operation to the resource.
In case the load has alternates, an aggregate resource or a required skill, the algorithm will search the suitable combination.
Call function chooseResource
else
// Load has alternates
Build a list of alternates, ordered by priority
Switch to constrained planning mode
Loop through all alternates
Switch to the alternate
Call function chooseResource
If reply is positive and search mode is priority
Return positive reply and exit
if search mode is not priority and reply is positive
Switch back to the best alternate found in the above loop
if reply is 0
if planning mode is unconstrained
Switch to the first alternate
Change the planning mode to unconstrained again
Return full quantity and exit
else
Log the resource of the first alternate as the constraint on the order
Return 0 and exit
else
Return positive reply and exit
function chooseResource:
// Normal load
If no skills are involved and the resource is not an aggregate resource
Call the resource solver
Return the result of the resource solver.
else
Find all member-resources that have the required skill
Loop over all matching resources in order of priority
Switch the operationplan to the resource
Call the resource solver
If the resource reply is positive and the search mode is PRIORITY
Return the result of the resource solver
If search mode wasn’t priority
Switch back to the best alternate with a positive reply from the above loop
Return the result of the resource solver
If no positive reply was received at all
If the plan type is unconstrained
Switch the plan to the primary resource
Return positive reply
else
Log this resource as a constraint for meeting the demand on time
Return 0 and earliest next date