/** * loads the net * The net is in this meaning made up by the net itself and the dynamic * weights which may be supplied in a separate file */ void initNet(RONet& net, ROLoader& loader, const std::vector<double>& turnDefs) { // load the net ROJTREdgeBuilder builder; loader.loadNet(net, builder); // set the turn defaults for (const auto& i : net.getEdgeMap()) { static_cast<ROJTREdge*>(i.second)->setTurnDefaults(turnDefs); } }
/** * loads the net * The net is in this meaning made up by the net itself and the dynamic * weights which may be supplied in a separate file */ void initNet(RONet& net, ROLoader& loader, const std::vector<SUMOReal>& turnDefs) { // load the net ROJTREdgeBuilder builder; loader.loadNet(net, builder); // set the turn defaults const std::map<std::string, ROEdge*>& edges = net.getEdgeMap(); for (std::map<std::string, ROEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) { static_cast<ROJTREdge*>((*i).second)->setTurnDefaults(turnDefs); } }
/** * loads the net * The net is in this meaning made up by the net itself and the dynamic * weights which may be supplied in a separate file */ void initNet(RONet& net, ROLoader& loader, OptionsCont& oc) { // load the net RODUAEdgeBuilder builder(oc.getBool("weights.expand"), oc.getBool("weights.interpolate")); loader.loadNet(net, builder); // load the weights when wished/available if (oc.isSet("weight-files")) { loader.loadWeights(net, "weight-files", oc.getString("weight-attribute"), false); } if (oc.isSet("lane-weight-files")) { loader.loadWeights(net, "lane-weight-files", oc.getString("weight-attribute"), true); } }
/** * loads the net * The net is in this meaning made up by the net itself and the dynamic * weights which may be supplied in a separate file */ void initNet(RONet &net, ROLoader &loader, OptionsCont &oc, const std::vector<SUMOReal> &turnDefs) { // load the net ROJTREdgeBuilder builder; loader.loadNet(net, builder); // set the turn defaults const std::map<std::string, ROEdge*> &edges = net.getEdgeMap(); for (std::map<std::string, ROEdge*>::const_iterator i=edges.begin(); i!=edges.end(); ++i) { static_cast<ROJTREdge*>((*i).second)->setTurnDefaults(turnDefs); } // load the weights when wished/available if (oc.isSet("weights")) { loader.loadWeights(net, "weights", oc.getString("measure"), false); } if (oc.isSet("lane-weights")) { loader.loadWeights(net, "lane-weights", oc.getString("measure"), true); } }