Example #1
0
void
MSVehicleControl::adaptIntermodalRouter(MSNet::MSIntermodalRouter& router) const {
    for (const SUMOVehicle* const veh : myPTVehicles) {
        // add single vehicles with line attribute which are not part of a flow
        const MSRoute* const route = MSRoute::dictionary(veh->getParameter().routeid);
        router.getNetwork()->addSchedule(veh->getParameter(), route == nullptr ? nullptr : &route->getStops());
    }
}
Example #2
0
void
MSInsertionControl::adaptIntermodalRouter(MSNet::MSIntermodalRouter& router) const {
    // fill the public transport router with pre-parsed public transport lines
    for (const Flow& f : myFlows) {
        if (f.pars->line != "") {
            const MSRoute* const route = MSRoute::dictionary(f.pars->routeid);
            router.getNetwork()->addSchedule(*f.pars, route == nullptr ? nullptr : &route->getStops());
        }
    }
}
Example #3
0
void
MSInsertionControl::adaptIntermodalRouter(MSNet::MSIntermodalRouter& router) const {
    // fill the public transport router with pre-parsed public transport lines
    for (const Flow& f : myFlows) {
        if (f.pars->line != "") {
            const MSRoute* route = MSRoute::dictionary(f.pars->routeid);
            const std::vector<SUMOVehicleParameter::Stop>* addStops = 0;
            if (route != 0) {
                addStops = &route->getStops();
            }
            router.getNetwork()->addSchedule(*f.pars, addStops);
        }
    }
}