54 #ifdef CHECK_MEMORY_LEAKS
56 #endif // CHECK_MEMORY_LEAKS
63 : myVehicleTypes(), myDefaultVTypeMayBeDeleted(true),
64 myRoutesOutput(0), myRouteAlternativesOutput(0), myTypesOutput(0),
65 myReadRouteNo(0), myDiscardedRouteNo(0), myWrittenRouteNo(0),
66 myHaveRestrictions(false) {
110 RONet::openOutput(
const std::string& filename,
bool useAlternatives,
const std::string& typefilename) {
112 if (useAlternatives) {
113 const size_t len = filename.length();
114 if (len > 4 && filename.substr(len - 4) ==
".xml") {
117 if (len > 4 && filename.substr(len - 4) ==
".sbx") {
125 if (useAlternatives) {
128 if (typefilename !=
"") {
130 myTypesOutput->
writeXMLHeader(
"routes",
"",
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/routes_file.xsd\"");
165 return it2->second->get();
206 WRITE_ERROR(
"The vehicle type '" + type->
id +
"' occurs at least twice.");
231 WRITE_ERROR(
"The vehicle '" +
id +
"' occurs at least twice.");
240 std::string noRouteMsg =
"The vehicle '" + veh->
getID() +
"' has no valid route.";
241 if (options.
getBool(
"ignore-errors")) {
256 if (current == 0 || current->
size() == 0) {
262 if (options.
getBool(
"remove-loops")) {
265 if (current->
size() == 0) {
267 mh->
inform(noRouteMsg +
" (after removing loops)");
287 if (currentTime > time) {
288 lastTime = currentTime;
292 if (lastTime != currentTime && lastTime != -1) {
294 if (options.
getInt(
"stats-period") >= 0 && ((
int) currentTime % options.
getInt(
"stats-period")) == 0) {
298 lastTime = currentTime;
381 for (std::map<std::string, ROEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
401 const std::map<std::string, ROEdge*>&