nl.tudelft.simulation.traffic.vehicle
Interface VehiclePhysicalInterface

All Superinterfaces:
java.util.EventListener, nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventProducerInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface
All Known Implementing Classes:
VehiclePhysical

public interface VehiclePhysicalInterface
extends nl.tudelft.simulation.event.EventProducerInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface, nl.tudelft.simulation.event.EventListenerInterface

This interface defines the behaviour of the physical part of a vehicle.
(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 4, 2004
Author:
Alexander Verbraeck

Field Summary
static nl.tudelft.simulation.event.EventType REMOVE_EVENT
          This event signals that the vehicle is leaving the infrastructure.
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Method Summary
 javax.vecmath.Point3d getBackwardLocation(double distance)
          Returns the location of a position 'distace' meters behind the front of the vehicle
 double getCurrentAcceleration(double speed, double progression)
          Returns the vehicle's current acceleration
 double getCurrentSpeed()
          Returns the vehicle's current speed
 TrackInterface getCurrentTrack()
          Returns the vehicle's current track
 double getDistanceTraveled()
          this method is used for verification etc.
 double getProgression()
          Returns the vehicle's current progression on the track where it is located.
 VehicleControlInterface getVehicleControl()
          Returns the control associated to this physical vehicle.
 VehicleType getVehicleType()
          Returns the vehicleType.
 void removeVehicle()
          remove the vehicle from the track
 void setMaximumSpeed(double speed)
          Sets the vehicle's maximum speed
 double[] setSpeedAndProgression(double speed, double progression)
           
 void setVehicleControl(VehicleControlInterface vehicleControl)
           
 void startDriving()
          this method is needed to tell the vehicle to start driving
 
Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypes, removeListener
 
Methods inherited from interface nl.tudelft.simulation.dsol.animation.LocatableInterface
getBounds, getLocation
 
Methods inherited from interface nl.tudelft.simulation.event.EventListenerInterface
notify
 

Field Detail

REMOVE_EVENT

public static final nl.tudelft.simulation.event.EventType REMOVE_EVENT
This event signals that the vehicle is leaving the infrastructure.

Method Detail

startDriving

public void startDriving()
this method is needed to tell the vehicle to start driving


getCurrentAcceleration

public double getCurrentAcceleration(double speed,
                                     double progression)
Returns the vehicle's current acceleration

Parameters:
speed -
progression -
Returns:
double

setSpeedAndProgression

public double[] setSpeedAndProgression(double speed,
                                       double progression)
Parameters:
speed -
progression -
Returns:
the new speed and progresssion if they have been changed

setMaximumSpeed

public void setMaximumSpeed(double speed)
Sets the vehicle's maximum speed

Parameters:
speed -

getCurrentSpeed

public double getCurrentSpeed()
Returns the vehicle's current speed

Returns:
double

getProgression

public double getProgression()
Returns the vehicle's current progression on the track where it is located.

Returns:
progression

getCurrentTrack

public TrackInterface getCurrentTrack()
Returns the vehicle's current track

Returns:
Track

getBackwardLocation

public javax.vecmath.Point3d getBackwardLocation(double distance)
Returns the location of a position 'distace' meters behind the front of the vehicle

Parameters:
distance -
Returns:

getVehicleType

public VehicleType getVehicleType()
Returns the vehicleType.

Returns:
vehicleType.

getVehicleControl

public VehicleControlInterface getVehicleControl()
Returns the control associated to this physical vehicle.

Returns:
vehicleControl

setVehicleControl

public void setVehicleControl(VehicleControlInterface vehicleControl)
Parameters:
vehicleControl - The vehicleControl to set.

getDistanceTraveled

public double getDistanceTraveled()
this method is used for verification etc.

Returns:
total distance the vehicle has traveled

removeVehicle

public void removeVehicle()
                   throws java.rmi.RemoteException
remove the vehicle from the track

Throws:
java.rmi.RemoteException


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