Class Model
Defined in File model.h
Inheritance Relationships
Base Type
public std::enable_shared_from_this< Model >
Derived Type
public kami::ReporterModel
(Class ReporterModel)
Class Documentation
-
class Model : public std::enable_shared_from_this<Model>
An abstract for generic models.
See also
Subclassed by kami::ReporterModel
Public Functions
-
std::shared_ptr<Domain> get_domain()
Get the
Domain
associated with this model.- Returns
a shared pointer to the
Domain
Add a
Domain
to this scheduler.This method will associate a model with the scheduler.
- Returns
a shared pointer to the
Domain
-
std::shared_ptr<Population> get_population()
Get the
Population
associated with this model.- Returns
a shared pointer to the
Population
Add a
Model
to this scheduler.This method will associate a model with the scheduler.
- Returns
a shared pointer to the
Population
-
std::shared_ptr<Scheduler> get_scheduler()
Get the
Scheduler
associated with this model.- Returns
a shared pointer to the
Scheduler
Add a
Model
to this scheduler.This method will associate a model with the scheduler.
- Returns
a shared pointer to the
Scheduler
-
virtual std::shared_ptr<Model> step()
Execute a single time step of the model.
This method will collect all the
Agent
s in thePopulation
associated with model and pass them to the associatedScheduler
for stepping.- Returns
a shared pointer to the model instance
Protected Attributes
-
std::shared_ptr<Population> _pop = nullptr
Reference copy of the
Population
-
std::shared_ptr<Domain> get_domain()