54 #ifdef CHECK_MEMORY_LEAKS
56 #endif // CHECK_MEMORY_LEAKS
64 myRoutesOutput(0), myRouteAlternativesOutput(0), myTypesOutput(0),
65 myReadRouteNo(0), myDiscardedRouteNo(0), myWrittenRouteNo(0),
66 myHaveRestrictions(false), myDefaultVTypeMayBeDeleted(true) {
110 RONet::openOutput(
const std::string& filename,
bool useAlternatives,
const std::string& typefilename) {
112 myRoutesOutput->
writeXMLHeader(
"routes",
"",
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/routes_file.xsd\"");
113 if (useAlternatives) {
114 size_t len = filename.length();
115 if (len > 4 && filename.substr(len - 4) ==
".xml") {
120 myRouteAlternativesOutput->
writeXMLHeader(
"route-alternatives",
"",
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/routes_file.xsd\"");
122 if (typefilename !=
"") {
124 myTypesOutput->
writeXMLHeader(
"routes",
"",
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/routes_file.xsd\"");
180 WRITE_ERROR(
"The vehicle type '" + type->
id +
"' occurs at least twice.");
195 WRITE_ERROR(
"The vehicle '" +
id +
"' occurs at least twice.");
204 std::string noRouteMsg =
"The vehicle '" + veh->
getID() +
"' has no valid route.";
205 if (options.
getBool(
"ignore-errors")) {
220 if (current == 0 || current->
size() == 0) {
226 if (options.
getBool(
"remove-loops")) {
229 if (current->
size() == 0) {
231 mh->
inform(noRouteMsg +
" (after removing loops)");
251 if (currentTime > time) {
252 lastTime = currentTime;
256 if (lastTime != currentTime && lastTime != -1) {
258 if (options.
getInt(
"stats-period") >= 0 && ((
int) currentTime % options.
getInt(
"stats-period")) == 0) {
262 lastTime = currentTime;
346 for (std::map<std::string, ROEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
366 const std::map<std::string, ROEdge*> &