public final class Conflict extends AbstractLaneBasedObject
Conflict
represents the one-sided consideration of a conflicting situation. I.e., what is
considered a single conflict in traffic theory, is represented by two Conflict
s, one on each of the
conflicting Lane
s.
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
class |
Conflict.ConflictEnd
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
|
Modifier and Type | Method and Description |
---|---|
Conflict |
clone(CrossSectionElement newCSE,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation)
Clone the LaneBasedObject for e.g., copying a network.
|
ConflictPriority |
conflictPriority() |
static void |
generateConflictPair(ConflictType conflictType,
ConflictRule conflictRule,
boolean permitted,
Lane lane1,
org.djunits.value.vdouble.scalar.Length longitudinalPosition1,
org.djunits.value.vdouble.scalar.Length length1,
org.opentrafficsim.core.gtu.GTUDirectionality direction1,
org.opentrafficsim.core.geometry.OTSLine3D geometry1,
org.opentrafficsim.core.gtu.GTUType gtuType1,
Lane lane2,
org.djunits.value.vdouble.scalar.Length longitudinalPosition2,
org.djunits.value.vdouble.scalar.Length length2,
org.opentrafficsim.core.gtu.GTUDirectionality direction2,
org.opentrafficsim.core.geometry.OTSLine3D geometry2,
org.opentrafficsim.core.gtu.GTUType gtuType2,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
Creates a pair of conflicts.
|
ConflictRule |
getConflictRule() |
ConflictType |
getConflictType() |
org.opentrafficsim.core.gtu.GTUType |
getGtuType() |
org.djunits.value.vdouble.scalar.Length |
getLength() |
Conflict |
getOtherConflict() |
boolean |
isPermitted()
If permitted, traffic upstream of traffic lights may not be ignored, as these can have green light.
|
String |
toString() |
clone, getDirection, getFullId, getLane, getLocation, getLongitudinalPosition
getBounds, getGeometry, getHeight, getId
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBounds, makeGeometry
public ConflictType getConflictType()
public ConflictRule getConflictRule()
public ConflictPriority conflictPriority()
public org.djunits.value.vdouble.scalar.Length getLength()
public Conflict getOtherConflict()
public org.opentrafficsim.core.gtu.GTUType getGtuType()
public boolean isPermitted()
public static void generateConflictPair(ConflictType conflictType, ConflictRule conflictRule, boolean permitted, Lane lane1, org.djunits.value.vdouble.scalar.Length longitudinalPosition1, org.djunits.value.vdouble.scalar.Length length1, org.opentrafficsim.core.gtu.GTUDirectionality direction1, org.opentrafficsim.core.geometry.OTSLine3D geometry1, org.opentrafficsim.core.gtu.GTUType gtuType1, Lane lane2, org.djunits.value.vdouble.scalar.Length longitudinalPosition2, org.djunits.value.vdouble.scalar.Length length2, org.opentrafficsim.core.gtu.GTUDirectionality direction2, org.opentrafficsim.core.geometry.OTSLine3D geometry2, org.opentrafficsim.core.gtu.GTUType gtuType2, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) throws org.opentrafficsim.core.network.NetworkException
conflictType
- conflict type, i.e. crossing, merge or splitconflictRule
- conflict rulepermitted
- whether the conflict is permitted in traffic light controllane1
- lane of conflict 1longitudinalPosition1
- longitudinal position of conflict 1length1
- Length
of conflict 1direction1
- GTU direction of conflict 1geometry1
- geometry of conflict 1gtuType1
- gtu type of conflict 1lane2
- lane of conflict 2longitudinalPosition2
- longitudinal position of conflict 2length2
- Length
of conflict 2direction2
- GTU direction of conflict 2geometry2
- geometry of conflict 2gtuType2
- gtu type of conflict 2simulator
- the simulator for animation and timed eventsorg.opentrafficsim.core.network.NetworkException
- if the combination of conflict type and both conflict rules is not correctpublic String toString()
toString
in class AbstractLaneBasedObject
public Conflict clone(CrossSectionElement newCSE, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
clone
in class AbstractLaneBasedObject
newCSE
- CrossSectionElement; the new cross section element to which the clone belongsnewSimulator
- OTSSimulatorInterface; the new simulator for this networkanimation
- boolean; whether to (re)create animation or notorg.opentrafficsim.core.network.NetworkException
- in case the cloning failsCopyright © 2014–2017 Delft University of Technology. All rights reserved.