99 #include <mesosim/MELoop.h>
100 #include <mesosim/StateHandler.h>
108 #ifdef CHECK_MEMORY_LEAKS
110 #endif // CHECK_MEMORY_LEAKS
159 throw ProcessError(
"A network was not yet constructed.");
167 myRouterTTInitialized(false),
168 myRouterTTDijkstra(0),
172 throw ProcessError(
"A network was already constructed.");
209 std::vector<SUMOTime> stateDumpTimes,
210 std::vector<std::string> stateDumpFiles) {
248 myMsgEmitter.clear();
257 delete MSGlobals::gMesoNet;
313 std::ostringstream msg;
314 msg <<
"Performance: " <<
"\n" <<
" Duration: " << duration <<
" ms" <<
"\n";
317 msg.setf(std::ios::fixed , std::ios::floatfield);
318 msg.setf(std::ios::showpoint);
324 const std::string collisionNotice = (
327 const std::string teleportNotice = (
331 msg <<
"Vehicles: " <<
"\n"
380 MSGlobals::gMesoNet->simulate(
myStep);
465 if (stopTime >= 0 &&
myStep >= stopTime) {
478 return "The final simulation step has been reached.";
480 return "All vehicles have left the simulation.";
482 return "TraCI requested termination.";
484 return "An error occured (see log).";
486 return "Too many vehicles.";
488 return "Unknown reason.";
547 timestep = timestep.substr(0, timestep.length() - 3);
549 std::string filename = output +
"_" + timestep +
".vtp";
569 <<
"meanWaitingTime=\"";
571 od <<
"\" meanTravelTime=\"";
617 std::ostringstream oss;
618 oss.setf(std::ios::fixed , std::ios::floatfield);
619 oss.setf(std::ios::showpoint);
626 oss <<
" (0ms ?*RT. ?";
628 oss <<
"UPS, vehicles"
633 std::cout << oss.str().substr(0, 78 - prev.length());
659 (*i)->vehicleStateChanged(vehicle, to);
681 for (std::map<std::string, MSBusStop*>::const_iterator it = vals.begin(); it != vals.end(); ++it) {
684 return stop->
getID();
696 if (routingAlgorithm ==
"dijkstra") {
700 if (routingAlgorithm !=
"astar") {
701 WRITE_WARNING(
"TraCI and Triggers cannot use routing algorithm '" + routingAlgorithm +
"'. using 'astar' instead.");
732 MSNet::getMsgEmitter(
const std::string& whatemit) {
734 msgEmitVec = myMsgEmitter.buildAndGetStaticVector();
735 for (std::vector<MSMessageEmitter*>::iterator it = msgEmitVec.begin(); it != msgEmitVec.end(); ++it) {
736 if ((*it)->getEventsEnabled(whatemit)) {
745 MSNet::createMsgEmitter(std::string&
id,
747 const std::string& base,
748 std::string& whatemit,
753 MSMessageEmitter* msgEmitter =
new MSMessageEmitter(file, base, whatemit, reverse, table, xy, step);
754 myMsgEmitter.add(
id, msgEmitter);