Print Statistics
from Simulation.cpp, line 417 ff:
void Simulation::PrintStatistics(double simTime)
for (const auto& itr : _building->GetAllTransitions()) {
Transition* goal = itr.second;
if (goal->GetDoorUsage()) {
Log->Write(
"\nExit ID [%d] used by [%d] pedestrians. Last passing time [%0.2f] s",
goal->GetID(), goal->GetDoorUsage(),
goal->GetLastPassingTime());
string statsfile = "flow_exit_id_"+to_string(goal->GetID())+".txt";
if(goal->GetOutflowRate() < (std::numeric_limits<double>::max)())
{
char tmp[50];
sprintf(tmp, "%.2f", goal->GetOutflowRate());
statsfile = "flow_exit_id_"+to_string(goal->GetID())+"_rate_"+tmp+".txt";
}
Log->Write("More Information in the file: %s", statsfile.c_str());
{
auto statOutput = new FileHandler(statsfile.c_str());
statOutput->Write("#Simulation time: %.2f", simTime);
statOutput->Write("#Flow at exit "+goal->GetCaption()+"( ID "+to_string(goal->GetID())+" )");
statOutput->Write("#Time (s) cummulative number of agents \n");
statOutput->Write(goal->GetFlowCurve());
statOutput->FileHandler::~FileHandler();
}
}
}
Can we change the filename flow_exit_id_
in line 430 like the trajectory filename (e.g. flow_exit_id_filename.txt
?