Start a new simulation run and generate simulation data.

The use of the simulations in P2Engine requires a number of parameters to have full flexibility during the simulation runs. Parameters to define the type of simulation, the choice of the data analysis as well as two orther parameters need to be passes as arguments in the run_simulation function.

- Simulation type:
- Standard simulation (stype = 1 to 9): In a standard simulation, one of nine scenarios must be selected. These scenarios are based on Earned Value Management calculations and are described in the book “Measuring Time”. In this simulation type, the “evm” parameter to perform an EVM analysis is automatically set to 1.
- Random simulation (stype = 10): Activity duration are randomly selected from a predefined interval defined by the P2Simulator:set_rs_percentage_early and P2Simulator:set_rs_max_deviation functions that must be called before running a random simulation.
- Advanced simulation: (stype = 11): An advanced simulation run requires predefined distributions on activity durations. This function can only be called when a Monte-Carlo object has been created using the P2Simulator:create_monte_carlo_object function and risk profiles have been defined using the P2Simulator:set_number_advanced_distributions and P2Simulator:set_advanced_distributions functions.
- Data analysis:
- EVM analysis: Calculate the Earned Value Management (EVM) measures (yes/no) during simulation in order to be able to call all “EVM Analysis” functions available in the P2Simulator object. Beware that activities have positive cost values to calculate the EVM key metrics.
- sensitivity analysis: Calculate the sensitivity measures (yes/no) during simulation in order to be able to call all “Sensititivy Analysis” functions available in the P2Simulator object.
- Other parameters:
- Activity overlap: Despite the existence of precedence relations between activities, real project progress can have overlaps between activities. These overlaps violate the baseline precedence relations and can be simulation in run_simulation (currently not supported when stype = 1 to 9 (standard simulation).
- EV accrue: Set the earned value (EV) accrue during simulation to linear or nonlinear, as follows:
- Linear accrue: The EV accrue during simulation is similar to the PV accrue in the baseline schedule. The activity duration may be longer or shorter than its baseline duration, but the EV accrue follows a similar linear pattern than its baseline version.
- Concave or convex: The EV is accrued faster (concave) of slower (convex) than originally planned, denoting that resources are allocated earlier or later to the activity than originally planned. In case a nonlinear EV accrue is chosen, more control can be set in the P2Simulator:set_accrue_values function.

Parameters:

I/O |
Type |
Name |
Description |
---|---|---|---|

input | integer | nrruns | predefined number of simulation runs |

input | integer | stype | 1 - 9 (standard simulation), 10 (random simulation) or
11 (advanced simulation) |

input | integer | evm | EVM data calculations: 0 (no) or 1 (yes) |

input | integer | sensitivity | sensitivity calculations: 0 (no) or 1 (yes) |

input | integer | overlaps | Activity overlaps: 0 (no) or 1 (yes) |

input | integer | EV accrue | EV accrue: 0 (linear),1 (convex) or 2 (concave) |

output | integer | runs | number of actual runs (smaller than nrruns when interrupted) |

Example:

function ()

io.write('\n')

end

io.write('\n')

end

Class:

P2Simulator