|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.traffic.vehicle.VehiclePhysical
(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
| Field Summary | |
nl.tudelft.simulation.event.EventType |
DISTANCE_SPEED_1SECOND_EVENT
the x-v event type to use for the xyChart |
nl.tudelft.simulation.event.EventType |
TIME_SPEED_1SECOND_EVENT
the t-v event type to use for the xyChart |
| Fields inherited from class nl.tudelft.simulation.event.EventProducer |
listeners |
| Fields inherited from interface nl.tudelft.simulation.traffic.vehicle.VehiclePhysicalInterface |
REMOVE_EVENT |
| Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
FIRST_POSITION, LAST_POSITION |
| Constructor Summary | |
VehiclePhysical(VehicleType vehicleType,
VehicleControlInterface vehicleControl,
TrackInterface track,
double progression,
double maxSpeedStart,
nl.tudelft.simulation.dsol.simulators.DEVDESSSimulatorInterface simulator)
Create a physical vehicle |
|
| Method Summary | |
protected void |
driveOverControlPoints(double from,
double to)
|
javax.vecmath.Point3d |
getBackwardLocation(double distance)
get a location along the track to the back |
javax.media.j3d.Bounds |
getBounds()
|
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 |
protected double |
getCurrentTracksLength()
|
double |
getDistanceTraveled()
this method is used for verification etc. |
nl.tudelft.simulation.event.EventType[] |
getEventTypes()
|
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation()
|
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. |
protected void |
moveToFirstTrack(TrackInterface track,
double progression)
|
protected void |
moveToNextTrack()
The front of the vehicle passes the track limit. |
void |
notify(nl.tudelft.simulation.event.EventInterface event)
|
void |
removeVehicle()
remove the vehicle from the track |
void |
setMaximumSpeed(double maxSpeed)
Sets the vehicle's maximum speed |
double[] |
setSpeedAndProgression(double speed,
double progression)
|
void |
setVehicleControl(VehicleControlInterface vehicleControl)
|
void |
startDriving()
indicate that the vehicle can start driving. |
java.lang.String |
toString()
|
| Methods inherited from class nl.tudelft.simulation.event.EventProducer |
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, removeAllListeners, removeAllListeners, removeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
addListener, addListener, addListener, addListener, removeListener |
| Field Detail |
public nl.tudelft.simulation.event.EventType TIME_SPEED_1SECOND_EVENT
public nl.tudelft.simulation.event.EventType DISTANCE_SPEED_1SECOND_EVENT
| Constructor Detail |
public VehiclePhysical(VehicleType vehicleType,
VehicleControlInterface vehicleControl,
TrackInterface track,
double progression,
double maxSpeedStart,
nl.tudelft.simulation.dsol.simulators.DEVDESSSimulatorInterface simulator)
vehicleType - vehicleControl - track - progression - maxSpeedStart - simulator - | Method Detail |
public nl.tudelft.simulation.event.EventType[] getEventTypes()
getEventTypes in interface nl.tudelft.simulation.event.EventProducerInterfaceEventProducerInterface.getEventTypes()public void startDriving()
startDriving in interface VehiclePhysicalInterfaceVehiclePhysicalInterface.startDriving()
public double getCurrentAcceleration(double speed,
double progression)
VehiclePhysicalInterface
getCurrentAcceleration in interface VehiclePhysicalInterfacespeed - progression -
VehiclePhysicalInterface.getCurrentAcceleration(double,
double)
public double[] setSpeedAndProgression(double speed,
double progression)
setSpeedAndProgression in interface VehiclePhysicalInterfacespeed - progression -
VehiclePhysicalInterface.setSpeedAndProgression(double,
double)protected void moveToNextTrack()
protected void moveToFirstTrack(TrackInterface track,
double progression)
track - progression -
protected void driveOverControlPoints(double from,
double to)
from - to - public double getCurrentSpeed()
VehiclePhysicalInterface
getCurrentSpeed in interface VehiclePhysicalInterfaceVehiclePhysicalInterface.getCurrentSpeed()public void setMaximumSpeed(double maxSpeed)
VehiclePhysicalInterface
setMaximumSpeed in interface VehiclePhysicalInterfacemaxSpeed - VehiclePhysicalInterface.setMaximumSpeed(double)public double getProgression()
VehiclePhysicalInterface
getProgression in interface VehiclePhysicalInterfaceVehiclePhysicalInterface.getProgression()public TrackInterface getCurrentTrack()
VehiclePhysicalInterface
getCurrentTrack in interface VehiclePhysicalInterfaceVehiclePhysicalInterface.getCurrentTrack()public VehicleType getVehicleType()
VehiclePhysicalInterface
getVehicleType in interface VehiclePhysicalInterfaceVehiclePhysicalInterface.getVehicleType()public VehicleControlInterface getVehicleControl()
VehiclePhysicalInterface
getVehicleControl in interface VehiclePhysicalInterfaceVehiclePhysicalInterface.getVehicleControl()public void setVehicleControl(VehicleControlInterface vehicleControl)
setVehicleControl in interface VehiclePhysicalInterfacevehicleControl - The vehicleControl to set.VehiclePhysicalInterface.setVehicleControl(nl.tudelft.simulation.traffic.vehicle.VehicleControlInterface)public double getDistanceTraveled()
VehiclePhysicalInterface
getDistanceTraveled in interface VehiclePhysicalInterfaceVehiclePhysicalInterface.getDistanceTraveled()
public void removeVehicle()
throws java.rmi.RemoteException
VehiclePhysicalInterface
removeVehicle in interface VehiclePhysicalInterfacejava.rmi.RemoteExceptionVehiclePhysicalInterface.removeVehicle()
public void notify(nl.tudelft.simulation.event.EventInterface event)
throws java.rmi.RemoteException
notify in interface nl.tudelft.simulation.event.EventListenerInterfacejava.rmi.RemoteExceptionEventListenerInterface.notify(nl.tudelft.simulation.event.EventInterface)protected double getCurrentTracksLength()
public nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatableInterfaceLocatableInterface.getLocation()public javax.vecmath.Point3d getBackwardLocation(double distance)
getBackwardLocation in interface VehiclePhysicalInterfacedistance -
public javax.media.j3d.Bounds getBounds()
getBounds in interface nl.tudelft.simulation.dsol.animation.LocatableInterfaceLocatableInterface.getBounds()public java.lang.String toString()
Object.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||