本文整理汇总了C++中Transition::GetID方法的典型用法代码示例。如果您正苦于以下问题:C++ Transition::GetID方法的具体用法?C++ Transition::GetID怎么用?C++ Transition::GetID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transition
的用法示例。
在下文中一共展示了Transition::GetID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrintStatistics
void Simulation::PrintStatistics()
{
Log->Write("\nRooms Egress Time:");
Log->Write("==================");
Log->Write("id\tcaption\tegress time (s)");
for (const auto& it:_building->GetAllRooms()) {
auto&& room = it.second;
if (room->GetCaption()!="outside")
Log->Write("%d\t%s\t%.2f", room->GetID(), room->GetCaption().c_str(), room->GetEgressTime());
}
Log->Write("\nUsage of Exits");
Log->Write("==========");
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 = _config->GetTrajectoriesFile()+"_flow_exit_id_"+to_string(goal->GetID())+".dat";
Log->Write("More Information in the file: %s", statsfile.c_str());
auto output = new FileHandler(statsfile.c_str());
output->Write("#Flow at exit "+goal->GetCaption()+"( ID "+to_string(goal->GetID())+" )");
output->Write("#Time (s) cummulative number of agents \n");
output->Write(goal->GetFlowCurve());
}
}
Log->Write("\n");
}