50 #ifdef CHECK_MEMORY_LEAKS
52 #endif // CHECK_MEMORY_LEAKS
59 : myVehicleTypes(), myDefaultVTypeMayBeDeleted(true),
60 myRoutesOutput(0), myRouteAlternativesOutput(0), myTypesOutput(0),
61 myReadRouteNo(0), myDiscardedRouteNo(0), myWrittenRouteNo(0),
62 myHaveRestrictions(false),
63 myNumInternalEdges(0) {
105 std::map<std::string, SUMOVehicleParameter::Stop*>::const_iterator it =
myBusStops.find(
id);
107 WRITE_ERROR(
"The bus stop '" +
id +
"' occurs at least twice.");
121 RONet::openOutput(
const std::string& filename,
const std::string altFilename,
const std::string typeFilename) {
122 if (filename !=
"") {
125 myRoutesOutput->
writeAttr(
"xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance").
writeAttr(
"xsi:noNamespaceSchemaLocation",
"http://sumo-sim.org/xsd/routes_file.xsd");
127 if (altFilename !=
"") {
132 if (typeFilename !=
"") {
134 myTypesOutput->
writeXMLHeader(
"routes",
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo-sim.org/xsd/routes_file.xsd\"");
169 return it2->second->get();
210 WRITE_ERROR(
"The vehicle type '" + type->
id +
"' occurs at least twice.");
235 WRITE_ERROR(
"The vehicle '" +
id +
"' occurs at least twice.");
256 myPersons.insert(std::pair<const SUMOTime, const std::string>(depart, desc));
265 std::string noRouteMsg =
"The vehicle '" + veh->
getID() +
"' has no valid route.";
278 if (current == 0 || current->
size() == 0) {
284 if (options.
getBool(
"remove-loops")) {
287 if (current->
size() == 0) {
289 mh->
inform(noRouteMsg +
" (after removing loops)");
301 std::vector<std::string> toRemove;
309 if (depart >= time +
DELTA_T) {
327 toRemove.push_back(i->first);
330 for (std::vector<std::string>::const_iterator i = toRemove.begin(); i != toRemove.end(); ++i) {
346 PersonMap::iterator person =
myPersons.begin();
349 if (vehicleTime > time && personTime > time) {
350 lastTime =
MIN2(vehicleTime, personTime);
353 if (vehicleTime < personTime) {
355 if (lastTime != vehicleTime && lastTime != -1) {
357 if (options.
getInt(
"stats-period") >= 0 && ((
int) vehicleTime % options.
getInt(
"stats-period")) == 0) {
361 lastTime = vehicleTime;
379 (*myRoutesOutput) << person->second;
381 (*myRouteAlternativesOutput) << person->second;
408 const std::map<std::string, ROEdge*>&