Skip to main content

Logistics API Settings

The simulation.data.logistics_api_settings object allows you to fine-tune the optimization process when running simulations using the Stateful API. These settings control various aspects of the solver, model constraints, and calculation behavior.

General Settings

These settings are applied directly to the logistics simulation configuration.

ParameterTypeDescriptionDefault
pipeline_typestringDefines the calculation pipeline. simple_one_stage: Single stateless API call. two_stages: Estimation followed by precise calculation.-
first_solution_strategiesarrayA list of first solution strategies (integers) to be used concurrently to execute the optimization run.-
only_pdpbooleanIf true, uses only Pickup and Delivery Problem (PDP) mode. If false, defaults to CVRPTW.-
trip_costnumberCost assigned to each trip.-
max_pickup_slackintegerMaximum allowed slack time for pickup nodes (in seconds).-
max_dropoff_slackintegerMaximum allowed slack time for dropoff nodes (in seconds).-
use_path_equalizerbooleanEnables the Path Equalizer to distribute assignments more evenly across vehicles.-
path_equalizer_weightintegerWeight for the path equalizer objective.-
average_travel_duration_to_nodeintegerEstimated average travel duration to a node (in seconds).-
allow_upload_after_simulation_start_timebooleanIf true, allows booking updates (e.g., live insertions) after the simulation has started.false
should_set_max_slack_start_location_zerobooleanWhether to set the maximum slack of the start location to zero.-
is_pickup_end_of_tripbooleanIf true, treats pickup nodes as the end of a trip (for trip counting constraints).-
is_dropoff_end_of_tripbooleanIf true, treats dropoff nodes as the end of a trip (for trip counting constraints).-
stateless_api_serverstringURL of a custom stateless API server to use for the simulation.-
should_lock_next_stop_if_vehicle_livebooleanLocks the upcoming stop for live vehicles to prevent driver confusion during re-optimization.true
should_optimize_fail_to_board_bookingsbooleanIf true, includes failed-to-pickup orders in the optimization attempt.true
truckban_enabledbooleanEnables or disables truck ban constraints.-
truckban_buffer_time_windowsintegerBuffer time (in seconds) when adjusting time windows for truck bans.-
slack_costnumberCost applied to slack time for all nodes.-
logistics_optimize_slackbooleanIf true, the solver optimizes for slack in logistics mode.-
path_constraints_modestringMode for path constraints.-
node_grouping_enabledbooleanActivates node grouping logic.-
clear_cumulative_limitationsbooleanClears cumulative limitations if set to true.-
manual_edit_api_minimize_slackbooleanTries to minimize slack during manual edit API operations.-
manual_edit_allow_vehicle_latebooleanAllows vehicles to be late during manual edits.true
manual_edit_lateness_penalty_coefficientintegerPenalty coefficient for lateness in manual edits.10
cvb_fleetmin_time_limitintegerTime limit for CVB fleet minimization.-
cvb_fleetmin_solutions_limitintegerSolution limit for CVB fleet minimization.-
cvb_fleetmin_iterations_limitintegerIteration limit for CVB fleet minimization.-
use_cvb_local_search_operatorbooleanUses CVB local search operator.-
cvb_local_search_iterations_limitintegerIteration limit for CVB local search.-
geofence_definition_strategyobjectStrategy for defining geofences.-
geofence_vehicle_allocation_strategyobjectStrategy for allocating vehicles to geofences (STRICT or FLEXIBLE).-
stateless_api_loginstringLogin for custom stateless API server.-
stateless_api_passwordstringPassword for custom stateless API server.-
truckban_strategyobjectStrategy for handling truck bans.-
booking_order_prioritizationobjectConfiguration for booking order prioritization.-
node_grouping_capacity_strategyobjectStrategy for node grouping capacity requirements.-
manual_edit_api_vehicle_logistics_optimize_slackbooleanWhether manual edit API should optimize slack.-
manual_edit_api_use_vehicle_start_timebooleanUses vehicle start time for manual edits.-
manual_edit_api_solver_kindstringSolver kind for manual edit API (default: LOCAL).LOCAL
manual_edit_finalization_type_pickupsstringFinalization type for pickup nodes in manual edits.-
manual_edit_finalization_type_dropoffsstringFinalization type for dropoff nodes in manual edits.-
manual_edit_max_possible_latenessintegerMaximum possible lateness for manual edits.-
manual_edit_optimize_quantitystringOptimization quantity for manual edits.-
manual_edit_slack_cost_factornumberSlack cost factor for manual edits.-
manual_edit_allow_cvrptw_conversionbooleanEnables CVRPTW mode and order grouping during manual edits in the simulation. When active, manual planning actions trigger an optimization check for CVRPTW feasibility (same pickup locations and time windows). If feasible, multiple orders are converted into a single node. Similarly, drop-offs at the same location with overlapping time windows are consolidated into a single action (ignoring capacity constraints).This streamlines manual planning by ensuring trips have a single pickup and consolidated drop-offs, visiting each location only once per trip.false
manual_edit_try_strict_time_windows_requestbooleanTries to strictly enforce time windows during manual edits before loosening timewindows constraints. SHould be used in a combination with manual_edit_allow_vehicle_late set to truefalse
route_cost_modification_primaryobjectRoute cost modification for primary routing engine.-
route_cost_modification_secondaryobjectRoute cost modification for secondary routing engine.-
finalization_type_pickupsstringOverrides default finalization type for pickups. Can be min or maxmin
finalization_type_dropoffsstringOverrides default finalization type for dropoffs. Can be min or maxmin

Solver Parameters

These parameters control the underlying VRP solver's behavior. They are typically used by experts to tune performance.

ParameterTypeDescriptionDefault
algorithmstringSolver algorithm: static (default) or dynamic (for real-time/on-demand).static
first_solution_strategyintegerStrategy used to find the initial solution.0
solution_limitnumberMaximum number of solutions to generate during the search.10000000
time_limit_msnumberMaximum time allowed for the search (in milliseconds).10000000
use_local_search_metaheuristicbooleanEnables local search metaheuristics.false
guided_local_search_lambda_coefficientnumberParameter for the guided local search procedure.0.1
use_tsp_optbooleanEnables Traveling Salesperson Problem (TSP) optimization.false
log_searchbooleanEnables search logging.false
lns_time_limit_msnumberTime limit for Large Neighborhood Search (LNS) completion search.1000
savings_neighbors_rationumberRatio for savings neighbors.0
waypoints_optimization_second_phasebooleanEnables a second phase of waypoint optimization for prebook mode.false
optimization_stepnumberMinimum improvement step for local search.1
use_all_local_search_operatorsbooleanUses all available local search operators.false
use_depth_first_searchbooleanUses depth-first search instead of local search.false
auto_calculate_time_limit_enabledbooleanEnable or disable auto calculation of solver time limit.null
auto_calculate_time_limit_paramsobjectParameters for auto calculation of solver time limit. See Auto Calculation Solver Time for details.null

Model Parameters

These parameters define the general metadata and constraints of the simulation model.

ParameterTypeDescriptionDefault
vehicle_costsnumberCost per vehicle. High costs can discourage using additional vehicles.0
booking_penaltynumberPenalty for dropping a visit (unserved booking). Added to the objective function.10000
mixed_fleetbooleanSet to true if vehicles use different routing profiles.false
use_walking_time_to_reduce_time_windowsbooleanUses walking time to adjust time windows.false
time_dependent_transitbooleanIf true, optimization goal is always total_distance.false
optimize_quantitystringOptimization goal: total_time (default) or total_distance.total_time
max_slacknumberMaximum allowed slack in seconds.null
use_lifo_order_checkbooleanEnables LIFO (Last-In-First-Out) order constraints.false
lifo_order_check_on_all_vehiclesbooleanApplies LIFO check to all vehicles.true
group_crossing_penaltynumberPenalty for crossing non-strictly exclusive groups.-
strictly_exclusive_groupsarrayList of groups that cannot be mixed on the same vehicle.-
mutually_exclusive_groupsarrayList of group pairs that are mutually exclusive (soft or hard constraint).-
compound_zonesarrayDefinitions for zones with entry/exit time penalties.-
cumulative_limitationsarrayLimits on the number of vehicles serviced simultaneously at a depot.-
route_compactnessobjectSettings to enforce route compactness using a polylinear cost model.-
vehicle_amortized_linear_cost_factorintegerLinear part of amortized default vehicle cost.-
vehicle_amortized_quadratic_cost_factorintegerQuadratic part of amortized default vehicle cost.-
groups_orderobjectDictionary defining the order/priority of groups.-

Calculation Parameters

These parameters control how the calculation is executed and how constraints are handled.

ParameterTypeDescriptionDefault
scheduling_modestringprebook (PDP) or prebook_cvrptw (CVRPTW). CVRPTW is for single pickup/DC scenarios.-
calculations_modestringsync (return result immediately) or async (return job ID).-
use_vehicles_nodesbooleanEnables or disables the use of nodes representing vehicles.-
allow_vehicle_latebooleanRelaxes time constraints to allow late arrivals for better routes.false
vehicle_late_penalty_coefficientintegerPenalty weight for lateness when allow_vehicle_late is true.-
max_possible_latenessintegerMaximum allowed lateness in seconds.null
dropoff_earlierbooleanIf true, tries to schedule drop-offs earlier to avoid loops.false
pickup_laterbooleanIf true, tries to schedule pickups later to avoid loops.false