Class GiveWayJunctionModel

java.lang.Object
  |
  +--JunctionModel
        |
        +--GiveWayJunctionModel
All Implemented Interfaces:
Timed

public class GiveWayJunctionModel
extends JunctionModel
implements Timed


Field Summary
protected  boolean collectPhase
           
 Car permittedCar
           
protected  int priority1
           
protected  int priority2
           
protected  java.util.Vector priorityQ
           
protected  java.util.Vector waitQ
           
 
Fields inherited from class JunctionModel
ei, endLanesID, iD, junctionShape, maxNum, parent, paths, pi, si, startLanesID, ticker, totalNumPaths
 
Constructor Summary
GiveWayJunctionModel(int iD, int p1, int p2, java.awt.Shape s, RoadNetwork parent)
           
 
Method Summary
 java.lang.String giveInfo()
          Due to mouse Events
 boolean isOKToGo(Car car, double currentdist)
           
 boolean isTheremoreCars(int max)
           
 void pretick()
           
 void tick()
           
 
Methods inherited from class JunctionModel
addEndLane, addStartLane, addToTimer, convertToArrayConvienient, createAnyLeft, createAnyOpposite, createAnyRight, createcorrespondingLeft, createcorrespondingRight, createLeftTurns, createPathBetween, createPathBetween, createPathToOppositeSide, createRightTurns, drawAllCars, drawJunctionFeatures, generatePaths, getAnOpositeLaneFromEdge, getAnOpositeLaneFromJunction, getAnyOutputLane, getCar, getCenter, getID, getLeftDir, getLightsFrom, getLightsTo, getnextLane, getOpDir, getRightDir, getsharedPath, getSpeeds, hasInputOf, isOnLeftSide, isOnMapEdge, isOnRightSide, isSignalled, kill, receiveCar, testForLiveness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

permittedCar

public Car permittedCar

priority1

protected int priority1

priority2

protected int priority2

priorityQ

protected java.util.Vector priorityQ

waitQ

protected java.util.Vector waitQ

collectPhase

protected boolean collectPhase
Constructor Detail

GiveWayJunctionModel

public GiveWayJunctionModel(int iD,
                            int p1,
                            int p2,
                            java.awt.Shape s,
                            RoadNetwork parent)
Method Detail

isTheremoreCars

public boolean isTheremoreCars(int max)

pretick

public void pretick()
Specified by:
pretick in interface Timed
Overrides:
pretick in class JunctionModel

tick

public void tick()
Specified by:
tick in interface Timed
Overrides:
tick in class JunctionModel

isOKToGo

public boolean isOKToGo(Car car,
                        double currentdist)
Specified by:
isOKToGo in class JunctionModel

giveInfo

public java.lang.String giveInfo()
Due to mouse Events

Specified by:
giveInfo in class JunctionModel