|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.traffic.controlpoint.blocks.VirtualBlock
This class implements a virtual block that will be guarded by n SingleTrackBlockTrafficLights. Only one vehicle is allowed in the Block.
(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 | |
protected int |
busy
busy shows the number of vehicles in the guarded block |
java.util.ArrayList |
requestList
requestList shows the list of SwicthBlockTrafficLights that are requesting access to the block |
| Constructor Summary | |
VirtualBlock(java.lang.String name)
Constructs a VirtualBlock |
|
| Method Summary | |
java.lang.String |
getName()
|
void |
releaseBlock()
releaseBlock releases the block for other vehicles and check if there is any access request in the requesList |
void |
requestAccess(SwitchBlockTrafficLight switchBlockTrafficLight)
requestAccess process the request to gain access to the block |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int busy
public java.util.ArrayList requestList
| Constructor Detail |
public VirtualBlock(java.lang.String name)
name - name of the VirtualBlock| Method Detail |
public void requestAccess(SwitchBlockTrafficLight switchBlockTrafficLight)
switchBlockTrafficLight - the correpondent switchBlockTrafficLight
that want to gain access to the blockpublic void releaseBlock()
public java.lang.String getName()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||