Introduction
ERS is a high-performance simulation engine that allows you to create highly scalable simulation models with multi-formalism. In ERS, a model consist of one or more simulation processes that are run in parallel, called simulators. Each simulator handles simulation events and is paired with a submodel, which stores all data related to the simulator. The link between a simulator and submodel is one-to-one; simulators cannot access the submodels that belong to other simulators. We call these simulator-submodel pairs submodels, referring to how they are a subsection of the full simulation model. All simulators and their submodels live inside a model container, which encompasses the entire simulation.
graph TD
MC@{ label: "Model container" }
SIM1@{ label: "Simulator 1" }
SIM2@{ label: "Simulator 2" }
SIM3@{ label: "Simulator N" }
SM1@{ label: "Submodel 1" }
SM2@{ label: "Submodel 2" }
SM3@{ label: "Submodel N" }
subgraph p3 [Submodel N]
SIM3 <--> SM3;
end
subgraph p2 [Submodel 2]
SIM2 <--> SM2;
end
subgraph p1 [Submodel 1]
SIM1 <--> SM1;
end
MC --> SIM1;
MC --> SIM2;
MC --> SIM3;
Figure 1. The layout of a simulation in ERS. The model container contains simulators, each simulator is paired with a submodel.
Simulators
Simulators are responsible for the events within a submodel. They perform the simulation by executing the events. Each simulator runs separate from other simulators, allowing different simulators to run in parallel. Any event scheduled within a single simulator is called a local event. To schedule events between simulators, they can link to other simulators as dependencies and schedule sync-events to them.
Submodels
A submodel is where all simulation data lives. Each submodel uses an Entity-Component-System (ECS) to store data and simulation logic. The two most important pieces of the ECS are:
- Entities: the basic building blocks of the model. They are unique IDs representing objects in the simulation. They donβt hold data themselves, instead data is attached through components. Entities are ordered in a hierarchical structure where each entity can have zero or more child entities.
- Components: define what an entity "is" or "has." Data components hold data like the position or state, while script behaviors implement behavior like reacting to new child entities being added.
For example, a machine in a warehouse is modelled as an entity with an attached component that defines its behavior.
Model containers
A model container contains the simulators and can be seen as the object that represents an entire simulation model in ERS. It is responsible for updating all the simulators and managing the dependencies between simulators. When you update a model container, it updates all of its simulators. It updates the simulators, executing the local events in the simulators and sync-events between the simulators.
Next steps
- Continue getting started in the installation instructions.
- Skip ahead to creating a simulation.