ruspy.simulation.simulation_auxiliary.simulate_strategy¶
-
ruspy.simulation.simulation_auxiliary.
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.array
see Observed costs
- ev
numpy.array
- trans_mat
numpy.array
- 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.array
A two dimensional numpy array containing for each bus in each period the state as an integer.
- decisions
numpy.array
A two dimensional numpy array containing for each bus in each period the decision as an integer.
- utilities
numpy.array
A two dimensional numpy array containing for each bus in each period the utility as a float.
- usage
numpy.array
A two dimensional numpy array containing for each bus in each period the mileage usage of last period as integer.
- states