verse.scenario.scenario.Scenario
- class verse.scenario.scenario.Scenario(config=ScenarioConfig(incremental=False, unsafe_continue=False, init_seg_length=1000, reachability_method=<ReachabilityMethod.DRYVR: 1>, parallel_sim_ahead=8, parallel_ver_ahead=8, parallel=True, try_local=False, print_level=1, pca=True))
Bases:
object
A simulation/verification scenario.
Methods
add_agent
(agent)Adds an agent to the scenario.
set_init
(init_list, init_mode_list[, ...])Sets the initial conditions for all agents.
set_init_single
(agent_id, init, init_mode[, ...])Sets the initial conditions for a single agent.
set_map
(track_map)Sets the map for the scenario.
set_sensor
(sensor)Sets the sensor for the scenario.
simulate
(time_horizon, time_step[, ...])Computes a single simulation trace of a scenario, starting from a single initial state.
simulate_multi
(time_horizon, time_step[, ...])Computes multiple simulation traces of a scenario, starting from multiple initial states.
simulate_simple
(time_horizon, time_step[, ...])Computes a simulation trace of the scenario, starting from a single initial state.
verify
(time_horizon, time_step[, ...])Compute the set of reachable states, starting from a set of initial states states.
cleanup_cache
update_config
- __init__(config=ScenarioConfig(incremental=False, unsafe_continue=False, init_seg_length=1000, reachability_method=<ReachabilityMethod.DRYVR: 1>, parallel_sim_ahead=8, parallel_ver_ahead=8, parallel=True, try_local=False, print_level=1, pca=True))
- set_init(init_list, init_mode_list, static_list=[], uncertain_param_list=[])
Sets the initial conditions for all agents. The order will be the same as the order in which the agents are added.
- set_init_single(agent_id, init: list, init_mode: tuple, static=[], uncertain_param=[])
Sets the initial conditions for a single agent.
- set_sensor(sensor)
Sets the sensor for the scenario. Will use the default sensor when not called.
- simulate(time_horizon, time_step, max_height=None, seed=None) AnalysisTree
Computes a single simulation trace of a scenario, starting from a single initial state. Parameters:
time_horizon (float): Time limit of simulation. Positive float. time_step (float): delta, the sampling period for continuous evolution. max_height (int): Maximum number of discrete transitions seed (int): Seed for sampling initial state if a initial region is given.
Result:
tree (AnalysisTree): Simulation tree contrining possibly multiple simulations
- simulate_multi(time_horizon, time_step, init_dict_list=None, max_height=None, seed=None)
Computes multiple simulation traces of a scenario, starting from multiple initial states. seed: the random seed for sampling a point in the region specified by the initial conditions
- simulate_simple(time_horizon, time_step, max_height=None, seed=None) AnalysisTree
Computes a simulation trace of the scenario, starting from a single initial state. Evaluates the decision logic code directly using Python interpreter (does not use the internal Verse parser and generate nondeterministic transitions). Use the simulate() function for using the Verse interpreted decision logic. seed: the random seed for sampling a point in the region specified by the initial conditions
- verify(time_horizon, time_step, max_height=None, params={}) AnalysisTree
Compute the set of reachable states, starting from a set of initial states states.