nl.tudelft.simulation.traffic.vehicle
Class DecelerationProfile

java.lang.Object
  extended bynl.tudelft.simulation.traffic.vehicle.DecelerationProfile

public class DecelerationProfile
extends java.lang.Object


(c) copyright 2003-2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Version:
Jul 5, 2004
Author:
Alexander Verbraeck

Field Summary
protected static boolean debug
          print table for debugging
 
Constructor Summary
DecelerationProfile(double maxSpeed)
          create a new acceleration / deceleration profile
 
Method Summary
 double getBrakeDistance(double initialSpeed, double endSpeed)
           
 double getBrakeTime(double initialSpeed, double endSpeed)
           
 double getDeceleration(double speed)
          Gets the acceleration / deceleration for a given speed
 void initializeProfile()
           
static void main(java.lang.String[] args)
           
 void setDecelerationFromSpeed(double speed, double accdec)
          Set the acceleration / deceleration for current speed HIGHER than speed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static boolean debug
print table for debugging

Constructor Detail

DecelerationProfile

public DecelerationProfile(double maxSpeed)
create a new acceleration / deceleration profile

Parameters:
maxSpeed -
Method Detail

setDecelerationFromSpeed

public void setDecelerationFromSpeed(double speed,
                                     double accdec)
Set the acceleration / deceleration for current speed HIGHER than speed. Add the points in increasing speed. Sorting is not (yet) done automatically.

Parameters:
speed - the speed above which accdec is used
accdec - the acceleration (positive) or deceleration (negative)

getDeceleration

public double getDeceleration(double speed)
Gets the acceleration / deceleration for a given speed

Parameters:
speed -
Returns:

initializeProfile

public void initializeProfile()

getBrakeTime

public double getBrakeTime(double initialSpeed,
                           double endSpeed)
Parameters:
initialSpeed -
endSpeed -
Returns:
the time to brake from the initialSpeed to the endSpeed

getBrakeDistance

public double getBrakeDistance(double initialSpeed,
                               double endSpeed)
Parameters:
initialSpeed -
endSpeed -
Returns:
the distance to brake from the initialSpeed to the endSpeed

main

public static void main(java.lang.String[] args)
Parameters:
args -


Copyright © 2003-2004 Delft University of Technology, the Netherlands. All Rights Reserved.