Class TurnOffJunctionModel

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

public class TurnOffJunctionModel
extends JunctionModel
implements Timed


Field Summary
 Car permittedCar
           
protected  int priority1
           
protected  int priority2
           
 
Fields inherited from class JunctionModel
ei, endLanesID, iD, junctionShape, maxNum, parent, paths, pi, si, startLanesID, ticker, totalNumPaths
 
Constructor Summary
TurnOffJunctionModel(int iD, int p1, int p2, java.awt.Shape s, RoadNetwork parent)
           
 
Method Summary
 boolean acceptGap()
           
 boolean carsOnConflictingPath(CarContainer path)
           
 boolean carsOnPriorityLane()
           
 void generatePaths()
           
 java.lang.String giveInfo()
          Due to mouse Events
 boolean isOKToGo(Car car, double currentdist)
           
 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, 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
Constructor Detail

TurnOffJunctionModel

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

generatePaths

public void generatePaths()
Overrides:
generatePaths in class JunctionModel

carsOnPriorityLane

public boolean carsOnPriorityLane()

acceptGap

public boolean acceptGap()

carsOnConflictingPath

public boolean carsOnConflictingPath(CarContainer path)

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