set_resource_option

Enable resource leveling during the simulation runs.

Monte-Carlo simulations can generate resource overallocations due to changes in activity durations. When these newly generated overallocations should be avoided, each newly simulated schedule can be the subject to a new resource leveling. However, automatic resource leveling during simulation runs is often a complex task. It can be CPU intensive and can also lead to infeasible solutions in case not enough resources are available. The automatic leveling search engine during the simulation runs works with the following parameters from the P2Schedule:level_resources function:
  • The fixedDW parameter is automatically set to one. Consequently, the resource overallocations are solved using the “fixed duration” mode and hence using the “fixed work” mode is not possible during simulations.
  • They way resource overallocations are solved depends on the ScheduleMethodID parameter and can be briefly summarized as follows:
    • Between 0 and 12: choose one of the 12 priority rules.
    • -1: perform an intensive search (CPU intensive).
    • -2: The current start times are used as priorities to solve overallocations. In this case, activities will be delayed or scheduled earlier than originally planned but their sequence in the resource leveled baseline schedule will be retained. This option is not possible in the P2Schedule:level_resources function since it is based on the start times of the baseline schedule used during the simulations.
In order to enable resource leveling during a simulation run, this function should be called before calling the P2Simulator:run_simulation function.
Parameters: 
I/O Type Name Description
input integer level resource leveling: 0 (no) or 1 (yes) 
input integer scheduleMethodID scheduling method ID, between -2 and 12

 

Example: 
function ()
        io.write('\n')
end
Class: 
P2Simulator