Examples of lane()


Examples of org.movsim.simulator.roadnetwork.LaneSegment.lane()

        // MOBIL trade-off for driver and neighborhood
        final double oldBackDiffAcc = oldBackNewAcc - oldBackOldAcc;
        final double newBackDiffAcc = newBackNewAcc - newBackOldAcc;
        final double meDiffAcc = meNewAcc - meOldAcc;

        final int changeTo = newLaneSegment.lane() - currentLaneSegment.lane();

        // hack for CCS
        if (me.getLongitudinalModel().modelName() == ModelName.CCS) {
            double biasForced = 10000;
            double biasNormal = 0.02;
View Full Code Here

Examples of org.movsim.simulator.vehicles.Vehicle.lane()

        final double dt = 0.25;
        final double simulationTime = 0.0;
        final long iterationCount = 0;
        r0.makeLaneChanges(dt, simulationTime, iterationCount);
        assertEquals(Lanes.LANE1, obstacle.lane());
        assertEquals(Lanes.LANE2, v0.lane());
        assertEquals(1, r0.laneSegment(Lanes.LANE1).vehicleCount());
        assertEquals(1, r0.laneSegment(Lanes.LANE2).vehicleCount());
    }

    /**
 
View Full Code Here

Examples of org.movsim.simulator.vehicles.Vehicle.lane()

                        + " which has a laneCount of " + roadSegment.laneCount());
            }
            veh.setLane(lane);
            roadSegment.addVehicle(veh);
            LOG.info(String.format("set vehicle with label = %s on lane=%d with front at x=%.2f, speed=%.2f",
                    veh.getLabel(), veh.lane(), veh.getFrontPosition(), veh.getSpeed()));
            if (veh.getLongitudinalModel().isCA()) {
                LOG.info(String.format("and for the CA in physical quantities: front position at x=%.2f, speed=%.2f",
                        veh.physicalQuantities().getFrontPosition(), veh.physicalQuantities().getSpeed()));
            }
        }
View Full Code Here

Examples of org.movsim.simulator.vehicles.Vehicle.lane()

                            .min(index + 8, M - 1); j++) {
                        final Vehicle veh = laneSegment.getVehicle(j);
                        sb.append(String
                                .format("veh=%d, pos=%6.2f, speed=%4.2f, accModel=%4.3f, acc=%4.3f, length=%3.1f, lane=%d, id=%d%n",
                                        j, veh.getFrontPosition(), veh.getSpeed(), veh.accModel(), veh.getAcc(),
                                        veh.getLength(), veh.lane(), veh.getId()));
                    }
                    LOG.error(sb.toString());
                    if (isWithCrashExit) {
                        LOG.error(" !!! exit after crash !!! ");
                        System.exit(-99);
View Full Code Here

Examples of org.movsim.simulator.vehicles.Vehicle.lane()

            return;
        }
        Long entryTime = vehicleQueue.firstKey();
        if (simulationTime >= entryTime.longValue()) {
            Vehicle vehicle = vehicleQueue.get(entryTime);
            int testLane = (vehicle.lane() != Vehicle.LANE_NOT_SET) ? vehicle.lane()
                    : getNewCyclicLaneForEntering(laneEnterLast);
            LaneSegment laneSegment = roadSegment.laneSegment(testLane);
            final boolean isEntered = tryEnteringNewVehicle(vehicle, laneSegment);
            if (isEntered) {
                vehicleQueue.remove(entryTime);
View Full Code Here

Examples of org.movsim.simulator.vehicles.Vehicle.lane()

            return;
        }
        Long entryTime = vehicleQueue.firstKey();
        if (simulationTime >= entryTime.longValue()) {
            Vehicle vehicle = vehicleQueue.get(entryTime);
            int testLane = (vehicle.lane() != Vehicle.LANE_NOT_SET) ? vehicle.lane()
                    : getNewCyclicLaneForEntering(laneEnterLast);
            LaneSegment laneSegment = roadSegment.laneSegment(testLane);
            final boolean isEntered = tryEnteringNewVehicle(vehicle, laneSegment);
            if (isEntered) {
                vehicleQueue.remove(entryTime);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.