Skip to main content

Route plans

Localization

The documentation provides a description of the interface in Russian.

Route plan is an optimal sequence of points that agents must visit to complete tasks. The agents can view the list of their tasks for the current route plan in the mobile application.

For each route plan, the total distance, estimated execution time, and required number of agents are calculated.

With the Main administrator, Company administrator, and Dispatcher roles, you can work with route plans on the Routes tab:

Working with route plans

Route calculation algorithm​

The goal of the calculation is to distribute the maximum number of tasks among agents while minimizing the number of agents involved, the total plan execution time, and the total distance.

The algorithm iteratively builds routes and selects the best option based on the specified criteria. The order of route option selection:

  1. The route with the largest number of assigned tasks is selected.
  2. If the number of assigned tasks is the same, the route with the fewest agents is selected.
  3. If the number of agents is the same, the option with the shortest total time is selected.
  4. If the total time is the same, the option with the shortest total distance is selected.

The calculation takes into account the location of points and the following constraints:

  • agent capacity
  • shipment data in tasks
  • time constraints: time windows of depots and points, service times, agent working hours, travel time between points
  • task and agent skills (a task with a skill is assigned only to an agent with the same skill)
  • type of transport used in tasks and by agents
  • traffic situation (data on current and statistical traffic jams) depending on the selected route optimization parameter

The algorithm does not divide tasks by districts and does not distribute the agent capacity evenly: it selects the optimal option with the lowest overall cost while taking into account all constraints.

In some cases, the algorithm may not assign all tasks along the route if this is impossible given the constraints. Such tasks will be displayed in the Not assigned panel. Some agents may be excluded if using fewer agents would be more optimal.

Creating a plan​

To create a plan, at least one depot, two tasks, and one agent are required. You can create depots, tasks, and agents while creating a plan or before it.

You cannot add tasks and agents to a plan that are already used in other route plans on the same date (except plans with the Draft status) and shifts (if you use the 2GIS GeoFlow: Monitoring solution).

To create a plan:

  1. Go to the Routes tab.

  2. Click Add route.

  3. Specify the mandatory plan parameters:

    • Name: plan name.

    • Date: date of plan execution. You can select a date no earlier than the current date and no later than 365 days from now. Must match the date specified in the tasks.

    • Time zone: time zone in which the time of the plan execution is specified. Must match the time zone specified in the tasks.

    • Transport: type of transport used in the plan tasks: Car, Bicycle, On foot, Scooter, Truck. Must match the transport type specified in the Transport field for the agents (the field may have a different name depending on the agent template).

    • Route optimization: parameter for optimizing the route between points:

      • Shortest in time according to traffic data: shortest in time using statistical traffic data.
      • Shortest in time according to current traffic: shortest in time considering the current traffic data.
      • Shortest in distance: shortest in distance without considering traffic data.

      For more information about the calculation algorithm, see the Route calculation algorithm section.

    Creating a plan

  4. Add tasks to the plan using one of the following methods. You can add from 2 to 350 tasks to the plan.

    To create tasks in the route plan creation form:

    1. In the Tasks panel, click Plus icon.

    2. Select or create a task template. To create a template, click Add task template: for details, see the Creating a task template section.

      If the template is not suitable for creating a plan (missing required attributes), click Edit task template. Add the attributes and click Save. For more information on attributes, see the Creating a task template section.

    3. In the top-right corner, click + Task.

    4. Specify the task parameters:

      Creating tasks

      • Name: unique task identifier. The field may have a different name depending on the task template, for example, Identifier.

      • Location (mandatory parameter): specify the point address in one of the following ways:

        • Click the point on the map. You can drag the marker icon to any location on the map.
        • Enter the point address in the field and select the option from the dropdown list.
        • Enter the point coordinates in the longitude, latitude format (for example, 37.607132,55.7680412).

        If necessary, specify the entrance, floor, apartment or office, and a comment for the address.

      • Date and time: date and time of the task execution:

        • Date (mandatory parameter): date on which the task must be completed. Must match the date specified in the plan.
        • Time (mandatory parameter): time interval in which the task must be completed.
        • Time for the task in minutes: time required to complete the task.
        • Time zone: time zone in which the time of the task execution is specified.
        • Hard time window: select the checkbox if the task must be performed only at the specified time. If the parameter is specified, the agent will not be able to perform the task earlier or later.
      • Depot (mandatory parameter): depot from which the agent must pick up the shipment:

        Creating a depot

        • Depot: select a depot from the list or add a new one. To add a depot, click Add depot and specify its parameters:

          • Name (mandatory parameter): depot name.

          • Description: depot description.

          • Address (mandatory parameter): specify the depot address in one of the following ways:

            • Click the point on the map. You can drag Depot icon to any location on the map.
            • Enter the depot address in the field and select the option from the dropdown list.
            • Enter the depot coordinates in the longitude, latitude format (e.g., 37.607132,55.7680412).

            If necessary, specify the entrance, floor, office, and a comment for the address.

          • Work schedule: depot operating hours:

            • Time zone: time zone in which the depot working hours are specified.
            • Days of the week: days of the week when the depot operates.
            • Working hours: time interval when the depot operates. To add a working interval, click Add interval and enter the time. To delete an interval, click Cross icon next to it.
            • Hard time window: select the checkbox if the depot can only be visited at the specified time. If an agent cannot arrive at the depot within the specified time interval, the depot is excluded from route calculation.
          • Order assembly time in minutes: time required to assemble an order at the depot.

        • Loading time in minutes: time required to load the order at the depot.

    5. Specify other attributes that depend on the task template.

    6. Click Save.

    7. Select the checkboxes next to the tasks.

      You can search for tasks by name, filter them by type (template), by date and time of execution, depot, skills, and date of update. To hide tasks that cannot be added to the plan, enable the Hide unavailable option.

      Tasks must contain mandatory attributes: the date and time of task execution in the time zone specified in the template, location, and the depot from which the agent must pick up the shipment. For more information on attributes, see the Creating a task template section.

      Selecting tasks

    8. Click Add.

  5. Add agents to perform the plan tasks using one of the following methods. You can add from 1 to 200 agents to the plan.

    To create agents in the route plan creation form:

    1. In the Agents panel, click Plus icon.

    2. Select or create an agent template. To create a template, click Add agent template: for details, see the Creating an agent template section.

    3. In the top-right corner, click + Agent.

    4. Specify the agent main data:

      Creating an agent

      • Name: unique agent identifier. The field may have a different name depending on the agent template, for example, Identifier.

      • Transport: agent transport type. The field may have a different name depending on the agent template.

      • Location source: click Add source and select one of the location source types:

        • Application: select a user who uses the mobile application and will be linked to the agent.
        • EGTS tracker: to link the device to the agent, use the 2GIS GeoFlow: Monitoring solution along with 2GIS GeoFlow: Logistics. In the common web panel, administrators will be able to track agent location.

        You can select multiple location sources for one agent, but each source can only be linked to one agent at a time.

        To add a source, click Add source. To remove a source, click Cross icon next to it.

    5. Specify other attributes that depend on the agent template.

    6. Specify the agent work schedule:

      Creating an agent

      • Time zone: time zone in which the agent working time is specified.
      • Working days: days of the week when the agent works.
      • Working hours: time interval when the agent works. To add a working interval, click Add interval and enter the time. To delete an interval, click Cross icon next to it.
      • Hard time window: select the checkbox if the agent can work only at the specified time. If the agent cannot work during the specified time period, they will be excluded from the route calculation.
    7. Click Save.

    8. Select the checkboxes next to the agents or groups.

      You can search agents by identifier, filter them by agent type (template) and skills. To hide agents that cannot be added to the plan, enable the Hide unavailable option.

      Selecting agents

    9. Click Add.

  6. Finish planning.

    To calculate the route:

    1. Click Calculate route. The plan will have the Calculated status.

    2. Review the plan.

    3. To confirm the plan, click Confirm route. The plan will have the Scheduled status. Agents will see their routes and tasks in the mobile application.

      After confirming the plan, you can replan the route, for example, exclude tasks or add agents.

Replanning the route​

You can replan routes in plans with the Calculated, Scheduled, and In progress statuses:

  • add or remove tasks from the plan
  • add or remove agents from the plan
  • unassign tasks from agents
  • select another route optimization method

You can remove tasks from the plan or unassign them from agents only if the trip has not started. If a trip is linked to another trip (for example, shipment for a point in the second trip is picked up during the first trip), you cannot edit either trip after the route plan starts.

You can either edit the current version of the plan or create a new one. Once a version is confirmed, the other versions are deleted. After a route is replanned, agents receive a notification in the mobile application that the route has changed, along with the list of new tasks.

Simultaneous replanning

Multiple users cannot replan the same route at a time. If another user is editing the route, you will see a notification that the change is unavailable. Editing is locked for 10 minutes. The lock period is automatically extended by any action on the plan (for example, adding or removing a task) or manually.

To replan a route:

  1. Go to the Routes tab.

  2. Open the plan page.

  3. Click Change route plan.

  4. Apply changes to the plan:

    Replanning a route

    • To add agents, click + Agent and select the checkboxes next to agents or groups. You can search for agents by identifier, filter them by agent type (template) and skills. To hide agents that cannot be added to the plan, enable the Hide unavailable option. Click Add.
    • To add tasks, click + Task and select the checkboxes next to tasks. You can search for tasks by name, filter them by type (template), by date and time of execution, depot, skills, and date of update. To hide tasks that cannot be added to the plan, enable the Hide unavailable option. Click Add.
    • To unassign a task from an agent, in the task list, click Task menu icon next to the task and select Unassign. The task will be moved to the task list in the Not assigned panel and will be assigned to another or the same agent when the route is recalculated.
    • To remove a task from the plan, in the task list, click Task menu icon next to the task and select Remove from route. The task will be removed from the plan.
    • To remove an agent from the plan, in the agent list, click Agent menu icon next to the agent and select Remove agent from route. The agent will be removed from the plan. Uncompleted tasks of the agent will be moved to the task list in the Not assigned panel and will be assigned to other agents when the route is recalculated.
  5. To recalculate the route, click Recalculate plan. If you want to reset the changes made and return to the previous version of the plan, click Reset changes.

  6. If the plan has the Calculated or Scheduled status, in the dialog:

    1. Select the route optimization method:

      • Shortest in time according to traffic data: shortest in time using statistical traffic data.
      • Shortest in time according to current traffic: shortest in time considering the current traffic data.
      • Shortest in distance: shortest in distance without considering traffic data.
    2. Specify whether to create a new plan version.

      Versions are created automatically for plans with the In progress status and for plans with the Scheduled status for which only one version has been created.

  7. Click Calculate route.

  8. To confirm the plan version, select it and click Confirm selected route. Agents will see new routes and tasks in the mobile application.

Replanning the route by agent​

In the mobile application, an agent can change a route plan: cancel a task or reschedule it to another time or another day. In this case, the Changes history tab appears on the route plan page in the administrator web panel. For details, see the Viewing plan information section.

Available actions depend on the status of the trip to which the task belongs:

  • If the trip has not started, the agent can cancel a task and reschedule it to another time or another day. When changes are applied, the route plan is recalculated. If an error occurs during recalculation, the agent can retry it or exclude the task from the plan without recalculation.
  • If the trip has started, the agent cannot reschedule a task to another time on the same day but can cancel the task or reschedule it to another day. In this case, the route plan is not recalculated.

Editing a plan​

You can edit plans with the Draft and Not calculated statuses:

  • change transport type and route optimization method
  • add or remove tasks from the plan
  • add or remove agents from the plan

For plans with the Draft status, you can change the name and date.

To edit a plan:

  1. Go to the Routes tab.

  2. Open the plan page.

  3. Apply changes to the plan.

    Editing a plan

  4. Finish planning.

    To calculate the route:

    1. Click Calculate route. The plan will have the Calculated status.

    2. Review the plan.

    3. To confirm the plan, click Confirm route. The plan will have the Scheduled status. Agents will see their routes and tasks in the mobile application.

      After confirming the plan, you can replan the route, for example, exclude tasks or add agents.

Viewing plan information​

Viewing a plan

  1. Go to the Routes tab. The list displays plans with available statuses:

    • Draft: plan is created but not calculated.
    • Calculating: plan is being calculated.
    • Calculated: plan is calculated but not confirmed by an administrator. To make tasks available to agents in the mobile application, confirm the plan.
    • Scheduled: plan is confirmed by an administrator, but agents have not started work yet.
    • In progress: at least one task in the plan is in progress.
    • Completed: all tasks in the plan are completed.
    • Not calculated: plan could not be calculated. To retry, click Repeat or Edit parameters.
    • Error: error occurred during plan calculation.
  2. Open the plan page. You can search plans by name and filter them by date and status: active and completed.

Plan page​

For plans with the Calculated, Scheduled, In progress, and Completed statuses, the page displays:

  • Plan name.

  • Plan execution date.

  • Plan status.

  • Date when the plan was confirmed (for the Scheduled and In progress statuses).

  • Name of the user who confirmed the plan (for the Scheduled and In progress statuses).

  • Route optimization method (for the Calculated, Scheduled, and In progress statuses).

  • Tasks:

    • Total: total number of tasks in the plan.
    • Not assigned: number of tasks not assigned to agents (for the Calculated and Scheduled statuses).
    • Completed: number of tasks completed by agents (for the In progress and Completed statuses).
    • Canceled: number of tasks canceled by an administrator or agents (for the In progress and Completed statuses).
  • Resources:

    • Agents: number of agents assigned to plan tasks.
    • Trips: number of trips in the plan. A trip is part of an agent’s route from the depot to the ending point or to the next depot visit (whichever comes first).
  • Time:

    • Total: estimated total completion time.
    • Average: estimated average completion time across all agents.
  • Mileage:

    • Total: estimated total distance for all agents.
    • Average: estimated average distance per agent.
  • List of agents assigned to plan tasks. For each agent, the page displays:

    • Estimated completion time of tasks.

    • Estimated distance.

    • Load percentage. If an agent has two or more trips, a range is shown (minimum and maximum load across trips). For more information on calculating load, see the Creating an agent template section.

    • Task indicators:

      • X: total number of agent tasks in the plan (for the Calculated and Scheduled statuses).
      • X of Y: number of completed tasks out of the total number of agent tasks in the plan (for the In progress and Completed statuses).
      • Cross icon: number of tasks canceled by an administrator or an agent.
      • Exclamation mark icon: number of tasks excluded from the route plan during route recalculation initiated by an agent.
      • Calendar icon: number of tasks rescheduled by an agent to another day.
    • List of trips if an agent has two or more trips. For each trip, the page displays:

      • Color indicator of the trip on the map.
      • Number of tasks in the trip.
      • Estimated completion time of tasks.
      • Estimated distance.
    • List of tasks. For each task, the page displays:

      • Estimated arrival time at the depot or point.
      • Task name. For depots, the Loading name is displayed.
      • Address of a depot or point.
      • Task time window. If a hard window is selected, the ! icon is shown.
      • Shipment details and skills (if specified in the task template).
  • Changes history: list of agent requests for route replanning (for the In progress status).

On the map​

For plans with the Calculated, Scheduled, In progress, and Completed statuses, the map displays:

  • Depot icons with names and estimated arrival times of agents (service start times).

  • Trip routes for each agent, including visit order, task names, and estimated arrival times. If an agent has multiple trips, they are shown in different colors.

  • Task indicators:

    • Cross icon: task canceled by an administrator or an agent.
    • Exclamation mark icon: task is excluded from the route plan during route recalculation initiated by an agent.
    • Calendar icon: task rescheduled by an agent to another day.

Downloading a plan​

You can download a plan in the XLSX or JSON formats.

  1. Go to the Routes tab.
  2. Open the plan page.
  3. Click Plan menu icon and select Download as XLSX or Download as JSON.

Deleting a plan​

warning

You cannot restore a deleted plan.

You can delete a plan with any status except the In progress status.

  1. Go to the Routes tab.
  2. In the plan row, click Plan menu icon and select Delete.
  3. Confirm the deletion.