Class PerceivedGtuSimple
java.lang.Object
org.opentrafficsim.road.gtu.perception.object.PerceivedObjectBase
org.opentrafficsim.road.gtu.perception.object.PerceivedGtuSimple
- All Implemented Interfaces:
Comparable<PerceivedObject>,Identifiable,PerceivedGtu,PerceivedObject,TacticalContext
- Direct Known Subclasses:
PerceivedGtuBase
Simple implementation of perceived GTU's which stores the information. This class does not support the behavioral component.
Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.perception.object.PerceivedGtu
PerceivedGtu.Behavior, PerceivedGtu.Maneuver, PerceivedGtu.SignalsNested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.perception.object.PerceivedObject
PerceivedObject.Kinematics, PerceivedObject.ObjectType -
Constructor Summary
ConstructorsConstructorDescriptionPerceivedGtuSimple(String id, GtuType gtuType, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Length width, PerceivedObject.Kinematics kinematics, PerceivedGtu.Signals signals, PerceivedGtu.Maneuver maneuver) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns information on the behavior.Returns the GTU type.Returns information on the maneuver.Returns information on the signals.org.djunits.value.vdouble.scalar.LengthgetWidth()Return ego width.inthashCode()static PerceivedGtuSimpleof(LaneBasedGtu gtu, PerceivedObject.Kinematics kinematics) Returns perceived GTU with given kinematics, but withoutBehavior.toString()Methods inherited from class org.opentrafficsim.road.gtu.perception.object.PerceivedObjectBase
getId, getKinematics, getLength, getObjectTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djutils.base.Identifiable
getIdMethods inherited from interface org.opentrafficsim.road.gtu.perception.object.PerceivedGtu
getAcceleration, getCarFollowingModel, getDesiredSpeed, getLaneChangeDirection, getMaximumSpeed, getParameters, getRoute, getSpeed, getSpeedLimits, movedMethods inherited from interface org.opentrafficsim.road.gtu.perception.object.PerceivedObject
compareTo, getDistance, getKinematics, getLength, getObjectTypeMethods inherited from interface org.opentrafficsim.road.gtu.tactical.TacticalContext
getLength
-
Constructor Details
-
PerceivedGtuSimple
public PerceivedGtuSimple(String id, GtuType gtuType, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Length width, PerceivedObject.Kinematics kinematics, PerceivedGtu.Signals signals, PerceivedGtu.Maneuver maneuver) Constructor.- Parameters:
id- GTU idgtuType- GTU typelength- length of the GTUwidth- width of the GTUkinematics- kinematicssignals- signalsmaneuver- maneuver- Throws:
NullPointerException- when any input argument isnull
-
-
Method Details
-
getWidth
public org.djunits.value.vdouble.scalar.Length getWidth()Description copied from interface:TacticalContextReturn ego width.- Specified by:
getWidthin interfaceTacticalContext- Returns:
- ego width
-
getGtuType
Description copied from interface:TacticalContextReturns the GTU type.- Specified by:
getGtuTypein interfaceTacticalContext- Returns:
- GTU type
-
getSignals
Description copied from interface:PerceivedGtuReturns information on the signals. This includes indicators and braking lights.- Specified by:
getSignalsin interfacePerceivedGtu- Returns:
- information on the signals
-
getManeuver
Description copied from interface:PerceivedGtuReturns information on the maneuver. This includes lane changing and lateral deviation.- Specified by:
getManeuverin interfacePerceivedGtu- Returns:
- information on the maneuver
-
getBehavior
Description copied from interface:PerceivedGtuReturns information on the behavior. This includes the car-following model, parameters, desired speed, route, lane change desire and social pressure.- Specified by:
getBehaviorin interfacePerceivedGtu- Returns:
- information on the behavior
-
of
Returns perceived GTU with given kinematics, but withoutBehavior.- Parameters:
gtu- GTU that is perceivedkinematics- kinematics for the vehicle- Returns:
- perceived view of the GTU
-
hashCode
public int hashCode()Description copied from class:PerceivedObjectBase- Overrides:
hashCodein classPerceivedObjectBase
-
equals
Description copied from class:PerceivedObjectBase- Overrides:
equalsin classPerceivedObjectBase
-
toString
Description copied from class:PerceivedObjectBase- Overrides:
toStringin classPerceivedObjectBase
-