Skip to content

Commit

Permalink
Merge branch 'develop' into undirected_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
amritagos committed Apr 10, 2024
2 parents beb4712 + 78f1c92 commit e4d8d0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/DeffuantVector/conf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ model = "Deffuant"
[io]
# n_output_network = 20 # Write the network every 20 iterations
n_output_agents = 1 # Write the opinions of agents after every iteration
print_progress = true # Print the iteration time ; if not set, then does not prints
print_progress = true # Print the iteration time ; if not set, then does not print
output_initial = true # Print the initial opinions and network file from step 0. If not set, this is true by default.
start_output = 1 # Start writing out opinions and/or network files from this iteration. If not set, this is 1.

Expand Down
13 changes: 11 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,17 @@ int main( int argc, char * argv[] )
}
else if( simulation_options.model == Seldon::Config::Model::DeffuantModel )
{
simulation = std::make_unique<Seldon::Simulation<Seldon::DeffuantModel::AgentT>>(
simulation_options, network_file, agent_file );
auto model_settings = std::get<Seldon::Config::DeffuantSettings>( simulation_options.model_settings );
if( model_settings.use_binary_vector )
{
simulation = std::make_unique<Seldon::Simulation<Seldon::DeffuantModelVector::AgentT>>(
simulation_options, network_file, agent_file );
}
else
{
simulation = std::make_unique<Seldon::Simulation<Seldon::DeffuantModel::AgentT>>(
simulation_options, network_file, agent_file );
}
}
else
{
Expand Down

0 comments on commit e4d8d0a

Please sign in to comment.