Examples of PhysicalQuantities


Examples of org.movsim.simulator.vehicles.PhysicalQuantities

     *            the front veh
     * @param writer
     *            the writer
     */
    static void writeData(double time, Vehicle veh, Vehicle frontVeh, PrintWriter writer) {
        final PhysicalQuantities physicalQuantities = veh.physicalQuantities();
        writer.printf(outputFormat, time, veh.roadSegmentId(), veh.lane(), physicalQuantities.getFrontPosition(),
                physicalQuantities.totalTravelDistance(), physicalQuantities.getSpeed(), physicalQuantities.getAcc(),
                physicalQuantities.accModel(), physicalQuantities.getNetDistance(frontVeh),
                physicalQuantities.getRelSpeed(frontVeh),
                physicalQuantities.getxScale() * veh.getDistanceToTrafficlight(),
                1000 * veh.getActualFuelFlowLiterPerS(), frontVeh == null ? -1 : frontVeh.getVehNumber(),
                veh.getSlope());
        writer.flush();
    }
View Full Code Here

Examples of org.movsim.simulator.vehicles.PhysicalQuantities

        if (vehicle.exitRoadSegmentId() == Vehicle.ROAD_SEGMENT_ID_NOT_SET) {
            exitString = this.trafficCanvas.popupStringExitEndRoad;
        } else {
            exitString = this.trafficCanvas.roadNetwork.findById(vehicle.exitRoadSegmentId()).userId();
        }
        final PhysicalQuantities vehiclePhysical = vehicle.physicalQuantities();
        final String string = String.format(this.trafficCanvas.popupString, vehicle.getId(), vehicle.getLabel(),
                    vehicle.lane(), vehiclePhysical.getFrontPosition(), vehiclePhysical.getSpeed()
                            * Units.MS_TO_KMH, vehiclePhysical.getAcc(), vehicle.totalTravelDistance(), exitString);
        final Label label = new Label(string, Label.LEFT);
        label.setBackground(new Color(200, 220, 240));
        removeAll();
        add(label);
        pack();
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.