37 #include <xercesc/sax/SAXException.hpp>
38 #include <xercesc/sax/SAXParseException.hpp>
65 #ifdef CHECK_MEMORY_LEAKS
67 #endif // CHECK_MEMORY_LEAKS
83 const std::vector<SUMOReal>& turnDefs) {
88 const std::map<std::string, ROEdge*>& edges = net.
getEdgeMap();
89 for (std::map<std::string, ROEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
90 static_cast<ROJTREdge*
>((*i).second)->setTurnDefaults(turnDefs);
96 std::vector<SUMOReal> ret;
98 if (defs.size() < 2) {
99 throw ProcessError(
"The defaults for turnings must be a tuple of at least two numbers divided by ','.");
101 for (std::vector<std::string>::const_iterator i = defs.begin(); i != defs.end(); ++i) {
116 if (oc.
isSet(
"turn-ratio-files")) {
118 std::vector<std::string> ratio_files = oc.
getStringVector(
"turn-ratio-files");
119 for (std::vector<std::string>::const_iterator i = ratio_files.begin(); i != ratio_files.end(); ++i) {
129 if (oc.
isSet(
"sink-edges")) {
131 for (std::vector<std::string>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
134 throw ProcessError(
"The edge '" + *i +
"' declared as a sink is not known.");
155 if (!oc.
getBool(
"unsorted-input")) {
174 oc.
setApplicationDescription(
"Router for the microscopic road traffic simulation SUMO based on junction turning ratios.");
203 }
catch (XERCES_CPP_NAMESPACE::SAXParseException& e) {
206 }
catch (XERCES_CPP_NAMESPACE::SAXException& e) {
214 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
220 }
catch (
const std::exception& e) {
221 if (std::string(e.what()) != std::string(
"")) {
234 std::cout <<
"Success." << std::endl;