Glossary

action

A primitive operation executed by an agent during a single step of a dynamic simulation. For example, a car might take an action which sets its throttle, or turns on its headlights. Actions are defined by the simulator interfaces (or abstract domains like scenic.domains.driving) as subclasses of Action.

agent

A Scenic Object which has a dynamic behavior (set as its behavior property).

dynamic behavior

A function defining the behavior of an agent during a simulation. The function runs in parallel with the simulation, taking actions at each time step. See our tutorial on Dynamic Scenarios for examples.

dynamic properties

Properties of Scenic objects which are updated at each time step of a dynamic simulation. The built-in properties representing positions, orientations, velocities, etc. are all dynamic (see Object). See the source code of scenic.domains.driving.model.DrivingObject for an example of defining a dynamic property.

external parameters

Values which are determined by an external tool instead of Scenic’s own sampler. These allow using optimization or other techniques to explore parameters of Scenic scenarios beyond simple random sampling. For how to define external parameters or interface to new external samplers, see scenic.core.external_params.

modular scenario

A scenario defined using the scenario statement (rather than simply being the content of a Scenic file). Such scenarios can take arguments, be instantiated multiple times, and be composed with other scenarios: see Composing Scenarios.

monitor

A function which runs in parallel with a simulation, rejecting or terminating the simulation if conditions of interest are met (using the require and terminate statements). Monitors use similar syntax to dynamic behaviors, except that they are not associated with a specific Object and do not take actions (only using wait to advance time).

preferred orientation

A Vector Field set as the orientation attribute of a Region, indicating that objects placed within that region should be oriented to align along that vector field unless otherwise specified. For example, the road region provided by the Driving Domain has as its preferred orientation the roadDirection vector field, so that vehicles positioned using the specifier on road will be facing the nominal traffic direction at their position by default (i.e., the specifier specifies heading optionally, so that an explicit facing H specifier will override it).

visible region

The Region which is “visible” from a given Object for the purposes of the can see operator, the visible specifier, etc. Scenic uses a simple visibility model where each object has a view cone and occlusion is ignored: see the documentation of the can see operator for details.

world model

A Scenic library defining classes, regions, actions, helper functions, etc. for use by scenarios targeting a particular simulator or application domain. For example, the world model for the Driving Domain, scenic.domains.driving.model, defines classes for vehicles, actions for steering, and regions for different parts of the road network. In the line Car in intersection, only the in specifier is built into Scenic: the class Car and the region intersection are defined by the world model. A world model can be used through the model statement, or simply by importing it like any other Scenic module.

See also

Defining a World Model gives further examples and details on how to write a world model.