nl.tudelft.simulation.traffic.controlpoint.real
Class TrafficLight
java.lang.Object
nl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.traffic.controlpoint.real.AbstractVisibleControlPoint
nl.tudelft.simulation.traffic.controlpoint.real.TrafficLight
- All Implemented Interfaces:
- Changeable, ControlPointInterface, nl.tudelft.simulation.event.EventProducerInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface, java.io.Serializable, StopSignInterface, VisibleControlPointInterface
- public class TrafficLight
- extends AbstractVisibleControlPoint
- implements StopSignInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface
This class is an implementation of a simple trafficLight. It is based on the
AbstractVisibleContolPoint and the StopSignInterface. The
LocatableInterface is only used for the animation.
- Author:
- J.H. Kwakkel & H.W.G. Phaff
- See Also:
StopSignInterface,
AbstractVisibleControlPoint,
Serialized Form
| Fields inherited from class nl.tudelft.simulation.event.EventProducer |
listeners |
| Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
FIRST_POSITION, LAST_POSITION |
|
Constructor Summary |
TrafficLight(java.lang.String name,
double progression,
double visibleDistance,
TrackInterface track,
nl.tudelft.simulation.jstats.distributions.DistContinuous durationGreen,
nl.tudelft.simulation.jstats.distributions.DistContinuous durationRed,
java.lang.String status,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
double dx,
double dy)
|
| 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, getEventTypes, 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, getEventTypes, removeListener |
TrafficLight
public TrafficLight(java.lang.String name,
double progression,
double visibleDistance,
TrackInterface track,
nl.tudelft.simulation.jstats.distributions.DistContinuous durationGreen,
nl.tudelft.simulation.jstats.distributions.DistContinuous durationRed,
java.lang.String status,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
double dx,
double dy)
- Parameters:
name - progression - visibleDistance - track - durationGreen - durationRed - status - simulator - dx - dy -
changeStatus
protected void changeStatus()
throws java.lang.Exception
- Throws:
java.lang.Exception
pass
public void pass(VehiclePhysicalInterface vehicle)
- Description copied from interface:
ControlPointInterface
- This method handles actions of the controlPoint when the controlPoint is
passed by a vehicle.
- Specified by:
pass in interface ControlPointInterface
- Parameters:
vehicle - that triggers the controlPoint- See Also:
ControlPointInterface.pass(nl.tudelft.simulation.traffic.vehicle.VehiclePhysicalInterface)
getProgression
public double getProgression()
- Description copied from interface:
ControlPointInterface
- The getProgression() method returns progression where the controlPoint is
located
- Specified by:
getProgression in interface ControlPointInterface- Overrides:
getProgression in class AbstractVisibleControlPoint
- See Also:
ControlPointInterface.getProgression()
getStatus
public java.lang.String getStatus()
- Specified by:
getStatus in interface Changeable
- Returns:
- status
- See Also:
Changeable.getStatus()
getLocation
public nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
throws java.rmi.RemoteException
- Specified by:
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatableInterface- Overrides:
getLocation in class AbstractVisibleControlPoint
- Throws:
java.rmi.RemoteException- See Also:
LocatableInterface.getLocation()
getTrack
public TrackInterface getTrack()
- Description copied from interface:
ControlPointInterface
- This method returns the track on which the controlPoint is located
- Specified by:
getTrack in interface ControlPointInterface- Overrides:
getTrack in class AbstractVisibleControlPoint
- See Also:
ControlPointInterface.getTrack()
getBounds
public javax.media.j3d.Bounds getBounds()
throws java.rmi.RemoteException
- Specified by:
getBounds in interface nl.tudelft.simulation.dsol.animation.LocatableInterface- Overrides:
getBounds in class AbstractVisibleControlPoint
- Throws:
java.rmi.RemoteException- See Also:
LocatableInterface.getBounds()
toString
public java.lang.String toString()
- See Also:
Object.toString()
Copyright © 2003-2004 Delft University of Technology, the Netherlands. All Rights Reserved.