fpmas-metamodel 1.0
|
#include <metamodel.h>
Public Member Functions | |
MetaModel (std::string name, ModelConfig config, fpmas::api::scheduler::Scheduler &scheduler, fpmas::api::runtime::Runtime &runtime, fpmas::api::model::LoadBalancing &lb_algorithm, fpmas::scheduler::TimeStep lb_period) | |
MetaModel< BaseModel, AgentType > * | init () override |
void | run () override |
std::string | getName () const override |
fpmas::api::model::Model & | getModel () override |
fpmas::api::model::AgentGroup & | cellGroup () override |
fpmas::api::model::AgentGroup & | agentGroup () override |
DotOutput & | getDotOutput () override |
virtual std::string | getName () const =0 |
virtual fpmas::api::model::Model & | getModel ()=0 |
virtual fpmas::api::model::AgentGroup & | cellGroup ()=0 |
virtual fpmas::api::model::AgentGroup & | agentGroup ()=0 |
virtual DotOutput & | getDotOutput ()=0 |
virtual BasicMetaModel * | init ()=0 |
virtual void | run ()=0 |
Protected Member Functions | |
virtual void | buildCells (const ModelConfig &config)=0 |
virtual void | buildAgents (const ModelConfig &config)=0 |
Protected Attributes | |
BaseModel | model |
Generic MetaModel implementation, with features that are common for both MetaGraphModel and MetaGridModel. The MetaModel class cannot be used on its own.
BaseModel | The concrete underlying spatial model type, such as SpatialModel<...> or GridModel<...> |
AgentType | The concrete type of Spatial Agents, such as SpatialAgent<...> or GridAgent<...> |
MetaModel< BaseModel, AgentType >::MetaModel | ( | std::string | name, |
ModelConfig | config, | ||
fpmas::api::scheduler::Scheduler & | scheduler, | ||
fpmas::api::runtime::Runtime & | runtime, | ||
fpmas::api::model::LoadBalancing & | lb_algorithm, | ||
fpmas::scheduler::TimeStep | lb_period | ||
) |
MetaModel constructor.
name | Name of the model |
config | Model configuration |
scheduler | Scheduler on which agent execution, load balancing and outputs are planned |
runtime | Runtime used to execute the MetaModel |
lb_algorithm | Load balancing algorithm to apply to the MetaModel |
lb_period | Period at which the load balancing algorithm should be applied, starting at time step 0 |
|
protectedpure virtual |
Method used to build the Cell network.
config | Model configuration |
Implemented in MetaGridModel< SyncMode >, and MetaGraphModel< SyncMode >.
|
protectedpure virtual |
Method used to build Spatial Agents and place them on the Cell network.
config | Model configuration |
Implemented in MetaGridModel< SyncMode >, and MetaGraphModel< SyncMode >.
|
overridevirtual |
Initializes the Cell network and Spatial Agents.
Implements BasicMetaModel.
|
inlineoverridevirtual |
Runs the MetaModel.
Implements BasicMetaModel.
|
inlineoverridevirtual |
Name of the model.
Implements BasicMetaModel.
|
inlineoverridevirtual |
Generic model instance.
Implements BasicMetaModel.
|
inlineoverridevirtual |
Agent group containing the Cell network.
Implements BasicMetaModel.
|
inlineoverridevirtual |
Agent group containing Spatial Agents.
Implements BasicMetaModel.
|
inlineoverridevirtual |
Can be used to perform a model output in a DOT file.
Implements BasicMetaModel.
|
protected |
Spatial model instance.