From 6019543992d414495d3ae4554180a839ca59c4f8 Mon Sep 17 00:00:00 2001 From: Moritz Sallermann Date: Thu, 7 Mar 2024 15:35:23 +0000 Subject: [PATCH] Some prints for the simulation runs --- .gitignore | 2 ++ src/main.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 473e7cd..32ee459 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*.txt + .cache/ output/ diff --git a/src/main.cpp b/src/main.cpp index ad78599..1329de4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,7 +45,6 @@ int main( int argc, char * argv[] ) auto simulation = Seldon::Simulation( config_file_path.string(), network_file, agent_file ); // Seldon::IO::network_to_dot_file( *simulation.network, ( output_dir_path / fs::path( "network.dot" ) ).string() ); - Seldon::IO::network_to_file( simulation, ( output_dir_path / fs::path( "network_0.txt" ) ).string() ); auto filename = fmt::format( "opinions_{}.txt", 0 ); Seldon::IO::opinions_to_file( simulation, ( output_dir_path / fs::path( filename ) ).string() ); @@ -53,6 +52,9 @@ int main( int argc, char * argv[] ) const std::optional n_output_agents = simulation.output_settings.n_output_agents; const std::optional n_output_network = simulation.output_settings.n_output_network; + fmt::print( "=================================================================\n" ); + fmt::print( "Starting simulation\n" ); + typedef std::chrono::milliseconds ms; auto t_simulation_start = std::chrono::high_resolution_clock::now(); do @@ -95,5 +97,7 @@ int main( int argc, char * argv[] ) fmt::print( "Finished after {} iterations, total time = {:%Hh %Mm %Ss}\n", simulation.model->n_iterations, std::chrono::floor( total_time ) ); + fmt::print( "=================================================================\n" ); + return 0; } \ No newline at end of file