Skip to main content

Model parameters

General metadata parameters describing the simulation, including predefined settings for groups, compound zones, cumulative limitations, etc., that will need to be configured for respective nodes (vehicles or bookings).

vehicle_costsnumber

cost of each vehicle. In scenarios where trips take much longer than 2.78 hours (10000 s) or 10 km (10000 m), vehicle cost of 10000 might lead to higher number of vehicles used (as the cost of initiating additional vehicle is cheaper than using the existing ones).

Default value: 0
vehicle_amortized_linear_cost_factorinteger | nullnullable

Amortized default vehicle cost (linear part)

Default value: null
vehicle_amortized_quadratic_cost_factorinteger | nullnullable

Amortized default vehicle cost (quadratic part)

Default value: null
booking_penaltynumber

The penalty refers to a cost associated with dropping visits to certain locations. In vehicle routing problems, penalties are used to make a trade-off between visiting every location and minimizing overall costs (such as distance or time). If visiting a location is not feasible, a penalty is incurred instead. This allows the solver to skip visits to some locations, especially when visiting them would lead to excessive costs or infeasibility, while still returning a valid solution. This penalty is added to the total objective function and helps guide the solver in making decisions about which locations to skip.

Default value: 10000
mixed_fleetboolean

Only set to true if vehicles are using different routing profile.

Default value: false
use_walking_time_to_reduce_time_windowsboolean

Flag that enables the use of walking time in time window reduction.

Default value: false
time_dependent_transitboolean

If true then optimization goal is always total_distance regardless of the value passed in optimization_quantity.

Default value: false
optimize_quantitystring

Defines the optimization goal. Possible values: total_time - optimize the total time of all routes, and total_distance - optimize the total distance of all routes.

Possible values: [total_time, total_distance]

Default value: total_time
max_slacknumber | nullnullable

Maximum slack in seconds or null if no limitation required.

Default value: null
use_lifo_order_checkboolean

Flag that enables LIFO order check for the nodes of this booking. Used only if use_lifo_order_check is set for the model.

Default value: false
lifo_order_check_on_all_vehiclesboolean

Flag that enables LIFO order checking on all vehicles in the model.

Default value: true
mutually_exclusive_groupsarray[]

List of mutually-exclusive group relations. Group names are set in the group field for bookings and nodes. Each item in the list should be a list of string group names whose bookings (or nodes) cannot be on the same vehicle at the same time. For example, [["group1", "group2"], ["group2", "group3"]] prohibits bookings with groups group1 and group2, as well as group2 and group3, from being transferred in the same vehicle at the same time, but allows simultaneous transfer of bookings with groups group1 and group3. If strictly_exclusive_groups are not set, then this constraint is soft, and its weight is based on the group_crossing_penalty value. To achieve a hard constraint, strictly_exclusive_groups should have a list of such groups. Some groups can have a hard constraint while others have a soft constraint at the same time.

strictly_exclusive_groupsstring[]

List of groups that cannot, under any circumstances, be crossed with other groups. Default: All groups are strictly-exclusive.

group_crossing_penaltynumber

Penalty for crossing non-strictly exclusive groups.

compound_zones object[]

This list contains zones where entering or exiting may require additional time. Compound zone parameters will be applied to nodes belonging to the groups specified in this list, and the compound zone time will be added to the total travel time for those nodes. This allows for optimization against nodes with shorter enter/exit times and supports scenarios with fixed, required docking times.

  • Array [
  • groupsstring[]

    A list of groups that belong to the zone.

    node_uidsstring<uuid>

    Represents and validates UUID string

    enter_timeinteger

    Time in seconds required to enter the zone

    Default value: 0
    exit_timeinteger

    Time in seconds required to exit the zone

    Default value: 0
  • ]
  • cumulative_limitations object[]

    Contains a list describing limitations on the number of cumulative vehicles at the starting depot. This option is used to limit the number of vehicles that can be serviced simultaneously at the same depot, as well as to manage how vehicles are serviced at the depot.

    For this option to work properly, every vehicle should have no more than one node of type vehicle_position, bound as a partial route. This node is a placeholder for the pickup event. If the partial_route contains other nodes, the vehicle_position node must be the last in the list. The list of nodes_uids should hold the UIDs of these pickup nodes. The scheduler will split pickup time intervals into service intervals, each with a duration of depot_service_time. After this, the scheduler will remove the initial pickup nodes and instead insert pickup nodes, one per vehicle, for every service interval.

    Options group and node_uids can be used together in the same cumulative limitation instance.

  • Array [
  • groupstring,null[]

    Nodes belonging to this group will be included in the list identifying the pickup location.

    node_uidsstring<uuid>[]

    List of node UIDs identifying the pickup location.

    depot_service_timenumber

    Time in seconds to service a vehicle in the nodes defined in this object.

    max_cumulative_vehiclesinteger

    Number of vehicles that can be served at these pickup nodes at the same time.

  • ]
  • groups_order object

    Order of groups. A dictionary that should contain group names mapped to an integer sequence number for this group.

    Node ordering depends on their assigned groups and the groups_order configuration:

    1. Nodes with groups in groups_order: These nodes are sorted by their priority values. Higher priority values appear earlier.
    2. Nodes without groups in groups_order: These nodes have the lowest priority and appear after all nodes in point 1.
    3. Nodes with groups in groups_order but with None priority: The order of these nodes is undefined, and they may appear anywhere in the sequence.
    property name*integer
    route_compactness object

    Route compactness is achieved by employing a polylinear model that adds a cost (either time or distance, depending on the optimization goal) to vehicle travel to the nodes. This model penalizes longer travel, thereby promoting more compact routes. Integrated into the total cost function as a soft constraint, this mechanism automatically increases route compactness, balancing it against other optimization penalties.

    matrix_typestring

    Specifies whether to use distance or time. This value does not need to match the optimize_quantity in the payload.

    Possible values: [distance, time]

    ignore_firstboolean

    If true, no penalty is applied to the trip from partial_route to the first subsequent node. Note that penalties are always ignored for internal trips within a multi-node partial_route.

    Default value: true
    ignore_lastboolean

    If true, no penalty is applied to the trip from the last node to partial_route_end. Note that penalties are always ignored for internal trips within a multi-node partial_route.

    Default value: true
    thresholdnumber

    Defines the threshold for applying the penalty. Its units match those of the matrix_type matrix (typically meters for distance, seconds for time).

    relationstring

    Determines if the penalty applies to values above or below the threshold.

    Possible values: [greater, less]

    penalty object
    basenumber

    A number whose units match those of the matrix_type matrix.

    Default value: 0
    ratenumber

    The penalty rate per unit from the matrix_type matrix.

    Default value: 0
    Model parameters
    {
    "vehicle_costs": 0,
    "vehicle_amortized_linear_cost_factor": null,
    "vehicle_amortized_quadratic_cost_factor": null,
    "booking_penalty": 10000,
    "mixed_fleet": false,
    "use_walking_time_to_reduce_time_windows": false,
    "time_dependent_transit": false,
    "optimize_quantity": "total_time",
    "max_slack": null,
    "use_lifo_order_check": false,
    "lifo_order_check_on_all_vehicles": true,
    "mutually_exclusive_groups": [
    "string"
    ],
    "strictly_exclusive_groups": [
    "string"
    ],
    "group_crossing_penalty": 0,
    "compound_zones": [
    {
    "groups": [
    "string"
    ],
    "node_uids": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "enter_time": 0,
    "exit_time": 0
    }
    ],
    "cumulative_limitations": [
    {
    "group": [
    null
    ],
    "node_uids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ],
    "depot_service_time": 0,
    "max_cumulative_vehicles": 0
    }
    ],
    "groups_order": {},
    "route_compactness": {
    "matrix_type": "distance",
    "ignore_first": true,
    "ignore_last": true,
    "threshold": 0,
    "relation": "greater",
    "penalty": {
    "base": 0,
    "rate": 0
    }
    }
    }