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 plan, the total length of roads, 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 distributed tasks is selected.
  2. If the number of distributed 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
  • cargo 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 and taking into account all constraints.

In some cases, the algorithm may distribute not 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 during the process of 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 solution).

To create a plan:

  1. Go to the Routes tab.

  2. Click Add route.

  3. Specify the required plan settings:

    • 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.

    • Transport: type of transport used in the plan's tasks: Car, Truck, Scooter, Bicycle, On foot. The type must match the transport type specified for the agents.

    • Route optimization: parameter for optimizing the route to pass the 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 a task template.

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

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

    5. 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: 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: date of the task execution. Must match the date specified in the plan.
        • Time: time interval in which the task must be completed.
        • Time zone: time zone in which the time 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 than the specified time.
      • Depot: depot from which the agent must pick up the cargo:

        • 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.

    6. Specify other attributes, which depend on the task template.

    7. Click Save.

    8. 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: unique identifier, 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 cargo. For more information on attributes, see the Creating a task template section.

      Selecting tasks

    9. 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 an agent template.

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

    4. Specify 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 solution along with 2GIS 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, which depend on the agent template.

    6. Specify the agent work schedule:

      • 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.

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

      Selecting agents

    9. Click Add.

  6. Finish planning:

    • To save the plan as a draft, click Save draft. You can return to the plan later: change the settings and recalculate the route.
    • To calculate the route, click Calculate route. Tasks that cannot be assigned to the route will be displayed in the Not assigned panel. You can remove tasks from the plan or edit the plan by changing route settings, tasks, and agents.
  7. Review the route plan on the map:

    • If everything is correct, click Confirm route. The plan will be confirmed, and agents will see their routes and tasks in the mobile application. The plan cannot be edited after confirmation.
    • If you need to change the plan (for example, add other tasks or agents), add a plan version.

Adding a plan version

For plans with the Calculated status, you can create another version of the plan: change settings, add or remove tasks and agents. A new version of the plan with a new route will be created. After confirming one version, the others will be deleted.

Maximum number of plan versions is 5.

To add a plan version:

  1. Go to the Routes tab.
  2. Open the plan page.
  3. Click Add version.
  4. Apply changes to the plan.
  5. Click Calculate route.

To confirm the new version of the plan, click Confirm route.

Editing a plan

You can edit a plan with the Draft and Not calculated statuses.

  1. Go to the Routes tab.
  2. In the plan menu, click Plan menu icon and select Edit.
  3. Apply changes to the plan.
  4. Click Calculate route.

Viewing plan information

  1. Go to the Routes tab.
  2. Open the plan page. You can search plans by name and filter them by date and plan status: active and completed.

The plan page displays the map with the route and the following data:

  • Name: plan name.

  • Date: date of plan execution.

  • Status: plan status:

    • Draft: plan is created but not confirmed by the administrator. You can edit the plan. To display plan tasks and routes in the mobile application for agents, confirm the plan.
    • Calculating: route is being calculated.
    • Calculated: route is calculated, tasks are distributed along the route.
    • Scheduled: plan is confirmed by the administrator, but agents have not started work yet.
    • In progress: at least one plan task is being worked on by an agent (the agent has taken the task in the mobile application).
    • Not calculated: route could not be calculated. In this case, you can edit the plan and change the route parameters.
    • Error: error occurred while creating the plan.
    • Completed: all tasks in the plan are completed by agents.
  • Tasks:

    • Total: total number of tasks in the plan.
    • Unassigned: number of tasks that could not be assigned to the route.
  • Resources:

    • Agents: number of agents assigned to the plan tasks.
    • Trips: number of trips in the plan.
  • Time:

    • Total: total time to complete the plan.
    • Average: average time to complete the plan for all agents.
  • Mileage:

    • Total: total mileage of all agents in the plan.
    • Average: average mileage per agent in the plan.
  • Agents: list of agents assigned to the plan tasks. For each agent, the following information is displayed:

    • Completion time.

    • Mileage.

    • Load percentage. If an agent has 2 or more trips within a route plan, the load range is displayed: the minimum and the maximum load percentage in trips. For more information on calculating load, see the Creating an agent template section.

    • Depot.

    • List of tasks the agent must complete within the plan. For each task, the following information is displayed:

      • estimated arrival time
      • point address
      • time window within which the task must be completed

      To view detailed information about the task, click it on the map.

Deleting a plan

warning

You cannot restore a deleted plan.

You can only delete plans with the Draft status.

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