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) {
106 RONet::openOutput(
const std::string& filename,
const std::string altFilename,
const std::string typeFilename) {
107 if (filename !=
"") {
110 myRoutesOutput->
writeAttr(
"xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance").
writeAttr(
"xsi:noNamespaceSchemaLocation",
"http://sumo.sf.net/xsd/routes_file.xsd");
112 if (altFilename !=
"") {
117 if (typeFilename !=
"") {
119 myTypesOutput->
writeXMLHeader(
"routes",
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/routes_file.xsd\"");
154 return it2->second->get();
195 WRITE_ERROR(
"The vehicle type '" + type->
id +
"' occurs at least twice.");
220 WRITE_ERROR(
"The vehicle '" +
id +
"' occurs at least twice.");
241 myPersons.insert(std::pair<const SUMOTime, const std::string>(depart, desc));
249 std::string noRouteMsg =
"The vehicle '" + veh->
getID() +
"' has no valid route.";
250 if (options.
getBool(
"ignore-errors")) {
265 if (current == 0 || current->
size() == 0) {
271 if (options.
getBool(
"remove-loops")) {
274 if (current->
size() == 0) {
276 mh->
inform(noRouteMsg +
" (after removing loops)");
288 std::vector<std::string> toRemove;
296 if (depart >= time +
DELTA_T) {
313 toRemove.push_back(i->first);
316 for (std::vector<std::string>::const_iterator i = toRemove.begin(); i != toRemove.end(); ++i) {
332 PersonMap::iterator person =
myPersons.begin();
335 if (vehicleTime > time && personTime > time) {
336 lastTime =
MIN2(vehicleTime, personTime);
339 if (vehicleTime < personTime) {
341 if (lastTime != vehicleTime && lastTime != -1) {
343 if (options.
getInt(
"stats-period") >= 0 && ((
int) vehicleTime % options.
getInt(
"stats-period")) == 0) {
347 lastTime = vehicleTime;
365 (*myRoutesOutput) << person->second;
367 (*myRouteAlternativesOutput) << person->second;
388 const std::map<std::string, ROEdge*>&