ruspy.simulation.simulation_functions.simulate_strategy

ruspy.simulation.simulation_functions.simulate_strategy(num_periods, num_buses, costs, ev, trans_mat, disc_fac, seed)[source]

Simulating the decision process.

This function simulates the decision strategy, as long as the current period is below the number of periods and the current highest state of a bus is in the first half of the state space.

Parameters
num_periodspython:int

The number of periods to be simulated.

num_busespython:int

The number of buses to be simulated.

costsnumpy.ndarray

see Observed costs

evnumpy.ndarray

see Expected value of maintenance

trans_matnumpy.ndarray

see Transition matrix

disc_facpython:float

see Discount factor

seedpython:int

A positive integer setting the random seed for drawing random numbers.

Returns
statesnumpy.ndarray

A two dimensional numpy array containing for each bus in each period the state as an integer.

decisionsnumpy.ndarray

A two dimensional numpy array containing for each bus in each period the decision as an integer.

utilitiesnumpy.ndarray

A two dimensional numpy array containing for each bus in each period the utility as a float.

usagenumpy.ndarray

A two dimensional numpy array containing for each bus in each period the mileage usage of last period as integer.