Map<String  RoadInput> roadInputMap  Element elem
core/src/main/java/org/movsim/input/model/OutputInput.java
// if (elem == null) {
// return;
//
public OutputInput(Map<String, RoadInput> roadInputMap, Element elem)
Element elem
core/src/main/java/org/movsim/input/model/RoadInput.java
// parseRoadElement(elem);
//
public RoadInput(Element elem)
Element elem
core/src/main/java/org/movsim/input/model/RoadInput.java
//
// id = elem.getAttributeValue("id");
//
// final Element heterogenElem = elem.getChild(XmlElementNames.TrafficComposition);
// // optional for specific road
// if (heterogenElem != null) {
// trafficCompositionInputData = new ArrayList<VehicleTypeInput>();
// final List<Element> vehTypeElems = elem.getChild(XmlElementNames.TrafficComposition).getChildren(
// XmlElementNames.RoadVehicleType);
// for (final Element vehTypeElem : vehTypeElems) {
// final Map<String, String> map = XmlUtils.putAttributesInHash(vehTypeElem);
// trafficCompositionInputData.add(new VehicleTypeInput(map));
//
void parseRoadElement(Element elem)
ICMicroData o1  ICMicroData o2
core/src/main/java/org/movsim/input/model/RoadInput.java
// final Double pos1 = new Double((o1).getX());
// final Double pos2 = new Double((o2).getX());
// return pos2.compareTo(pos1); // sort with DECREASING x because of FC veh counting
//
int compare(ICMicroData o1, ICMicroData o2)
ICMacroData o1  ICMacroData o2
core/src/main/java/org/movsim/input/model/RoadInput.java
// final Double pos1 = new Double((o1).getX());
// final Double pos2 = new Double((o2).getX());
// return pos1.compareTo(pos2); // sort with increasing x
//
int compare(ICMacroData o1, ICMacroData o2)
FlowConservingBottleneckDataPoint o1  FlowConservingBottleneckDataPoint o2
core/src/main/java/org/movsim/input/model/RoadInput.java
// final Double pos1 = new Double((o1).getPosition());
// final Double pos2 = new Double((o2).getPosition());
// return pos1.compareTo(pos2); // sort with increasing x
//
int compare(FlowConservingBottleneckDataPoint o1, FlowConservingBottleneckDataPoint o2)
SpeedLimitDataPoint o1  SpeedLimitDataPoint o2
core/src/main/java/org/movsim/input/model/RoadInput.java
// final Double pos1 = new Double((o1).getPosition());
// final Double pos2 = new Double((o2).getPosition());
// return pos1.compareTo(pos2); // sort with increasing x
//
int compare(SpeedLimitDataPoint o1, SpeedLimitDataPoint o2)
SlopeDataPoint o1  SlopeDataPoint o2
core/src/main/java/org/movsim/input/model/RoadInput.java
// final Double pos1 = new Double((o1).getPosition());
// final Double pos2 = new Double((o2).getPosition());
// return pos1.compareTo(pos2); // sort with increasing x
//
int compare(SlopeDataPoint o1, SlopeDataPoint o2)
core/src/main/java/org/movsim/input/model/RoadInput.java
// return trafficSourceData;
//
TrafficSourceData getTrafficSourceData()
core/src/main/java/org/movsim/input/model/RoadInput.java
// return trafficSinkData;
//
TrafficSinkData getTrafficSinkData()
core/src/main/java/org/movsim/input/model/RoadInput.java
// return id;
//
String getId()
core/src/main/java/org/movsim/input/model/RoadInput.java
// return isWithWriteFundamentalDiagrams;
//
boolean isWithWriteFundamentalDiagrams()
core/src/main/java/org/movsim/input/model/RoadInput.java
// return simpleRamp;
//
SimpleRampData getSimpleRamp()
core/src/main/java/org/movsim/input/model/RoadInput.java
// return detectorInput;
//
DetectorInput getDetectorInput()
core/src/main/java/org/movsim/input/model/RoadInput.java
// return trafficLightsInput;
//
TrafficLightsInput getTrafficLightsInput()
Element elem
core/src/main/java/org/movsim/input/model/SimulationInput.java
// timestep = Double.parseDouble(elem.getAttributeValue("dt"));
// duration = Double.parseDouble(elem.getAttributeValue("duration"));
// randomSeed = Integer.parseInt(elem.getAttributeValue("seed"));
// if (elem.getAttributeValue("fixed_seed").equalsIgnoreCase("true")) {
// withFixedSeed = true;
//
public SimulationInput(Element elem)
String xodrFilename
core/src/main/java/org/movsim/input/model/SimulationInput.java
// final int i = xodrFilename.lastIndexOf(".xodr");
// if (i < 0) {
// System.out
// .println("Please provide OpenDRIVE file with ending \".xodr\" as argument with option -n, exit. ");
// return false;
//
boolean validateOpenDriveFileName(String xodrFilename)
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return timestep;
//
double getTimestep()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return duration;
//
double getSimulationDuration()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return withFixedSeed;
//
boolean isWithFixedSeed()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return randomSeed;
//
int getRandomSeed()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// // Quick hack: assume only one single main road !!!
// return roadInputMap.get(0);
//
RoadInput getSingleRoadInput()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return outputInput;
//
OutputInput getOutputInput()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return withCrashExit;
//
boolean isWithCrashExit()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return isWithWriteFundamentalDiagrams;
//
boolean isWithWriteFundamentalDiagrams()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// return routesInput;
//
RoutesInput getRoutesInput()
Map<String  RoadInput> roadInputMap  Element elem
core/src/main/java/org/movsim/input/model/output/RoutesInput.java
// routes = new ArrayList<RouteInput>();
//
// @SuppressWarnings("unchecked")
// final List<Element> routeElems = elem.getChildren(XmlElementNames.OutputRoute);
// if (routeElems != null) {
// for (final Element routeElem : routeElems) {
// RouteInput route = new RouteInput();
// route.setName(routeElem.getAttributeValue("label"));
// @SuppressWarnings("unchecked")
// List<Element> roads = routeElem.getChildren(XmlElementNames.OutputRoadId);
// for (Element road : roads) {
// String roadId = road.getAttributeValue("id");
// route.add(roadId);
//
public RoutesInput(Map<String, RoadInput> roadInputMap, Element elem)
Element elem
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
//
// if (elem == null) {
// isInitialized = false;
// return;
//
public DetectorInput(Element elem)
Element elem
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
//
// this.dtSample = Double.parseDouble(elem.getAttributeValue("dt"));
// this.withLogging = Boolean.parseBoolean(elem.getAttributeValue("logging"));
// this.loggingLanes = Boolean.parseBoolean(elem.getAttributeValue("logging_lanes"));
//
// // Detector
// positions = new ArrayList<Double>();
//
// final List<Element> crossElems = elem.getChildren("CROSS_SECTION");
// if (crossElems != null) {
// for (final Element crossElem : crossElems) {
// positions.add(Double.parseDouble(crossElem.getAttributeValue("x")));
//
void parseElement(Element elem)
Double o1  Double o2
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
// final Double pos1 = new Double((o1).doubleValue());
// final Double pos2 = new Double((o2).doubleValue());
// return pos1.compareTo(pos2); // sort with increasing x
//
int compare(Double o1, Double o2)
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
// return dtSample;
//
double getSampleInterval()
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
// return isInitialized;
//
boolean isWithDetectors()
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
// return withLogging;
//
boolean isWithLogging()
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
// return loggingLanes;
//
boolean isLoggingLanes()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
// this.x = Double.parseDouble(map.get("x"));
// this.alphaT = Double.parseDouble(map.get("alpha_T"));
// this.alphaV0 = Double.parseDouble(map.get("alpha_v0"));
//
public FlowConservingBottleneckDataPoint(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
// return x;
//
double getPosition()
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
// return alphaT;
//
double getAlphaT()
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
// return alphaV0;
//
double getAlphaV0()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
// this.x = Double.parseDouble(map.get("x"));
// this.rho = Units.INVKM_TO_INVM*Double.parseDouble(map.get("rho_per_km"));
// // negative speed value allowed for using equilibrium speed
// this.speed = Double.parseDouble(map.get("v"));
//
public ICMacroData(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
// return x;
//
double getX()
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
// return rho;
//
double getRho()
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
// return speed;
//
double getSpeed()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
// this.initPosition = Double.parseDouble(map.get("x"));
// this.initSpeed = Double.parseDouble(map.get("v"));
// // TODO check lane numbering with road segment logic and xodr !!!
// this.initLane = Integer.parseInt(map.get("lane"));
// this.typeLabel = map.get("label");
//
public ICMicroData(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
// return initPosition;
//
double getX()
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
// return initSpeed;
//
double getSpeed()
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
// return initLane;
//
int getInitLane()
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
// return typeLabel;
//
String getLabel()
Inflow inflowDataPoint
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
// this(inflowDataPoint.getT(), inflowDataPoint.getQPerHour(), inflowDataPoint.getV());
//
public InflowDataPoint(Inflow inflowDataPoint)
double time  double flowPerHour  double speed
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
// this.time = time;
// this.flow = flowPerHour * Units.INVH_TO_INVS;
// this.speed = speed; // given in m/s
//
public InflowDataPoint(double time, double flowPerHour, double speed)
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
// return time;
//
double getTime()
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
// return flow;
//
double getFlow()
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
// return speed;
//
double getSpeed()
Element elem
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
// this.relativeGap = Double.parseDouble(elem.getAttributeValue("relative_gap"));
// this.relativeSpeed = Double.parseDouble(elem.getAttributeValue("relative_speed"));
// this.withLogging = Boolean.parseBoolean(elem.getAttributeValue("logging"));
//
// final List<Element> inflowElems = elem.getChildren(XmlElementNames.RoadInflow);
// parseAndSortInflowElements(inflowElems);
//
//
public SimpleRampData(Element elem)
List<Element> inflowElems
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
// inflowTimeSeries = new ArrayList<InflowDataPoint>();
// for (final Element inflowElem : inflowElems) {
// final Map<String, String> map = XmlUtils.putAttributesInHash(inflowElem);
// inflowTimeSeries.add(new InflowDataPoint(map));
//
void parseAndSortInflowElements(List<Element> inflowElems)
InflowDataPoint o1  InflowDataPoint o2
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
// final Double pos1 = new Double((o1).getTime());
// final Double pos2 = new Double((o2).getTime());
// return pos1.compareTo(pos2); // sort with increasing t
//
int compare(InflowDataPoint o1, InflowDataPoint o2)
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
// return withLogging;
//
boolean withLogging()
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
// return relativeSpeed;
//
double getRelativeSpeedToLeader()
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
// return relativeGap;
//
double getRelativeGapToLeader()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java
// this.x = Double.parseDouble(map.get("x"));
// this.gradient = Double.parseDouble(map.get("gradient"));
//
public SlopeDataPoint(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java
// return x;
//
double getPosition()
core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java
// return gradient;
//
double getGradient()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java
// this.x = Double.parseDouble(map.get("x"));
// this.speedlimit = Double.parseDouble(map.get("speedlimit_kmh")) / 3.6;
//
public SpeedLimitDataPoint(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java
// return x;
//
double getPosition()
core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java
// return speedlimit;
//
double getSpeedlimit()
Element elem
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
// if (elem == null) {
// withLogging = false;
//
public TrafficSourceData(Element elem)
List<Element> upInflowElems
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
// for (final Element upInflowElem : upInflowElems) {
// final Map<String, String> inflowMap = XmlUtils.putAttributesInHash(upInflowElem);
// inflowTimeSeries.add(new InflowDataPoint(inflowMap));
//
void parseAndSortInflowElements(List<Element> upInflowElems)
InflowDataPoint o1  InflowDataPoint o2
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
// final Double pos1 = new Double((o1).getTime());
// final Double pos2 = new Double((o2).getTime());
// return pos1.compareTo(pos2); // sort with increasing t
//
int compare(InflowDataPoint o1, InflowDataPoint o2)
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
// return withLogging;
//
boolean withLogging()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
//
public LaneChangeMobilData()
Map<String  String> map
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
// safeDeceleration = Double.parseDouble(map.get("b_safe"));
// minimumGap = Double.parseDouble(map.get("s_min"));
// thresholdAcceleration = Double.parseDouble(map.get("threshold"));
// rightBiasAcceleration = Double.parseDouble(map.get("bias_right"));
// politeness = Double.parseDouble(map.get("politeness"));
//
void init(Map<String, String> map)
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
// return safeDeceleration;
//
double getSafeDeceleration()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
// return minimumGap;
//
double getMinimumGap()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
// return thresholdAcceleration;
//
double getThresholdAcceleration()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
// return rightBiasAcceleration;
//
double getRightBiasAcceleration()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
// return politeness;
//
double getPoliteness()
RoadSegment roadSegment  org.movsim.core.autogen.Detectors detectorInput
core/src/main/java/org/movsim/output/detector/LoopDetectors.java
Preconditions.checkNotNull(detectorInput);
        final double dtSample = detectorInput.getSampleInterval();
        for (final Double detPosition : getSortedPositions(detectorInput.getCrossSection())) {
            detectors.add(new LoopDetector(roadSegment, detPosition, dtSample, detectorInput.isLogging(),
                    detectorInput.isLoggingLanes()));
public LoopDetectors(RoadSegment roadSegment, org.movsim.core.autogen.Detectors detectorInput)
Double o1  Double o2
core/src/main/java/org/movsim/output/detector/LoopDetectors.java
final Double pos1 = new Double((o1).doubleValue());
                final Double pos2 = new Double((o2).doubleValue());
                return pos1.compareTo(pos2); // sort with increasing x
int compare(Double o1, Double o2)
List<Road> roads
core/src/main/java/org/movsim/simulator/Simulator.java
for (final Road roadInput : roads) {
     * @param inputData2
    private VehicleGenerator createVehicleGenerator() {
        Preconditions.checkNotNull(inputData);
        return new VehicleGenerator(simulationRunnable.timeStep(), inputData.getVehicleTypes(), inputData
                .getSimulation().getTrafficComposition(), fuelConsumptionModelPool, routes);
     * @param road
    private void defaultTestingRoadMapping(Road roadInput) {
        addInputToRoadSegment(roadSegment, roadInput, vehGenerator);
    private void addInputToRoadSegment(RoadSegment roadSegment, Road roadInput,
        // final List<VehicleTypeInput> roadVehicleTypeInputs = roadInput.getTrafficCompositionInputData();
        if (roadInput.isSetTrafficComposition()) {
            roadVehGenerator = new VehicleGenerator(simulationRunnable.timeStep(), inputData.getVehicleTypes(),
                    roadInput.getTrafficComposition(), fuelConsumptionModelPool, routes);
        if (roadInput.isSetTrafficSource()) {
            final org.movsim.core.autogen.TrafficSource trafficSourceData = roadInput.getTrafficSource();
            if (trafficSourceData.isSetInflow()) {
                final InflowTimeSeries inflowTimeSeries = new InflowTimeSeries(trafficSourceData.getInflow());
                if (trafficSourceData.isLogging()) {
void matchRoadSegmentsAndRoadInput(List<Road> roads)
RoadSegment roadSegment  InitialConditions initialConditions 
            VehicleGenerator vehGenerator
core/src/main/java/org/movsim/simulator/Simulator.java
Preconditions.checkNotNull(initialConditions);

        if (initialConditions.isSetMacroIC()) {
            setMacroInitialConditions(roadSegment, initialConditions.getMacroIC(), vehGenerator);
void initialConditions(RoadSegment roadSegment, InitialConditions initialConditions,
            VehicleGenerator vehGenerator)
FlowConservingInhomogeneities flowConservingInhomogeneities
core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java
generateSpaceSeriesData(flowConservingInhomogeneities.getInhomogeneity());
     * @param list
    private void generateSpaceSeriesData(List<Inhomogeneity> list) {
        final int size = list.size();
            posValues[i] = list.get(i).getPosition();
            alphaTValues[i] = list.get(i).getAlphaT();
            alphaV0Values[i] = list.get(i).getAlphaV0();
    private final class FlowConservingBottleneckDataPoint {

        /** The position in m */
        private final double x;

        /** The alpha t. */
        private final double alphaT;

        /** The alpha v0. */
        private final double alphaV0;

        /**
         * Instantiates a new flow conserving bottleneck data point impl.
         * 
         * @param map
         *            the map
         */
        public FlowConservingBottleneckDataPoint(Map<String, String> map) {
            this.x = Double.parseDouble(map.get("x"));
            this.alphaT = Double.parseDouble(map.get("alpha_T"));
            this.alphaV0 = Double.parseDouble(map.get("alpha_v0"));
public FlowConservingBottlenecks(FlowConservingInhomogeneities flowConservingInhomogeneities)
core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java
return x;
double getPosition()
core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java
return alphaT;
double getAlphaT()
core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java
return alphaV0;
double getAlphaV0()
List<Inflow> inflow
core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java
generateTimeSeriesData(inflow);
    private void generateTimeSeriesData(List<Inflow> inflow) {
        List<InflowDataPoint> sortedInflowDataPoints = getSortedInflowDataPoints(inflow);

        final int size = sortedInflowDataPoints.size();
        if (sortedInflowDataPoints.isEmpty()) {
            final InflowDataPoint inflowDataPoint = sortedInflowDataPoints.get(i);
    private List<InflowDataPoint> getSortedInflowDataPoints(List<Inflow> inflow) {
        List<InflowDataPoint> dataPoints = new ArrayList<>();
        for (final Inflow inflowDataPoint : inflow) {
            dataPoints.add(new InflowDataPoint(inflowDataPoint));
public InflowTimeSeries(List<Inflow> inflow)
InflowDataPoint o1  InflowDataPoint o2
core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java
final Double pos1 = new Double((o1).getTime());
                final Double pos2 = new Double((o2).getTime());
                return pos1.compareTo(pos2); // sort with increasing t
int compare(InflowDataPoint o1, InflowDataPoint o2)
Inflow inflowDataPoint
core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java
this(inflowDataPoint.getT(), inflowDataPoint.getQPerHour(), inflowDataPoint.getV());
public InflowDataPoint(Inflow inflowDataPoint)
double time  double flowPerHour  double speed
core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java
this.time = time;
            this.flow = flowPerHour * Units.INVH_TO_INVS;
            this.speed = speed; // given in m/s
public InflowDataPoint(double time, double flowPerHour, double speed)
core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java
return time;
double getTime()
core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java
return flow;
double getFlow()
core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java
return speed;
double getSpeed()
List<MacroIC> macroIC
core/src/main/java/org/movsim/simulator/roadnetwork/InitialConditionsMacro.java
final int size = macroIC.size();
if(useUserDefinedSpeeds(macroIC)){
    speed = new double[size];
public InitialConditionsMacro(List<MacroIC> macroIC)
List<MacroIC> macroIC
core/src/main/java/org/movsim/simulator/roadnetwork/InitialConditionsMacro.java
boolean userDefinedSpeed = true;
        for (int i = 0, N = macroIC.size(); i < N; i++) {
            if (i == 0) {
                // set initial value
                userDefinedSpeed = macroIC.get(i).isSetSpeed();
boolean useUserDefinedSpeeds(List<MacroIC> macroIC)
org.movsim.core.autogen.LaneChangeModel laneChangeModelParameter
core/src/main/java/org/movsim/simulator/vehicles/lanechange/LaneChangeModel.java
this.parameter = laneChangeModelParameter;
        // this.withEuropeanRules = laneChangeModelParameter.isWithEuropeanRules();
        // this.vCritEur = laneChangeModelParameter.getCritSpeedEuroRules();
        // isInitialized = laneChangeModelParameter.isInitializedMobilData();
    // public LaneChangeModel(Vehicle vehicle, MOBIL lcModelMOBIL) {
    // this.lcModelMOBIL = lcModelMOBIL;
    // this.me = vehicle;
    // this.withEuropeanRules = true;
    // this.vCritEur = 5.0;
    // this.parameter = null;
    // isInitialized = true;
    //
public LaneChangeModel(org.movsim.core.autogen.LaneChangeModel laneChangeModelParameter)
Vehicle vehicle
core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java
// // TODO handle this case with *no* <MOBIL> xml element
    //
public MOBIL(Vehicle vehicle)
Vehicle vehicle  ModelParameterMOBIL modelParameterMOBIL
core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java
this.param = modelParameterMOBIL;

        if (modelParameterMOBIL.getSafeDeceleration() > vehicle.getMaxDeceleration()) {
        bSafe = Math.min(modelParameterMOBIL.getSafeDeceleration(), vehicle.getMaxDeceleration());
    // public MOBIL(Vehicle vehicle, double minimumGap, double safeDeceleration, double politeness,
    // double thresholdAcceleration, double rightBiasAcceleration) {
    // bSafeRef = bSafe = safeDeceleration;
    // biasRightRef = biasRight = rightBiasAcceleration;
    // gapMin = minimumGap;
    // thresholdRef = threshold = thresholdAcceleration;
    // pRef = this.politeness = politeness;
    //
public MOBIL(Vehicle vehicle, ModelParameterMOBIL modelParameterMOBIL)
ModelParameter param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
return param.getV0() >= 0 && param.getV0() <= MovsimConstants.MAX_VEHICLE_SPEED;
boolean isValidDesiredSpeed(ModelParameter param)
ModelParameter param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
return param.getS0() >= 0;
boolean isValidMinimumGap(ModelParameter param)
double p
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
return p >= 0 && p <= 1;
boolean isValidProbabilityRange(double p)
ModelParameterACC param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (param.getCoolness() < 0 || param.getCoolness() > 1) {
            throw new IllegalStateException("Invalid parameter for ACC coolness parameter= " + param.getCoolness()
                    + ". Choose value within [0,1].");
boolean isValidParameters(ModelParameterACC param)
ModelParameterIDM param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (!isValidDesiredSpeed(param) || isValidMinimumGap(param) || param.getT() <= 0 || param.getS1() < 0
                || param.getDelta() <= 0 || param.getA() <= 0 || param.getB() <= 0) {
            throw new IllegalStateException("invalid parameters for IDM model");
boolean isValidParameters(ModelParameterIDM param)
ModelParameterOVMFVDM param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (!isValidDesiredSpeed(param) || !isValidMinimumGap(param) || param.getTau() <= 0
                || param.getTransitionWidth() < 0 || param.getBeta() < 0 || param.getGamma() < 0) {
            throw new IllegalStateException("invalid parameters for OVM/FVDM.");
boolean isValidParameter(ModelParameterOVMFVDM param)
ModelParameterGipps param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (!isValidDesiredSpeed(param) || !isValidMinimumGap(param) || param.getA() <= 0 || param.getB() <= 0) {
            throw new IllegalStateException("invalid parameters for Gipps model");
boolean isValidParameters(ModelParameterGipps param)
ModelParameterKrauss param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (!isValidDesiredSpeed(param) || isValidMinimumGap(param) || param.getA() <= 0 || param.getB() <= 0) {
            throw new IllegalStateException("invalid parameters for Krauss model");
boolean isValidParameter(ModelParameterKrauss param)
ModelParameterNewell param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (!isValidDesiredSpeed(param) || isValidMinimumGap(param)) {
            throw new IllegalStateException("invalid parameters for Newell model");
boolean isValidParameter(ModelParameterNewell param)
ModelParameterNSM param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (!isValidDesiredSpeed(param) || isValidMinimumGap(param)
                || !ModelParameters.isValidProbabilityRange(param.getPSlowdown())
                || !ModelParameters.isValidProbabilityRange(param.getPSlowdown())) {
            throw new IllegalStateException("invalid parameters for NSM");
boolean isValidParameter(ModelParameterNSM param)
ModelParameterKKW param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
if (!isValidDesiredSpeed(param) || isValidMinimumGap(param) || param.getK() < 0
                || !ModelParameters.isValidProbabilityRange(param.getPb0())
                || !ModelParameters.isValidProbabilityRange(param.getPb1())
                || !ModelParameters.isValidProbabilityRange(param.getPa1())
                || !ModelParameters.isValidProbabilityRange(param.getPa2())
                || !ModelParameters.isValidProbabilityRange(param.getVp())) {
            throw new IllegalStateException("invalid parameters for KKW model");
boolean isValidParameter(ModelParameterKKW param)
ModelParameterPTM param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
// TODO implement method
        return false;
boolean issValidParameters(ModelParameterPTM param)
ModelParameterCCS param
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
// TODO implement method
        return false;
boolean isValidParameters(ModelParameterCCS param)
Map<String  RoadInput> roadInputMap  Element elem
core/src/main/java/org/movsim/input/model/OutputInput.java
if (elem == null) {
            return;
public OutputInput(Map<String, RoadInput> roadInputMap, Element elem)
Element elem
core/src/main/java/org/movsim/input/model/RoadInput.java
parseRoadElement(elem);
public RoadInput(Element elem)
Element elem
core/src/main/java/org/movsim/input/model/RoadInput.java
id = elem.getAttributeValue("id");

        final Element heterogenElem = elem.getChild(XmlElementNames.TrafficComposition);
        // optional for specific road
        if (heterogenElem != null) {
            trafficCompositionInputData = new ArrayList<VehicleTypeInput>();
            final List<Element> vehTypeElems = elem.getChild(XmlElementNames.TrafficComposition).getChildren(
                    XmlElementNames.RoadVehicleType);
            for (final Element vehTypeElem : vehTypeElems) {
                final Map<String, String> map = XmlUtils.putAttributesInHash(vehTypeElem);
                trafficCompositionInputData.add(new VehicleTypeInput(map));
void parseRoadElement(Element elem)
ICMicroData o1  ICMicroData o2
core/src/main/java/org/movsim/input/model/RoadInput.java
final Double pos1 = new Double((o1).getX());
                final Double pos2 = new Double((o2).getX());
                return pos2.compareTo(pos1); // sort with DECREASING x because of FC veh counting
int compare(ICMicroData o1, ICMicroData o2)
ICMacroData o1  ICMacroData o2
core/src/main/java/org/movsim/input/model/RoadInput.java
final Double pos1 = new Double((o1).getX());
                final Double pos2 = new Double((o2).getX());
                return pos1.compareTo(pos2); // sort with increasing x
int compare(ICMacroData o1, ICMacroData o2)
FlowConservingBottleneckDataPoint o1  FlowConservingBottleneckDataPoint o2
core/src/main/java/org/movsim/input/model/RoadInput.java
final Double pos1 = new Double((o1).getPosition());
                    final Double pos2 = new Double((o2).getPosition());
                    return pos1.compareTo(pos2); // sort with increasing x
int compare(FlowConservingBottleneckDataPoint o1, FlowConservingBottleneckDataPoint o2)
SpeedLimitDataPoint o1  SpeedLimitDataPoint o2
core/src/main/java/org/movsim/input/model/RoadInput.java
final Double pos1 = new Double((o1).getPosition());
                    final Double pos2 = new Double((o2).getPosition());
                    return pos1.compareTo(pos2); // sort with increasing x
int compare(SpeedLimitDataPoint o1, SpeedLimitDataPoint o2)
SlopeDataPoint o1  SlopeDataPoint o2
core/src/main/java/org/movsim/input/model/RoadInput.java
final Double pos1 = new Double((o1).getPosition());
                    final Double pos2 = new Double((o2).getPosition());
                    return pos1.compareTo(pos2); // sort with increasing x
int compare(SlopeDataPoint o1, SlopeDataPoint o2)
core/src/main/java/org/movsim/input/model/RoadInput.java
return trafficSourceData;
TrafficSourceData getTrafficSourceData()
core/src/main/java/org/movsim/input/model/RoadInput.java
return trafficSinkData;
TrafficSinkData getTrafficSinkData()
core/src/main/java/org/movsim/input/model/RoadInput.java
return id;
String getId()
core/src/main/java/org/movsim/input/model/RoadInput.java
return isWithWriteFundamentalDiagrams;
boolean isWithWriteFundamentalDiagrams()
core/src/main/java/org/movsim/input/model/RoadInput.java
return simpleRamp;
SimpleRampData getSimpleRamp()
core/src/main/java/org/movsim/input/model/RoadInput.java
return detectorInput;
DetectorInput getDetectorInput()
core/src/main/java/org/movsim/input/model/RoadInput.java
return trafficLightsInput;
TrafficLightsInput getTrafficLightsInput()
Element elem
core/src/main/java/org/movsim/input/model/SimulationInput.java
timestep = Double.parseDouble(elem.getAttributeValue("dt"));
        duration = Double.parseDouble(elem.getAttributeValue("duration"));
        randomSeed = Integer.parseInt(elem.getAttributeValue("seed"));
        if (elem.getAttributeValue("fixed_seed").equalsIgnoreCase("true")) {
            withFixedSeed = true;
public SimulationInput(Element elem)
heterogenElem != null
core/src/main/java/org/movsim/input/model/SimulationInput.java
@SuppressWarnings("unchecked")
            final List<Element> vehTypeElems = elem.getChild(XmlElementNames.TrafficComposition).getChildren(
                    XmlElementNames.RoadVehicleType);
            for (final Element vehTypeElem : vehTypeElems) {
                final Map<String, String> map = XmlUtils.putAttributesInHash(vehTypeElem);
                vehicleTypeInputs.add(new VehicleTypeInput(map));
road
        if (heterogenElem != null)
String xodrFilename
core/src/main/java/org/movsim/input/model/SimulationInput.java
final int i = xodrFilename.lastIndexOf(".xodr");
        if (i < 0) {
            System.out
                    .println("Please provide OpenDRIVE file with ending \".xodr\" as argument with option -n, exit. ");
            return false;
boolean validateOpenDriveFileName(String xodrFilename)
core/src/main/java/org/movsim/input/model/SimulationInput.java
return timestep;
double getTimestep()
core/src/main/java/org/movsim/input/model/SimulationInput.java
return duration;
double getSimulationDuration()
core/src/main/java/org/movsim/input/model/SimulationInput.java
return withFixedSeed;
boolean isWithFixedSeed()
core/src/main/java/org/movsim/input/model/SimulationInput.java
return randomSeed;
int getRandomSeed()
core/src/main/java/org/movsim/input/model/SimulationInput.java
// Quick hack: assume only one single main road !!!
        return roadInputMap.get(0);
RoadInput getSingleRoadInput()
core/src/main/java/org/movsim/input/model/SimulationInput.java
return outputInput;
OutputInput getOutputInput()
core/src/main/java/org/movsim/input/model/SimulationInput.java
return withCrashExit;
boolean isWithCrashExit()
core/src/main/java/org/movsim/input/model/SimulationInput.java
return isWithWriteFundamentalDiagrams;
boolean isWithWriteFundamentalDiagrams()
core/src/main/java/org/movsim/input/model/SimulationInput.java
return routesInput;
RoutesInput getRoutesInput()
Map<String  RoadInput> roadInputMap  Element elem
core/src/main/java/org/movsim/input/model/output/RoutesInput.java
routes = new ArrayList<RouteInput>();

        @SuppressWarnings("unchecked")
        final List<Element> routeElems = elem.getChildren(XmlElementNames.OutputRoute);
        if (routeElems != null) {
            for (final Element routeElem : routeElems) {
                RouteInput route = new RouteInput();
                route.setName(routeElem.getAttributeValue("label"));
                @SuppressWarnings("unchecked")
                List<Element> roads = routeElem.getChildren(XmlElementNames.OutputRoadId);
                for (Element road : roads) {
                    String roadId = road.getAttributeValue("id");
                    route.add(roadId);
public RoutesInput(Map<String, RoadInput> roadInputMap, Element elem)
Element elem
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
if (elem == null) {
            isInitialized = false;
            return;
public DetectorInput(Element elem)
Element elem
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
this.dtSample = Double.parseDouble(elem.getAttributeValue("dt"));
        this.withLogging = Boolean.parseBoolean(elem.getAttributeValue("logging"));
        this.loggingLanes = Boolean.parseBoolean(elem.getAttributeValue("logging_lanes"));        

        // Detector
        positions = new ArrayList<Double>();

        final List<Element> crossElems = elem.getChildren("CROSS_SECTION");
        if (crossElems != null) {
            for (final Element crossElem : crossElems) {
                positions.add(Double.parseDouble(crossElem.getAttributeValue("x")));
void parseElement(Element elem)
Double o1  Double o2
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
final Double pos1 = new Double((o1).doubleValue());
                final Double pos2 = new Double((o2).doubleValue());
                return pos1.compareTo(pos2); // sort with increasing x
int compare(Double o1, Double o2)
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
return dtSample;
double getSampleInterval()
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
return isInitialized;
boolean isWithDetectors()
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
return withLogging;
boolean isWithLogging()
core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java
return loggingLanes;
boolean isLoggingLanes()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
this.x = Double.parseDouble(map.get("x"));
        this.alphaT = Double.parseDouble(map.get("alpha_T"));
        this.alphaV0 = Double.parseDouble(map.get("alpha_v0"));
public FlowConservingBottleneckDataPoint(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
return x;
double getPosition()
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
return alphaT;
double getAlphaT()
core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java
return alphaV0;
double getAlphaV0()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
this.x = Double.parseDouble(map.get("x"));
        this.rho = Units.INVKM_TO_INVM*Double.parseDouble(map.get("rho_per_km"));
        // negative speed value allowed for using equilibrium speed 
        this.speed = Double.parseDouble(map.get("v"));
public ICMacroData(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
return x;
double getX()
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
return rho;
double getRho()
core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java
return speed;
double getSpeed()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
this.initPosition = Double.parseDouble(map.get("x"));
        this.initSpeed = Double.parseDouble(map.get("v"));
        // TODO check lane numbering with road segment logic and xodr !!!
        this.initLane = Integer.parseInt(map.get("lane"));
        this.typeLabel = map.get("label");
public ICMicroData(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
return initPosition;
double getX()
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
return initSpeed;
double getSpeed()
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
return initLane;
int getInitLane()
core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java
return typeLabel;
String getLabel()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
this.time = Double.parseDouble(map.get("t"));
        // convert to SI
        this.flow = Double.parseDouble(map.get("q_per_hour")) / 3600.0;
        this.speed = Double.parseDouble(map.get("v"));
public InflowDataPoint(Map<String, String> map)
double time  double flowPerHour  double speed
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
this.time = time;
        // convert to SI
        this.flow = flowPerHour / 3600.0;
        this.speed = speed;
public InflowDataPoint(double time, double flowPerHour, double speed)
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
return time;
double getTime()
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
return flow;
double getFlow()
core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java
return speed;
double getSpeed()
Element elem
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
this.relativeGap = Double.parseDouble(elem.getAttributeValue("relative_gap"));
        this.relativeSpeed = Double.parseDouble(elem.getAttributeValue("relative_speed"));
        this.withLogging = Boolean.parseBoolean(elem.getAttributeValue("logging"));

        final List<Element> inflowElems = elem.getChildren(XmlElementNames.RoadInflow);
        parseAndSortInflowElements(inflowElems);
public SimpleRampData(Element elem)
List<Element> inflowElems
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
inflowTimeSeries = new ArrayList<InflowDataPoint>();
        for (final Element inflowElem : inflowElems) {
            final Map<String, String> map = XmlUtils.putAttributesInHash(inflowElem);
            inflowTimeSeries.add(new InflowDataPoint(map));
void parseAndSortInflowElements(List<Element> inflowElems)
InflowDataPoint o1  InflowDataPoint o2
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
final Double pos1 = new Double((o1).getTime());
                final Double pos2 = new Double((o2).getTime());
                return pos1.compareTo(pos2); // sort with increasing t
int compare(InflowDataPoint o1, InflowDataPoint o2)
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
return withLogging;
boolean withLogging()
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
return relativeSpeed;
double getRelativeSpeedToLeader()
core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java
return relativeGap;
double getRelativeGapToLeader()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java
this.x = Double.parseDouble(map.get("x"));
        this.gradient = Double.parseDouble(map.get("gradient"));
public SlopeDataPoint(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java
return x;
double getPosition()
core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java
return gradient;
double getGradient()
Map<String  String> map
core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java
this.x = Double.parseDouble(map.get("x"));
        this.speedlimit = Double.parseDouble(map.get("speedlimit_kmh")) / 3.6;
public SpeedLimitDataPoint(Map<String, String> map)
core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java
return x;
double getPosition()
core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java
return speedlimit;
double getSpeedlimit()
Element elem
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
if (elem == null) {
            withLogging = false;
public TrafficSourceData(Element elem)
List<Element> upInflowElems
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
for (final Element upInflowElem : upInflowElems) {
            final Map<String, String> inflowMap = XmlUtils.putAttributesInHash(upInflowElem);
            inflowTimeSeries.add(new InflowDataPoint(inflowMap));
void parseAndSortInflowElements(List<Element> upInflowElems)
InflowDataPoint o1  InflowDataPoint o2
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
final Double pos1 = new Double((o1).getTime());
                final Double pos2 = new Double((o2).getTime());
                return pos1.compareTo(pos2); // sort with increasing t
int compare(InflowDataPoint o1, InflowDataPoint o2)
core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java
return withLogging;
boolean withLogging()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
public LaneChangeMobilData()
Map<String  String> map
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
safeDeceleration = Double.parseDouble(map.get("b_safe"));
        minimumGap = Double.parseDouble(map.get("s_min"));
        thresholdAcceleration = Double.parseDouble(map.get("threshold"));
        rightBiasAcceleration = Double.parseDouble(map.get("bias_right"));
        politeness = Double.parseDouble(map.get("politeness"));
void init(Map<String, String> map)
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
return safeDeceleration;
double getSafeDeceleration()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
return minimumGap;
double getMinimumGap()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
return thresholdAcceleration;
double getThresholdAcceleration()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
return rightBiasAcceleration;
double getRightBiasAcceleration()
core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java
return politeness;
double getPoliteness()
RoadSegment roadSegment  DetectorInput input
core/src/main/java/org/movsim/output/detector/LoopDetectors.java
detectors = new ArrayList<LoopDetector>();
        if (input.isWithDetectors()) {
            final double dtSample = input.getSampleInterval();
            final List<Double> positions = input.getPositions();
            for (final Double detPosition : positions) {
                detectors.add(new LoopDetector(roadSegment, detPosition, dtSample, input.isWithLogging(), input.isLoggingLanes()));
public LoopDetectors(RoadSegment roadSegment, DetectorInput input)
Map<String  RoadInput> roadInputMap
core/src/main/java/org/movsim/simulator/Simulator.java
for (final RoadInput roadInput : roadInputMap.values()) {
     * @param simInput
    private VehicleGenerator createVehicleGenerator(SimulationInput simInput) {
        final List<VehicleTypeInput> vehicleTypeInputs = simInput.getVehicleTypeInput();
        final VehicleGenerator vehGenerator = new VehicleGenerator(simulationRunnable.timeStep(),
                inputData.getVehiclesInput(), vehicleTypeInputs, fuelConsumptionModelPool, routes);
        return vehGenerator;

     * @param roadInputMap
    private void defaultTestingRoadMapping(Map<String, RoadInput> roadInputMap) {
        final RoadInput roadinput = roadInputMap.values().iterator().next();
        addInputToRoadSegment(roadSegment, roadinput, vehGenerator);
    private void addInputToRoadSegment(RoadSegment roadSegment, RoadInput roadInput,
        final List<VehicleTypeInput> roadVehicleTypeInputs = roadInput.getTrafficCompositionInputData();
        if (roadVehicleTypeInputs != null) {
            roadVehGenerator = new VehicleGenerator(simulationRunnable.timeStep(), inputData.getVehiclesInput(),
                    roadVehicleTypeInputs, fuelConsumptionModelPool, routes);
        final TrafficSourceData trafficSourceData = roadInput.getTrafficSourceData();
        if (trafficSourceData.getInflowTimeSeries().size() != 0) {
            final InflowTimeSeries inflowTimeSeries = new InflowTimeSeries(trafficSourceData.getInflowTimeSeries());
            if (trafficSourceData.withLogging()) {
        if (roadInput.getSimpleRamp() != null) {
            SimpleRampData simpleRampData = roadInput.getSimpleRamp();
            InflowTimeSeries inflowTimeSeries = new InflowTimeSeries(simpleRampData.getInflowTimeSeries());
            if (simpleRampData.withLogging()) {
        final TrafficLightsInput trafficLightsInput = roadInput.getTrafficLightsInput();
        if (trafficLightsInput.isWithLogging()) {
            final int nDt = trafficLightsInput.getnDtSample();
        final SpeedLimits speedLimits = new SpeedLimits(roadInput.getSpeedLimitInputData());
        final Slopes slopes = new Slopes(roadInput.getSlopesInputData());
        final LoopDetectors loopDetectors = new LoopDetectors(roadSegment, roadInput.getDetectorInput());
        roadSegment.setLoopDetectors(loopDetectors);

        final FlowConservingBottlenecks flowConservingBottlenecks = new FlowConservingBottlenecks(
                roadInput.getFlowConsBottleneckInputData());
        roadSegment.setFlowConservingBottlenecks(flowConservingBottlenecks);
        initialConditions(roadSegment, roadInput, roadVehGenerator);
    private static void initialConditions(RoadSegment roadSegment, RoadInput roadInput, VehicleGenerator vehGenerator) {
        final List<ICMacroData> icMacroData = roadInput.getIcMacroData();
        if (!icMacroData.isEmpty()) {
            setMacroInitialConditions(roadSegment, roadInput, vehGenerator, icMacroData);
void matchRoadSegmentsAndRoadInput(Map<String, RoadInput> roadInputMap)
LaneChangeInputData lcInputData
core/src/main/java/org/movsim/simulator/vehicles/lanechange/LaneChangeModel.java
this.lcInputData = lcInputData;
        this.withEuropeanRules = lcInputData.isWithEuropeanRules();
        this.vCritEur = lcInputData.getCritSpeedEuroRules();

        isInitialized = lcInputData.isInitializedMobilData();
    public LaneChangeModel(Vehicle vehicle, MOBIL lcModelMOBIL) {
        this.lcModelMOBIL = lcModelMOBIL;
        this.me = vehicle;
        this.withEuropeanRules = true;
        this.vCritEur = 5.0;
        this.lcInputData = null;
        isInitialized = true;
public LaneChangeModel(LaneChangeInputData lcInputData)
Vehicle vehicle
core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java
// TODO handle this case with *no* <MOBIL> xml element
public MOBIL(Vehicle vehicle)
Vehicle vehicle  LaneChangeMobilData lcMobilData
core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java
if (lcMobilData.getSafeDeceleration() > vehicle.getMaxDeceleration()) {
        bSafeRef = bSafe = Math.min(lcMobilData.getSafeDeceleration(), vehicle.getMaxDeceleration());
        biasRightRef = biasRight = lcMobilData.getRightBiasAcceleration();
        gapMin = lcMobilData.getMinimumGap();
        thresholdRef = threshold = lcMobilData.getThresholdAcceleration();
        pRef = politeness = lcMobilData.getPoliteness();
    public MOBIL(Vehicle vehicle, double minimumGap, double safeDeceleration, double politeness,
            double thresholdAcceleration, double rightBiasAcceleration) {
        bSafeRef = bSafe = safeDeceleration;
        biasRightRef = biasRight = rightBiasAcceleration;
        gapMin = minimumGap;
        thresholdRef = threshold = thresholdAcceleration;
        pRef = this.politeness = politeness;
public MOBIL(Vehicle vehicle, LaneChangeMobilData lcMobilData)
core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java
return gapMin;
    public double getSafeDeceleration() {
        return bSafe;
double getMinimumGap()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ACC.java
return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameters();
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ACC.java
if (param.getCoolness() < 0 || param.getCoolness() > 1) {
            logger.error(" coolness parameter = {
boolean isValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/CCS.java
// TODO Auto-generated method stub
        return false;
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Gipps.java
return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameters();
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Gipps.java
if (param.getA() < 0 || param.getB() < 0) {
            logger.error(" negative parameter values for {
boolean isValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/IDM.java
// TODO Auto-generated method stub
        return false;
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/KKW.java
return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/KKW.java
if (param.getK() < 0 || !ModelParameters.isValidProbabilityRange(param.getPb0())
                || !ModelParameters.isValidProbabilityRange(param.getPb1())
                || !ModelParameters.isValidProbabilityRange(param.getPa1())
                || !ModelParameters.isValidProbabilityRange(param.getPa2())
                || !ModelParameters.isValidProbabilityRange(param.getVp())) {
            logger.error(" negative parameter values for {
boolean isValidParameter()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Krauss.java
return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Krauss.java
if (param.getA() <= 0 || param.getB() <= 0) {
            logger.error(
                    " non-positive parameter values for {
boolean isValidParameter()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelBase.java
return getDesiredSpeed() > 0 && getDesiredSpeed() <= MovsimConstants.MAX_VEHICLE_SPEED;
boolean isValidDesiredSpeed()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelBase.java
return getMinimumGap() >= 0;
boolean isValidMinimumGap()
double vehLength  ModelParameter longitudinalModelParameter 
        if 
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
longModel = new IDM((ModelParameterIDM) longitudinalModelParameter);
LongitudinalModelBase create(double vehLength, ModelParameter longitudinalModelParameter,
        if (longitudinalModelParameter instanceof ModelParameterIDM)
longitudinalModelParameter instanceof ModelParameterACC
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
longModel = new ACC((ModelParameterACC) longitudinalModelParameter);
else if (longitudinalModelParameter instanceof ModelParameterACC)
longitudinalModelParameter instanceof ModelParameterOVMFVDM
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
longModel = new OVM_FVDM((ModelParameterOVMFVDM) longitudinalModelParameter);
else if (longitudinalModelParameter instanceof ModelParameterOVMFVDM)
longitudinalModelParameter instanceof ModelParameterGipps
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
longModel = new Gipps(simulationTimestep, (ModelParameterGipps) longitudinalModelParameter);
else if (longitudinalModelParameter instanceof ModelParameterGipps)
longitudinalModelParameter instanceof ModelParameterKrauss
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
longModel = new Krauss(simulationTimestep, (ModelParameterKrauss) longitudinalModelParameter);
else if (longitudinalModelParameter instanceof ModelParameterKrauss)
longitudinalModelParameter instanceof ModelParameterNewell
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
return new Newell(simulationTimestep, (ModelParameterNewell) longitudinalModelParameter);
else if (longitudinalModelParameter instanceof ModelParameterNewell)
longitudinalModelParameter instanceof ModelParameterNSM
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
longModel = new NSM((ModelParameterNSM) longitudinalModelParameter);
else if (longitudinalModelParameter instanceof ModelParameterNSM)
longitudinalModelParameter instanceof ModelParameterKKW
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java
longModel = new KKW((ModelParameterKKW) longitudinalModelParameter, vehLength);
else if (longitudinalModelParameter instanceof ModelParameterKKW)
double p
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java
return p >= 0 && p <= 1;
boolean isValidProbabilityRange(double p)
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/NSM.java
return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/NSM.java
if (!ModelParameters.isValidProbabilityRange(param.getPSlowdown())
                || !ModelParameters.isValidProbabilityRange(param.getPSlowdown())) {
            logger.error(" negative parameter values for {
boolean isValidParameter()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Newell.java
// TODO Auto-generated method stub
        return false;
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/OVM_FVDM.java
return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();
boolean hasValidParameters()
core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/OVM_FVDM.java
if ( param.getTau() <= 0 || param.getTransitionWidth() < 0 || param.getBeta() < 0 || param.getGamma() < 0 ) {
            logger.error(" negative parameter values for {
boolean isValidParameter()