37 #include <xercesc/sax/SAXException.hpp>
38 #include <xercesc/sax/SAXParseException.hpp>
65 #ifdef HAVE_INTERNAL // catchall for internal stuff
66 #include <internal/BulkStarRouter.h>
67 #include <internal/CHRouter.h>
68 #include <internal/CHRouterWrapper.h>
69 #endif // have HAVE_INTERNAL
71 #ifdef CHECK_MEMORY_LEAKS
73 #endif // CHECK_MEMORY_LEAKS
93 if (oc.
isSet(
"weight-files")) {
96 if (oc.
isSet(
"lane-weight-files")) {
114 const std::string measure = oc.
getString(
"weight-attribute");
115 const std::string routingAlgorithm = oc.
getString(
"routing-algorithm");
116 if (measure ==
"traveltime") {
117 if (routingAlgorithm ==
"dijkstra") {
125 }
else if (routingAlgorithm ==
"astar") {
133 #ifdef HAVE_INTERNAL // catchall for internal stuff
134 }
else if (routingAlgorithm ==
"bulkstar") {
136 router =
new BulkStarRouterTT<ROEdge, ROVehicle, prohibited_withRestrictions<ROEdge, ROVehicle> >(
139 router =
new BulkStarRouterTT<ROEdge, ROVehicle, prohibited_noRestrictions<ROEdge, ROVehicle> >(
143 }
else if (routingAlgorithm ==
"CH") {
152 router =
new CHRouter<ROEdge, ROVehicle, prohibited_withRestrictions<ROEdge, ROVehicle> >(
155 router =
new CHRouter<ROEdge, ROVehicle, prohibited_noRestrictions<ROEdge, ROVehicle> >(
159 }
else if (routingAlgorithm ==
"CHWrapper") {
166 WRITE_WARNING(
"CHWrapper is only needed for a restricted network");
168 router =
new CHRouterWrapper<ROEdge, ROVehicle, prohibited_withRestrictions<ROEdge, ROVehicle> >(
171 #endif // have HAVE_INTERNAL
173 throw ProcessError(
"Unknown routing Algorithm '" + routingAlgorithm +
"'!");
178 if (measure ==
"CO") {
180 }
else if (measure ==
"CO2") {
182 }
else if (measure ==
"PMx") {
184 }
else if (measure ==
"HC") {
186 }
else if (measure ==
"NOx") {
188 }
else if (measure ==
"fuel") {
190 }
else if (measure ==
"noise") {
194 throw ProcessError(
"Unknown measure (weight attribute '" + measure +
"')!");
206 if (routingAlgorithm ==
"bulkstar") {
207 #ifdef HAVE_INTERNAL // catchall for internal stuff
211 }
else if (!oc.
getBool(
"unsorted-input")) {
263 }
catch (XERCES_CPP_NAMESPACE::SAXParseException& e) {
266 }
catch (XERCES_CPP_NAMESPACE::SAXException& e) {
274 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
280 }
catch (
const std::exception& e) {
281 if (std::string(e.what()) != std::string(
"")) {
294 std::cout <<
"Success." << std::endl;