fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ModelConfig Struct Reference

#include <config.h>

Inheritance diagram for ModelConfig:
Inheritance graph
[legend]
Collaboration diagram for ModelConfig:
Collaboration graph
[legend]

Public Member Functions

 ModelConfig (const GraphConfig &graph_config)
 
 ModelConfig (YAML::Node config)
 
- Public Member Functions inherited from GraphConfig
template<typename T >
void load_config_optional (std::string field_name, T &target, YAML::Node node, std::string type_name, const T &default_value)
 
template<typename T >
void load_config (std::string field_name, T &target, YAML::Node node, std::string type_name)
 
 GraphConfig (YAML::Node config)
 

Public Attributes

float occupation_rate
 
fpmas::api::scheduler::TimeStep num_steps
 
AgentInteractions agent_interactions = AgentInteractions::LOCAL
 
Interactions cell_interactions = Interactions::NONE
 
bool dynamic_cell_edge_weights = false
 
SyncMode sync_mode = SyncMode::GHOST_MODE
 
std::size_t cell_size = 0
 
float agent_weight = 1.0f
 
fpmas::api::scheduler::TimeStep refresh_local_contacts
 
fpmas::api::scheduler::TimeStep refresh_distant_contacts
 
std::vector< TestCaseConfigtest_cases
 
- Public Attributes inherited from GraphConfig
bool is_valid = true
 
Environment environment
 
std::size_t grid_width
 
std::size_t grid_height
 
std::size_t num_cells
 
std::size_t output_degree
 
float p
 
float cell_weight = 1.0f
 
Utility utility = Utility::UNIFORM
 
std::vector< GridAttractorgrid_attractors
 
float zoltan_imbalance_tol = 1.1
 
bool json_output = false
 
int json_output_period = -1
 
bool dot_output = false
 

Detailed Description

General MetaModel configuration.

Constructor & Destructor Documentation

◆ ModelConfig() [1/2]

ModelConfig::ModelConfig ( const GraphConfig graph_config)

Builds a ModelConfig from the specified GraphConfig.

All other fields are left to their default value.

Parameters
graph_configexisting environment configuration

◆ ModelConfig() [2/2]

ModelConfig::ModelConfig ( YAML::Node  config)

Loads the configuration from the specified YAML node.

Parameters
configYAML configuration

Member Data Documentation

◆ occupation_rate

float ModelConfig::occupation_rate

Agent occupation rate. The total count of agents is set as total cell count * occupation_rate.

◆ num_steps

fpmas::api::scheduler::TimeStep ModelConfig::num_steps

Number of time steps to simulate.

◆ agent_interactions

AgentInteractions ModelConfig::agent_interactions = AgentInteractions::LOCAL

Type of agent interactions.

◆ cell_interactions

Interactions ModelConfig::cell_interactions = Interactions::NONE

Interactions between cells within the cell network. Spatial agent interactions is currently not supported, so this feature is more relevant in a pure graph model, where occupation_rate=0.

◆ dynamic_cell_edge_weights

bool ModelConfig::dynamic_cell_edge_weights = false

If true, the weight of each edge in the cell network is incremented by the count of agents located in the cell at each iteration. This might be useful to reflect the DistributedMoveAlgorithm cost within the graph.

◆ sync_mode

SyncMode ModelConfig::sync_mode = SyncMode::GHOST_MODE

Synchronization mode.

◆ cell_size

std::size_t ModelConfig::cell_size = 0

Size of cells data, in bytes. This is useful to evaluate the evolution of the duration of read/write operations depending of the amount of data to transfer for each cell.

◆ agent_weight

float ModelConfig::agent_weight = 1.0f

Agent weight.

◆ refresh_local_contacts

fpmas::api::scheduler::TimeStep ModelConfig::refresh_local_contacts

If agent_interactions is CONTACTS, period at which new contacts are added from the current perceptions of the agent.

See also
MetaAgent::create_relations_neighbors_group()

◆ refresh_distant_contacts

fpmas::api::scheduler::TimeStep ModelConfig::refresh_distant_contacts

If agent_interactions is CONTACTS, period at which contacts are built from two randomly selected contacts.

See also
MetaAgent::create_relations_from_contacts()

◆ test_cases

std::vector<TestCaseConfig> ModelConfig::test_cases

List of test cases for the current set up. A new model is built and simulated for each case.


The documentation for this struct was generated from the following file: