time_dependent.nspp_simulation()

Generate a pandas dataframe that contains multiple replications of

Usage

Source

time_dependent.nspp_simulation(
    arrival_profile,
    run_length=None,
    n_reps=1000,
)

a non-stationary poisson process for the set arrival profile.

This uses the sim-tools NSPPThinning class.

Useful for validating the the NSPP has been set up correctly and is producing the desired profile for the simulation model.

On each replication the function counts the number of arrivals during the intervals from the arrival profile. Returns a data frame with reps (rows) and interval arrivals (columns).

Parameters

arrival_profile: pd.DataFrame

The arrival profile is a pandas data frame containing ‘t’, ‘arrival_rate’ and ‘mean_iat’ columns.

run_length: Optional[float] = None

How long should the simulation be run. If none then uses the last value in ‘t’ + the interval (assumes equal width intervals)

n_reps: Optional[int] = 1000
The number of replications to run.

Returns

pd.DataFrame.