Class MultimodalAgent<TLayer>
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Implements
IAgent<TLayer>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SOHMultimodalModel.Multimodal
Assembly: SOHMultimodalModel.dll
Syntax
public abstract class MultimodalAgent<TLayer> : IAgent<TLayer>, IModalCapabilitiesAgent, IAgent, ITickClient, IEntity, IModelObject, IPassengerCapable, IPositionable where TLayer : IMultimodalLayer
Type Parameters
Name | Description |
---|---|
TLayer |
Properties
| Improve this Doc View SourceActiveSteering
The currently used and thus active steering handle. Is never null.
Declaration
protected ISteeringHandle ActiveSteering { get; set; }
Property Value
Type | Description |
---|---|
ISteeringHandle |
Context
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public ISimulationContext Context { get; }
Property Value
Type | Description |
---|---|
ISimulationContext |
CurrentMultimodalRouteStartTime
Contains the System.DateTime of the moment a new MultimodalRoute is assigned
Declaration
protected DateTime CurrentMultimodalRouteStartTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
DistanceStartGoal
Provides the steering handle that is used whenever another active steering is invalidated.
In urban cases that could be a walking steering.
Declaration
public double DistanceStartGoal { get; }
Property Value
Type | Description |
---|---|
System.Double |
GoalReached
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public bool GoalReached { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
GoalX
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public double GoalX { get; }
Property Value
Type | Description |
---|---|
System.Double |
GoalY
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public double GoalY { get; }
Property Value
Type | Description |
---|---|
System.Double |
ID
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public Guid ID { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
ModalChoices
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public ISet<ModalChoice> ModalChoices { get; protected set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ISet<ModalChoice> |
MultimodalLayer
Gets the multimodal layer which manage this entity.
Declaration
public IMultimodalLayer MultimodalLayer { get; set; }
Property Value
Type | Description |
---|---|
IMultimodalLayer |
MultimodalRoute
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public MultimodalRoute MultimodalRoute { get; set; }
Property Value
Type | Description |
---|---|
MultimodalRoute |
Offside
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
protected bool Offside { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OnSidewalk
Determines whether the agent is inserted in the primary steering environment or not
Declaration
protected bool OnSidewalk { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Position
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public Position Position { get; set; }
Property Value
Type | Description |
---|---|
Position |
RouteLength
The full length ot the multimodal route.
Declaration
public int RouteLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RouteMainModalChoice
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public ModalChoice RouteMainModalChoice { get; }
Property Value
Type | Description |
---|---|
ModalChoice |
SimulationTime
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
protected DateTime SimulationTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
StableId
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public int StableId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StartX
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public double StartX { get; }
Property Value
Type | Description |
---|---|
System.Double |
StartY
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public double StartY { get; }
Property Value
Type | Description |
---|---|
System.Double |
Velocity
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public double Velocity { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Whereabouts
Determines if the agent is on the sidewalk (walking), in a vehicle (driving or co-driving) or outside of all
environments.
Declaration
public Whereabouts Whereabouts { get; }
Property Value
Type | Description |
---|---|
Whereabouts |
Methods
| Improve this Doc View SourceEnterModalType(ModalChoice, Route)
The agent has to enter into given modal type.
Declaration
protected abstract bool EnterModalType(ModalChoice modalChoice, Route route)
Parameters
Type | Name | Description |
---|---|---|
ModalChoice | modalChoice | that should be the next active modal type. |
Route | route | that should be the next active route. |
Returns
Type | Description |
---|---|
System.Boolean | Success of switching. |
Init(TLayer)
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public virtual void Init(TLayer layer)
Parameters
Type | Name | Description |
---|---|---|
TLayer | layer |
LeaveModalType(ModalChoice)
The agent has to leave given modal type.
Declaration
protected abstract bool LeaveModalType(ModalChoice modalChoice)
Parameters
Type | Name | Description |
---|---|---|
ModalChoice | modalChoice | that will be left. |
Returns
Type | Description |
---|---|
System.Boolean | Success of leaving. |
Move()
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public virtual void Move()
Notify(PassengerMessage)
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public abstract void Notify(PassengerMessage passengerMessage)
Parameters
Type | Name | Description |
---|---|---|
PassengerMessage | passengerMessage |
ReRouteToGoal()
Reroutes with new switching points and appends to multimodal route. Then sets active steering route.
Declaration
protected void ReRouteToGoal()
ResetOutputProperties()
Hook method for output properties.
Declaration
protected virtual void ResetOutputProperties()
Tick()
The multimodal agent can handle any modal type and thus any change between modal types. It has a representational
road user that holds physical sizes and is placed in the environment.
Declaration
public abstract void Tick()
TryEnterVehicleAsDriver<TSteeringCapable, TSteeringHandle, TPassengerHandle>(Vehicle<TSteeringCapable, IPassengerCapable, TSteeringHandle, TPassengerHandle>, TSteeringCapable)
Tries to enter a vehicle as the driver. If this succeeds, the pedestrian leaves the sidewalk (switch of
modal context) and sets a new route.
Declaration
public bool TryEnterVehicleAsDriver<TSteeringCapable, TSteeringHandle, TPassengerHandle>(Vehicle<TSteeringCapable, IPassengerCapable, TSteeringHandle, TPassengerHandle> vehicle, TSteeringCapable driver)
where TSteeringCapable : ISteeringCapable where TSteeringHandle : ISteeringHandle where TPassengerHandle : IPassengerHandle
Parameters
Type | Name | Description |
---|---|---|
Vehicle<TSteeringCapable, IPassengerCapable, TSteeringHandle, TPassengerHandle> | vehicle | That should be entered. |
TSteeringCapable | driver | Who wants to enter the vehicle. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the operation was successful or not. |
Type Parameters
Name | Description |
---|---|
TSteeringCapable | |
TSteeringHandle | |
TPassengerHandle |
TryEnterVehicleAsPassenger<TSteeringCapable, TSteeringHandle, TPassengerHandle>(Vehicle<TSteeringCapable, IPassengerCapable, TSteeringHandle, TPassengerHandle>, ISteeringCapable)
Tries to enter a vehicle as a passengerCapable. If this succeeds, the pedestrian leaves the sidewalk
(switch of modal context).
Declaration
public bool TryEnterVehicleAsPassenger<TSteeringCapable, TSteeringHandle, TPassengerHandle>(Vehicle<TSteeringCapable, IPassengerCapable, TSteeringHandle, TPassengerHandle> vehicle, ISteeringCapable passenger)
where TSteeringCapable : ISteeringCapable where TSteeringHandle : ISteeringHandle where TPassengerHandle : IPassengerHandle
Parameters
Type | Name | Description |
---|---|---|
Vehicle<TSteeringCapable, IPassengerCapable, TSteeringHandle, TPassengerHandle> | vehicle | That should be entered. |
ISteeringCapable | passenger | Who wants to enter the vehicle. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the operation was successful or not. |
Type Parameters
Name | Description |
---|---|
TSteeringCapable | |
TSteeringHandle | |
TPassengerHandle |
TryLeaveVehicle(IPassengerCapable)
Leaves the current vehicle and enters the sidewalk.
Declaration
public bool TryLeaveVehicle(IPassengerCapable passengerCapable)
Parameters
Type | Name | Description |
---|---|---|
IPassengerCapable | passengerCapable | Who wants to leave the vehicle. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the operation was successful or not. |