Set a probability value for a breakpoint on the duration of an activity.

Each breakpoint in a probability distribution is defined by two numbers, as follows:

- x-value: time point in the activity duration where the slope of the distribution changes
- y-value: probability of the time point. This probability is a relative number compared to the y-values of all other breakpoints. Consequently, any number can be set, since its real probability will be calculated relative to the other y-values of other breakpoints.

The number of breakpoints is set by calling the P2Simulator:set_number_advanced_distributions** **function. Using advanced distributions is relevant using the P2Simulator:run_simulation function with the advanced parameter set to 1.

Parameters:

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

input | integer | ID | activity ID |

input | integer | ID | breakpoint ID (between 1 and #breakpoints) |

input | float | x | time point of the breakpoint (activity duration) |

input | float | y | probability of the breakpoint (any number) |

Learn More:

Step inside PMKC.

Example:

function ()

io.write('\n')

end

io.write('\n')

end

Class:

P2Simulator