Standard resource
The solver algorithm goes through the following pseudo-code to find available capacity on a resource.
The algorithm is called to solve the capacity constraints of a particular operationplan on a particular resource.
If the planning mode is unconstrained
Return positive reply
else
Loop
If planning constraints include lead time or fence
Check lead time and fence constraints
Exit the loop if lead time or fence constraints are violated
Scan whether the resource is overloaded during the duration of the operationplan
If overloaded
Try resizing the operationplan to avoid the overload
If that is feasible
Return positive reply and exit
Move the operationplan earlier in time such that the end date fits on the resource without overloading it
The allowed time horizon for this search is limited by the maxearly field, current date and fence date
If no available capacity is found in the allowed time horizon
Break out of the loop
until no overload is found
// The operationplan is not capacity feasible
Log this resource as a constraint in meeting the demand on time
Try moving the operation to a date after the original requested date where it is feasible
Return 0 and the feasible date found
Return positive reply
else
Loop
If planning constraints include lead time or fence
Check lead time and fence constraints
Exit the loop if lead time or fence constraints are violated
Scan whether the resource is overloaded during the duration of the operationplan
If overloaded
Try resizing the operationplan to avoid the overload
If that is feasible
Return positive reply and exit
Move the operationplan earlier in time such that the end date fits on the resource without overloading it
The allowed time horizon for this search is limited by the maxearly field, current date and fence date
If no available capacity is found in the allowed time horizon
Break out of the loop
until no overload is found
// The operationplan is not capacity feasible
Log this resource as a constraint in meeting the demand on time
Try moving the operation to a date after the original requested date where it is feasible
Return 0 and the feasible date found
Infinite resource
Always reply for the full quantity.