template<typename T>
class delphyne::AgentSimulationBaseBuilder< T >
A builder for agent-based simulations.
For a system-level architecture diagram, see #5541.
- Template Parameters
-
Instantiated templates for the following types are provided:
#include <src/backend/agent_simulation_builder.h>
◆ AgentSimulationBaseBuilder()
◆ AddAgent() [1/3]
Blueprint* AddAgent |
( |
BlueprintArgs &&... |
args | ) |
|
Constructs a Blueprint in-place and uses it to build and take ownership of an agent, which is to be wired into the simulation.
- Parameters
-
args | Blueprint constructor arguments. |
- Returns
- A bare pointer to the added AgentBaseBlueprint<T> instance, which will remain valid for the lifetime of this simulation builder.
- Exceptions
-
std::runtime_error | if another agent with the same name has been wired already. |
- Template Parameters
-
Blueprint | An AgentBaseBlueprint<T> subclass. |
BlueprintArgs | Blueprint constructor arguments types. |
◆ AddAgent() [2/3]
BaseBlueprint<T>* AddAgent |
( |
BlueprintArgs &&... |
args | ) |
|
Constructs a Blueprint in-place and uses it to build and take ownership of an agent, which is to be wired into the simulation.
- Parameters
-
args | Blueprint constructor arguments. |
- Returns
- A bare pointer to the added AgentBaseBlueprint<T> instance, which will remain valid for the lifetime of this simulation builder.
- Exceptions
-
std::runtime_error | if another agent with the same name has been wired already. |
- Template Parameters
-
Blueprint | An AgentBaseBlueprint subclass, to be specialized for T. |
BlueprintArgs | Blueprint constructor arguments types. |
◆ AddAgent() [3/3]
Blueprint* AddAgent |
( |
std::unique_ptr< Blueprint > |
blueprint | ) |
|
Uses the given blueprint
to build and take ownership of an agent, which is to be wired into the simulation.
Blueprint ownership is transferred to the built agent.
- Parameters
-
blueprint | The agent blueprint to be used. |
- Returns
- A bare pointer to the added AgentBaseBlueprint<T> instance, which will remain valid for the lifetime of this simulation builder.
- Exceptions
-
std::runtime_error | if blueprint is nullptr. |
std::runtime_error | if another agent with the same name has been wired already. |
- Template Parameters
-
Blueprint | An AgentBaseBlueprint<T> subclass. |
◆ Build()
Builds the simulation.
Construction of the simulation's Diagram representation is completed and a Simulator is built and initialized with it. All agents' ownership is transferred to the simulation instance.
- Returns
- Ownership of the AgentSimulationBase instance just built.
◆ GetMaxStepSize()
const T& GetMaxStepSize |
( |
| ) |
const |
Gets maximum integration step size for the simulation to be built.
◆ GetRoadGeometry()
Gets the RoadGeometry from this simulation.
◆ GetTargetRealTimeRate()
double GetTargetRealTimeRate |
( |
| ) |
const |
Gets the target real-time rate for the simulation to be built.
◆ Reset()
Resets the builder internal state, leaving it ready for another building procedure.
◆ SetRoadNetwork() [1/2]
Sets the RoadNetwork for this simulation and use its road geometry.
- Parameters
-
road_network | The road network to use for the simulation. |
◆ SetRoadNetwork() [2/2]
Sets the RoadNetwork for this simulation.
- Parameters
-
road_network | The road network to use for the simulation. |
features | The road features that will be shown in the simulation. |
- See also
- documentation of maliput::utility::ObjFeatures
◆ SetTargetRealTimeRate()
void SetTargetRealTimeRate |
( |
double |
realtime_rate | ) |
|
Sets the target real-time rate for the simulation to be built.
- Parameters
-
realtime_rate | The real-time rate to be set. |
- Exceptions
-
std::runtime_error | if realtime_rate is a negative number. |
◆ UsesFixedStepMode()
bool UsesFixedStepMode |
( |
| ) |
const |
Whether the simulation's integrator should work on a fixed step basis or not.
The documentation for this class was generated from the following files: