nl.tudelft.simulation.traffic.vehicle
Class AccelerationProfile

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

public class AccelerationProfile
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
AccelerationProfile(double maxSpeed)
          create a new acceleration / deceleration profile
 
Method Summary
 double getAcceleration(double speed)
          Gets the acceleration / deceleration for a given speed
 double getAccelerationDistance(double initialSpeed, double endSpeed)
           
 double getAccelerationTime(double initialSpeed, double endSpeed)
           
 void initializeProfile()
           
static void main(java.lang.String[] args)
           
 void setAccelerationFromSpeed(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

AccelerationProfile

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

Parameters:
maxSpeed -
Method Detail

setAccelerationFromSpeed

public void setAccelerationFromSpeed(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)

getAcceleration

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

Parameters:
speed -
Returns:

initializeProfile

public void initializeProfile()

getAccelerationTime

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

getAccelerationDistance

public double getAccelerationDistance(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.