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.
Inheritance
IAgent<TLayer>
MultimodalAgent<TLayer>
Implements
IModalCapabilitiesAgent
IPassengerCapable
Assembly: SOHMultimodalModel.dll
Syntax
public abstract class MultimodalAgent<TLayer> : IAgent<TLayer>, IModalCapabilitiesAgent, IPassengerCapable where TLayer : IMultimodalLayer
Type Parameters
Properties
Context
Declaration
public ISimulationContext Context { get; }
Property Value
Type |
Description |
ISimulationContext |
|
ID
Declaration
public Guid ID { get; set; }
Property Value
ModalChoices
Declaration
public ISet<ModalChoice> ModalChoices { get; protected set; }
Property Value
Type |
Description |
ISet<ModalChoice> |
|
MultimodalLayer
Gets the multimodal layer which manage this entity.
Declaration
public IMultimodalLayer MultimodalLayer { get; set; }
Property Value
Offside
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
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
Declaration
public ModalChoice RouteMainModalChoice { get; }
Property Value
Type |
Description |
ModalChoice |
|
SimulationTime
Declaration
protected DateTime SimulationTime { get; }
Property Value
Type |
Description |
DateTime |
|
StableId
Declaration
public int StableId { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Velocity
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
Methods
EnterModalType(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)
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()
Declaration
public virtual void Move()
Notify(PassengerMessage)
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()
Tick()
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. |
Implements
IModalCapabilitiesAgent
IPassengerCapable