nl.tudelft.simulation.traffic.station
Class StationHaltingTrafficLight
java.lang.Object
nl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.traffic.controlpoint.real.AbstractVisibleControlPoint
nl.tudelft.simulation.traffic.station.StationHaltingTrafficLight
- All Implemented Interfaces:
- Changeable, ControlPointInterface, nl.tudelft.simulation.event.EventProducerInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface, java.io.Serializable, StopSignInterface, VisibleControlPointInterface
- public class StationHaltingTrafficLight
- extends AbstractVisibleControlPoint
- implements nl.tudelft.simulation.dsol.animation.LocatableInterface, StopSignInterface
This class implements the traffic light for the stations. The traffic light
has the objective of controlling the behavior of the vehicles at the
stations. They have only two states: - red -> to make the vehicles stop at
the station - green -> to allow them to depart (after the halting time has
passed
(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:
- May 31, 2004
- Author:
- Alexander
Verbraeck
- See Also:
- 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 |
StationHaltingTrafficLight(Station station,
java.lang.String name,
TrackInterface track,
double progression,
double visibleDistance,
double requestDistance,
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 |
STATE_GREEN
public static final java.lang.String STATE_GREEN
- GREEN state
- See Also:
- Constant Field Values
STATE_RED
public static final java.lang.String STATE_RED
- RED state
- See Also:
- Constant Field Values
SENSOR_RED
public static final int SENSOR_RED
- GREEN sensor
- See Also:
- Constant Field Values
SENSOR_TIMER
public static final int SENSOR_TIMER
- RED sensor
- See Also:
- Constant Field Values
sensorNames
public static final java.lang.String[] sensorNames
- sensor names
requestDistance
public double requestDistance
- the distance before the stopping place to request
station
public Station station
- the station
simulator
public nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator
- the simulator
StationHaltingTrafficLight
public StationHaltingTrafficLight(Station station,
java.lang.String name,
TrackInterface track,
double progression,
double visibleDistance,
double requestDistance,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
double dx,
double dy)
- Parameters:
station - name - track - progression - visibleDistance - requestDistance - simulator - dx - dy -
triggerSensor
public void triggerSensor(int sensor,
VehiclePhysicalInterface vehicle)
- Parameters:
sensor - vehicle -
stateGreen
public void stateGreen()
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)
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()
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()
getCurrentState
public java.lang.String getCurrentState()
- Returns:
- Returns the currentState.
getStatus
public java.lang.String getStatus()
- Specified by:
getStatus in interface Changeable
- Returns:
- status
- See Also:
Changeable.getStatus()
toString
public java.lang.String toString()
- See Also:
Object.toString()
getStation
public Station getStation()
- Returns:
Copyright © 2003-2004 Delft University of Technology, the Netherlands. All Rights Reserved.