Class PerceivedGtuSimple
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObjectBase
org.opentrafficsim.road.gtu.lane.perception.object.PerceivedGtuSimple
- All Implemented Interfaces:
Comparable<PerceivedObject>,Identifiable,PerceivedGtu,PerceivedObject
- 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-2024 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.lane.perception.object.PerceivedGtu
PerceivedGtu.Behavior, PerceivedGtu.Maneuver, PerceivedGtu.SignalsNested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject
PerceivedObject.Kinematics, PerceivedObject.ObjectType -
Constructor Summary
ConstructorsConstructorDescriptionPerceivedGtuSimple(String id, GtuType gtuType, Length length, 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.getWidth()Returns the width of the GTU.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.lane.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.lane.perception.object.PerceivedGtu
movedMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.object.PerceivedObject
compareTo, getAcceleration, getDistance, getKinematics, getLength, getObjectType, getSpeed
-
Constructor Details
-
PerceivedGtuSimple
public PerceivedGtuSimple(String id, GtuType gtuType, Length length, 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
Description copied from interface:PerceivedGtuReturns the width of the GTU.- Specified by:
getWidthin interfacePerceivedGtu- Returns:
- width of the GTU
-
getGtuType
Description copied from interface:PerceivedGtuReturns the GTU type.- Specified by:
getGtuTypein interfacePerceivedGtu- Returns:
- gtuType
-
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()- Overrides:
hashCodein classPerceivedObjectBase
-
equals
- Overrides:
equalsin classPerceivedObjectBase
-
toString
- Overrides:
toStringin classPerceivedObjectBase
-