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_periods
python:int The number of periods to be simulated.
- num_buses
python:int The number of buses to be simulated.
- costs
numpy.ndarray see Observed costs
- ev
numpy.ndarray - trans_mat
numpy.ndarray - disc_fac
python:float see Discount factor
- seed
python:int A positive integer setting the random seed for drawing random numbers.
- num_periods
- Returns
- states
numpy.ndarray A two dimensional numpy array containing for each bus in each period the state as an integer.
- decisions
numpy.ndarray A two dimensional numpy array containing for each bus in each period the decision as an integer.
- utilities
numpy.ndarray A two dimensional numpy array containing for each bus in each period the utility as a float.
- usage
numpy.ndarray A two dimensional numpy array containing for each bus in each period the mileage usage of last period as integer.
- states