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-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
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.
|
static void |
generateConflictPair(ConflictType conflictType,
Lane lane1,
org.djunits.value.vdouble.scalar.Length longitudinalPosition1,
org.djunits.value.vdouble.scalar.Length length1,
org.opentrafficsim.core.geometry.OTSLine3D geometry1,
ConflictRule conflictRule1,
Lane lane2,
org.djunits.value.vdouble.scalar.Length longitudinalPosition2,
org.djunits.value.vdouble.scalar.Length length2,
org.opentrafficsim.core.geometry.OTSLine3D geometry2,
ConflictRule conflictRule2)
Creates a pair of conflicts.
|
ConflictRule |
getConflictRule() |
ConflictType |
getConflictType() |
String |
toString() |
clone, getLane, getLongitudinalPosition
getBounds, getGeometry, getHeight, getLocation
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, getLocation, makeGeometry
public ConflictType getConflictType()
public ConflictRule getConflictRule()
public static void generateConflictPair(ConflictType conflictType, Lane lane1, org.djunits.value.vdouble.scalar.Length longitudinalPosition1, org.djunits.value.vdouble.scalar.Length length1, org.opentrafficsim.core.geometry.OTSLine3D geometry1, ConflictRule conflictRule1, Lane lane2, org.djunits.value.vdouble.scalar.Length longitudinalPosition2, org.djunits.value.vdouble.scalar.Length length2, org.opentrafficsim.core.geometry.OTSLine3D geometry2, ConflictRule conflictRule2) throws org.opentrafficsim.core.network.NetworkException
conflictType
- conflict type, i.e. crossing, merge or splitlane1
- lane of conflict 1longitudinalPosition1
- longitudinal position of conflict 1length1
- Length
of conflict 1geometry1
- geometry of conflict 1conflictRule1
- conflict rule of conflict 1lane2
- lane of conflict 2longitudinalPosition2
- longitudinal position of conflict 2length2
- Length
of conflict 2geometry2
- geometry of conflict 1conflictRule2
- conflict rule of conflict 2org.opentrafficsim.core.network.NetworkException
- if the combination of conflict type and both conflict rules is not correctpublic String toString()
toString
in class org.opentrafficsim.core.object.StaticObject
public Conflict clone(CrossSectionElement newCSE, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
clone
in class AbstractLaneBasedObject
newCSE
- the new cross section element to which the clone belongsnewSimulator
- the new simulator for this networkanimation
- whether to (re)create animation or notorg.opentrafficsim.core.network.NetworkException
- in case the cloning failsCopyright © 2014–2016 Delft University of Technology. All rights reserved.