RouteActionInfo
The RouteActionInfo class is a container that links a set of RouteActions with the agent who performs them. It provides a quick and consolidated view of what an agent is doing along the route, including both the agent identity and their full list of actions.
This is useful when you need to analyze or display route activities grouped by agent.
Purpose
Use RouteActionInfo to:
- Group route actions by agent
- Retrieve a full list of execution steps for a specific agent
- Access the associated
AgentSolutioncontext directly - Build Gantt charts, timelines, or dashboards per agent
Constructor
Initializes a RouteActionInfo object. Throws an error if raw input is missing.
Methods
| Method | Description |
|---|---|
getRaw() |
Returns the internal RouteActionInfoData object |
getAgentId() |
Returns the id of the agent |
getActions() |
Returns an array of RouteAction objects |
getAgent() |
Returns the corresponding AgentSolution object |
Example
const actionInfo = new RouteActionInfo(data);
console.log("Agent:", actionInfo.getAgentId());
const actions = actionInfo.getActions();
actions.forEach((action) => {
console.log(action.getType(), action.getStartTime());
});
This helps you visualize all route activities for an agent in sequence.
Related
RouteAction– individual route stepsAgentSolution– full route and timeline for the agentRoutePlannerResult– top-level access to all solutions