public class Desire extends Object implements Serializable
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.
Constructor and Description |
---|
Desire(org.djunits.value.vdouble.scalar.Dimensionless left,
org.djunits.value.vdouble.scalar.Dimensionless right)
Constructor which sets the supplied desire.
|
Desire(double left,
double right)
Constructor which sets the supplied desire.
|
Modifier and Type | Method and Description |
---|---|
double |
get(org.opentrafficsim.core.network.LateralDirectionality dir)
Returns desire in the given direction.
|
double |
getLeft()
Returns lane change desire to left.
|
double |
getRight()
Returns lane change desire to right.
|
boolean |
leftIsLargerOrEqual()
Returns whether the left desire is larger than (or equal to) the right.
|
String |
toString() |
public Desire(double left, double right)
left
- Left desire.right
- Right desire.public Desire(org.djunits.value.vdouble.scalar.Dimensionless left, org.djunits.value.vdouble.scalar.Dimensionless right)
left
- Left desire.right
- Right desire.public final double get(org.opentrafficsim.core.network.LateralDirectionality dir)
dir
- Direction for the desire to return.public final double getLeft()
public final double getRight()
public final boolean leftIsLargerOrEqual()
Copyright © 2014–2017 Delft University of Technology. All rights reserved.