Package org.movsim.simulator.roadnetwork.routing

Examples of org.movsim.simulator.roadnetwork.routing.Route


    }

    private Vehicle createVehicle(MicroInflowRecord record) {
        final Vehicle vehicle = trafficSource.vehGenerator.createVehicle(record.getTypeLabel());
        if (record.hasRouteOrDestination()) {
            Route route = routing.hasRoute(record.getRouteOrDestination()) ? routing
                    .get(record.getRouteOrDestination()) : routing.findRoute(trafficSource.roadSegment.userId(),
                    record.getRouteOrDestination());
            LOG.info("overwrites vehicle's default route by route provided by input file: route={}", route.getName());
            vehicle.setRoute(route);
        }
        if (record.hasComment()) {
            vehicle.setInfoComment(record.getComment());
        }
View Full Code Here


        return vehicle;
    }

    // route is determined via the traffic composition
    public Vehicle create(VehicleType vehicleType) {
        Route route = null;
        if (vehicleType.hasRouteLabel()) {
            route = routing.get(vehicleType.getRouteLabel());
        }
        return create(vehicleType, route);
    }
View Full Code Here

    }

    private void initConsumption(boolean writeOutput, double simulationTimestep,
            final OutputConfiguration outputConfiguration) {
        for (final ConsumptionCalculation fuelRouteInput : outputConfiguration.getConsumptionCalculation()) {
            final Route route = getCheckedRoute(fuelRouteInput.getRoute());
            final ConsumptionOnRoute consumption = new ConsumptionOnRoute(simulationTimestep, fuelRouteInput,
                    roadNetwork, route, writeOutput);
            consumptionOnRoutes.put(route, consumption);
        }
    }
View Full Code Here

    }

    private void initTravelTimes(boolean writeOutput, double simulationTimestep,
            final OutputConfiguration outputConfiguration) {
        for (final TravelTimes travelTimeInput : outputConfiguration.getTravelTimes()) {
            final Route route = getCheckedRoute(travelTimeInput.getRoute());
            final TravelTimeOnRoute travelTime = new TravelTimeOnRoute(simulationTimestep, travelTimeInput,
                    roadNetwork, route, writeOutput);
            travelTimeOnRoutes.put(route, travelTime);
        }
    }
View Full Code Here

    }

    private void initTrajectories(boolean writeOutput, final OutputConfiguration outputConfiguration) {
        if (writeOutput) {
            for (final Trajectories traj : outputConfiguration.getTrajectories()) {
                final Route route = getCheckedRoute(traj.getRoute());
                if (filesTrajectories.containsKey(route)) {
                    logger.warn("trajectory output for route \"{}\" already defined!", route.getName());
                    continue;
                }
                filesTrajectories.put(route, new FileTrajectories(traj, route));
            }
        }
View Full Code Here

    }

    private void initSpatioTemporalOutput(boolean writeOutput, final OutputConfiguration outputConfiguration) {
        for (final SpatioTemporalConfiguration spatioTemporalInput : outputConfiguration
                .getSpatioTemporalConfiguration()) {
            final Route route = getCheckedRoute(spatioTemporalInput.getRoute());
            final SpatioTemporal spatioTemporal = new SpatioTemporal(spatioTemporalInput.getDx(),
                    spatioTemporalInput.getDt(), roadNetwork, route, writeOutput);
            spatioTemporals.add(spatioTemporal);
        }
    }
View Full Code Here

        }
    }

    private void initFloatingCars(boolean writeOutput, OutputConfiguration outputInput) {
        for (FloatingCarOutput floatingCarOutput : outputInput.getFloatingCarOutput()) {
            Route route = getCheckedRoute(floatingCarOutput.getRoute());
            floatingCarOutputs.add(new FloatingCars(floatingCarOutput, route, writeOutput));
        }
    }
View Full Code Here

TOP

Related Classes of org.movsim.simulator.roadnetwork.routing.Route

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.