The SimulationExecutive
class defined in C++ is the ultimate one stop shop for running the simulation. It includes specified implementations of the scheduler, a frame tree and associated search functions, and functions for logging and integration setup. This guide provides an overview of how to interact with the SimulationExecutive
class.
The SimulationExecutive
Class
Description and Naming
The SimulationExecutive
class manages the execution of simulations, integrating various components like scheduling, logging, and visual management. The class is responsible for parsing arguments, setting simulation parameters, and controlling the simulation flow.
For a complete guide on interacting with the SimulationExecutive
class, refer to the Doxygen documentation:
SimulationExecutive Doxygen
Creating a SimulationExecutive
Description | C++ Example | Python Example |
---|---|---|
Constructor - Creates a |
|
|
Parsing Arguments
Description | C++ Example | Python Example |
---|---|---|
Parsing Command Line Arguments - Parses command line arguments which are provided from script start in C++ and Python. |
|
|
Parsing Arguments from Vector - Parses arguments from a vector of strings. |
|
|
Setting Simulation Parameters
Description | C++ Example | Python Example |
---|---|---|
Setting Integrator - Sets the integrator type. Current valid options are 1 or FORWARD_EULER for forward euler and 4 or RK4 for RK4 |
|
|
Getting Integrator - Gets the integrator type. |
|
|
Setting Simulation Rate (Hz) - Sets the simulation run rate in Hz. |
|
|
Setting Simulation Rate (Seconds) - Sets the simulation run rate in seconds. |
|
|
Setting Simulation End Time - Sets the simulation end time. Note: better to set this from the command line with --end=<endtime> |
|
|
Getting Simulation End Time - Gets the simulation end time. |
|
|
Running the Simulation
Description | C++ Example | Python Example |
---|---|---|
Starting the Simulation - Initializes the simulation executive and its components. |
|
|
Stepping the Simulation - Steps the scheduler by a single step. |
|
|
Stepping the Simulation with Step Size - Steps the scheduler by a specified step size. |
|
|
Searching
Description | C++ Example | Python Example |
---|---|---|
Searching the Simulation Tree - Searches the simulation tree for a match. |
|
|
Searching the Frame Tree - Searches only the frame tree for a match. |
|
|
Searching the Simulation Architecture Tree - Searches the simulation architecture tree for a match. |
|
|
Logging and Visuals
Description | C++ Example | Python Example |
---|---|---|
Adding a Logger with Rate - Registers and sets up a logger with a specified rate in Hz. |
|
|
Enabling Visuals - Enables visuals for the simulation. |
|
|
Disabling Visuals - Disables visuals for the simulation. |
|
|
Additional Operations
Description | C++ Example | Python Example |
---|---|---|
Checking Termination Status - Returns the termination flag of the simulation. |
|
|
Getting Run Number - Gets the run number for the simulation. |
|
|
Accessing Arguments - Accesses the arguments of the simulation. |
|
|
Accessing Dispersions - Accesses the dispersions of the simulation. |
|
|