Method GetClosestAgent
GetClosestAgent(RideID)
Find the closest agent to agent. Use all agents in the scenario.
Declaration
public static RideID GetClosestAgent(RideID agent)
Parameters
Type | Name | Description |
---|---|---|
RideID | agent |
Returns
Type | Description |
---|---|
RideID | The closest agent |
GetClosestAgent(RideID, IEnumerable<RideID>)
Find the agent id of the closest agent to agent.
Declaration
public static RideID GetClosestAgent(RideID agent, IEnumerable<RideID> agents)
Parameters
Type | Name | Description |
---|---|---|
RideID | agent | The agent where distance will be measured to |
IEnumerable<RideID> | agents | The list of agents to find the closest |
Returns
Type | Description |
---|---|
RideID | The closest agent |