Skip to content

Commit

Permalink
updated javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
akegermany committed Jun 13, 2018
1 parent 90ca5cb commit c8e0fae
Showing 1 changed file with 25 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
* Copyright (C) 2010, 2011, 2012 by Arne Kesting, Martin Treiber, Ralph Germ, Martin Budden
* <movsim.org@gmail.com>
* -----------------------------------------------------------------------------------------
*
*
* This file is part of
*
*
* MovSim - the multi-model open-source vehicular-traffic simulator.
*
*
* MovSim is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* MovSim is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with MovSim. If not, see <http://www.gnu.org/licenses/>
* or <http://www.movsim.org>.
*
*
* -----------------------------------------------------------------------------------------
*/
package org.movsim.simulator.vehicles.longitudinalmodel.acceleration;
Expand All @@ -33,7 +33,7 @@

/**
* The Class IDM.
*
*
* <p>
* Implementation of the 'intelligent driver model'(IDM). <a href="http://en.wikipedia.org/wiki/Intelligent_Driver_Model">Wikipedia article
* IDM.</a>
Expand All @@ -42,10 +42,10 @@
* Treiber/Kesting: Traffic Flow Dynamics, 2013, chapter 11.3
* </p>
* <p>
* see <a href="http://xxx.uni-augsburg.de/abs/cond-mat/0002177"> M. Treiber, A. Hennecke, and D. Helbing, Congested Traffic States in
* see <a href="https://arxiv.org/abs/cond-mat/0002177"> M. Treiber, A. Hennecke, and D. Helbing, Congested Traffic States in
* Empirical Observations and Microscopic Simulations, Phys. Rev. E 62, 1805 (2000)].</a>
* </p>
*
*
* Model parameters:
* <ul>
* <li>safe time headway T (s)</li>
Expand All @@ -55,16 +55,6 @@
* <li>acceleration exponent delta (1)</li>
* <li>gap parameter s1 (m).</li>
* </ul>
*
*
* Model parameters:
* <ul>
* <li></li>
* <li></li>
* <li></li>
* <li></li>
* <li></li>
* </ul>
*/
// TODO reduce visibility
public class IDM extends LongitudinalModelBase {
Expand All @@ -81,19 +71,19 @@ public class IDM extends LongitudinalModelBase {

/**
* Constructor.
*
*
* @param v0
* desired velocity, m/s
* desired velocity, m/s
* @param a
* maximum acceleration, m/s^2
* maximum acceleration, m/s^2
* @param b
* desired deceleration (comfortable braking), m/s^2
* desired deceleration (comfortable braking), m/s^2
* @param T
* safe time headway, seconds
* safe time headway, seconds
* @param s0
* bumper to bumper vehicle distance in stationary traffic, meters
* bumper to bumper vehicle distance in stationary traffic, meters
* @param s1
* gap parameter, meters
* gap parameter, meters
*/
public IDM(double v0, double a, double b, double T, double s0, double s1) {
super(ModelName.IDM);
Expand Down Expand Up @@ -142,19 +132,19 @@ public double calcAccSimple(double s, double v, double dv) {

/**
* Acc.
*
*
* @param s
* the s
* the s
* @param v
* the v
* the v
* @param dv
* the dv
* the dv
* @param TLocal
* the t local
* the t local
* @param v0Local
* the v0 local
* the v0 local
* @param aLocal
* the a local
* the a local
* @return the double
*/
private double acc(double s, double v, double dv, double TLocal, double v0Local, double aLocal) {
Expand All @@ -164,8 +154,8 @@ private double acc(double s, double v, double dv, double TLocal, double v0Local,
}

final double s0 = getMinimumGap();
double sstar = s0 + TLocal * v + param.getS1() * Math.sqrt((v + 0.0001) / v0Local) + (0.5 * v * dv)
/ Math.sqrt(aLocal * param.getB());
double sstar = s0 + TLocal * v + param.getS1() * Math.sqrt((v + 0.0001) / v0Local) + (0.5 * v * dv) / Math
.sqrt(aLocal * param.getB());

if (sstar < s0) {
sstar = s0;
Expand Down

0 comments on commit c8e0fae

Please sign in to comment.