Changeset 1089 for applications/doprava/aimsun_bdm/aimsun_ds.cpp
- Timestamp:
- 06/11/10 23:31:59 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/doprava/aimsun_bdm/aimsun_ds.cpp
r1032 r1089 136 136 UI::get ( stopTime, cfg, "stop_time" ); 137 137 138 /* Try to load number of stop cycle from configuration, 139 if the value is present, stopTime is overwritten */ 140 if (UI::get ( stopCycle, cfg, "stop_cycle" )) { 141 //TODO I don't know if I can read length of step somewhere, so hardwired now 142 int totalTime=stopCycle*90; 143 144 int hours = totalTime / 3600; 145 int minutes = ( totalTime % 3600 )/ 60; 146 int seconds = totalTime % 60; 147 148 stopTime=int_to_string(hours)+":"+int_to_string(minutes)+":"+int_to_string(seconds); 149 } 150 else { 151 stopCycle=960; 152 } 153 138 154 /* Query the configuration file for the name of the file containsing 139 155 vehicle entrances. */ … … 663 679 vgs_get_last_stats ( §ions_stats ); 664 680 } 681 682 string AimsunDS::int_to_string(int const i) 683 { 684 std::stringstream ss; 685 ss << i; 686 if (i<10) 687 return "0" + ss.str(); 688 else 689 return ss.str(); 690 } 691