Skip to content

Options

Info

If both an environment variable and its corresponding CLI flag are defined, the CLI flag will overwrite the environment variable.

Go

These are the default options that are available with the go-nextroute community app and the Nextmv routing app.

Nextmv Hybrid Optimization Platform
Usage:
  -check.duration duration
        maximum duration of the check (env CHECK_DURATION) (default 30s)
  -check.verbosity string
        {off, low, medium, high} verbosity of the check (env CHECK_VERBOSITY) (default "off")
  -format.disable.progression
        disable the progression series (env FORMAT_DISABLE_PROGRESSION)
  -model.constraints.disable.attributes
        ignore the compatibility attributes constraint (env MODEL_CONSTRAINTS_DISABLE_ATTRIBUTES)
  -model.constraints.disable.capacities value
        ignore the capacity constraint for the given resource names (env MODEL_CONSTRAINTS_DISABLE_CAPACITIES)
  -model.constraints.disable.capacity
        ignore the capacity constraint for all resources (env MODEL_CONSTRAINTS_DISABLE_CAPACITY)
  -model.constraints.disable.distancelimit
        ignore the distance limit constraint (env MODEL_CONSTRAINTS_DISABLE_DISTANCE_LIMIT)
  -model.constraints.disable.groups
        ignore the groups constraint (env MODEL_CONSTRAINTS_DISABLE_GROUPS)
  -model.constraints.disable.maximumduration
        ignore the maximum duration constraint (env MODEL_CONSTRAINTS_DISABLE_MAXIMUM_DURATION)
  -model.constraints.disable.maximumstops
        ignore the maximum stops constraint (env MODEL_CONSTRAINTS_DISABLE_MAXIMUM_STOPS)
  -model.constraints.disable.maximumwaitstop
        ignore the maximum stop wait constraint (env MODEL_CONSTRAINTS_DISABLE_MAXIMUM_WAIT_STOP)
  -model.constraints.disable.maximumwaitvehicle
        ignore the maximum vehicle wait constraint (env MODEL_CONSTRAINTS_DISABLE_MAXIMUM_WAIT_VEHICLE)
  -model.constraints.disable.mixingitems
        ignore the do not mix items constraint (env MODEL_CONSTRAINTS_DISABLE_MIXING_ITEMS)
  -model.constraints.disable.precedence
        ignore the precedence (pickups & deliveries) constraint (env MODEL_CONSTRAINTS_DISABLE_PRECEDENCE)
  -model.constraints.disable.starttimewindows
        ignore the start time windows constraint (env MODEL_CONSTRAINTS_DISABLE_START_TIME_WINDOWS)
  -model.constraints.disable.vehicleendtime
        ignore the vehicle end time constraint (env MODEL_CONSTRAINTS_DISABLE_VEHICLE_END_TIME)
  -model.constraints.disable.vehiclestarttime
        ignore the vehicle start time constraint (env MODEL_CONSTRAINTS_DISABLE_VEHICLE_START_TIME)
  -model.constraints.enable.cluster
        enable the cluster constraint (env MODEL_CONSTRAINTS_ENABLE_CLUSTER)
  -model.objectives.capacities string
        capacity objective, provide triple for each resource 'name=default;factor=1.0;offset=0.0' (env MODEL_OBJECTIVES_CAPACITIES)
  -model.objectives.cluster float
        factor to weigh the cluster objective (env MODEL_OBJECTIVES_CLUSTER)
  -model.objectives.distance float
        factor to weigh the travel distance objective (env MODEL_OBJECTIVES_DISTANCE)
  -model.objectives.earlyarrivalpenalty float
        factor to weigh the early arrival objective (env MODEL_OBJECTIVES_EARLY_ARRIVAL_PENALTY) (default 1)
  -model.objectives.latearrivalpenalty float
        factor to weigh the late arrival objective (env MODEL_OBJECTIVES_LATE_ARRIVAL_PENALTY) (default 1)
  -model.objectives.minstops float
        factor to weigh the min stops objective (env MODEL_OBJECTIVES_MIN_STOPS) (default 1)
  -model.objectives.stopbalance float
        factor to weigh the stop balance objective (env MODEL_OBJECTIVES_STOP_BALANCE)
  -model.objectives.travelduration float
        factor to weigh the travel duration objective (env MODEL_OBJECTIVES_TRAVEL_DURATION)
  -model.objectives.unplannedpenalty float
        factor to weigh the unplanned objective (env MODEL_OBJECTIVES_UNPLANNED_PENALTY) (default 1)
  -model.objectives.vehicleactivationpenalty float
        factor to weigh the vehicle activation objective (env MODEL_OBJECTIVES_VEHICLE_ACTIVATION_PENALTY) (default 1)
  -model.objectives.vehiclesduration float
        factor to weigh the vehicles duration objective (env MODEL_OBJECTIVES_VEHICLES_DURATION) (default 1)
  -model.properties.disable.durationgroups
        ignore the durations groups of stops (env MODEL_PROPERTIES_DISABLE_DURATION_GROUPS)
  -model.properties.disable.durations
        ignore the durations of stops (env MODEL_PROPERTIES_DISABLE_DURATIONS)
  -model.properties.disable.initialsolution
        ignore the initial solution (env MODEL_PROPERTIES_DISABLE_INITIAL_SOLUTION)
  -model.properties.disable.stopdurationmultipliers
        ignore the stop duration multipliers defined on vehicles (env MODEL_PROPERTIES_DISABLE_STOP_DURATION_MULTIPLIERS)
  -model.properties.maximumtimehorizon int
        maximum time horizon for the model in seconds (env MODEL_PROPERTIES_MAXIMUM_TIME_HORIZON) (default 15552000)
  -model.validate.disable.resources
        disable the resources validation (env MODEL_VALIDATE_DISABLE_RESOURCES)
  -model.validate.disable.starttime
        disable the start time validation (env MODEL_VALIDATE_DISABLE_START_TIME)
  -model.validate.enable.matrix
        enable matrix validation (env MODEL_VALIDATE_ENABLE_MATRIX)
  -model.validate.enable.matrixasymmetrytolerance int
        percentage of acceptable matrix asymmetry, requires matrix validation enabled (env MODEL_VALIDATE_ENABLE_MATRIX_ASYMMETRY_TOLERANCE) (default 20)
  -runner.input.path string
        The input file path (env RUNNER_INPUT_PATH)
  -runner.output.path string
        The output file path (env RUNNER_OUTPUT_PATH)
  -runner.output.solutions string
        {all, last} (env RUNNER_OUTPUT_SOLUTIONS) (default "last")
  -runner.profile.cpu string
        The CPU profile file path (env RUNNER_PROFILE_CPU)
  -runner.profile.memory string
        The memory profile file path (env RUNNER_PROFILE_MEMORY)
  -solve.duration duration
        maximum duration of the solver (env SOLVE_DURATION) (default 5s)
  -solve.iterations int
        maximum number of iterations, -1 assumes no limit; iterations are counted after start solutions are generated (env SOLVE_ITERATIONS) (default -1)
  -solve.parallelruns int
        maximum number of parallel runs, -1 results in using all available resources (env SOLVE_PARALLEL_RUNS) (default -1)
  -solve.plateau.absolutethreshold float
        absolute threshold for significant improvement (env SOLVE_PLATEAU_ABSOLUTE_THRESHOLD) (default -1)
  -solve.plateau.delay duration
        delay before plateau detection starts (env SOLVE_PLATEAU_DELAY)
  -solve.plateau.duration duration
        maximum duration without (significant) improvement (env SOLVE_PLATEAU_DURATION)
  -solve.plateau.iterations int
        maximum number of iterations without (significant) improvement (env SOLVE_PLATEAU_ITERATIONS)
  -solve.plateau.relativethreshold float
        relative threshold for significant improvement (env SOLVE_PLATEAU_RELATIVE_THRESHOLD)
  -solve.rundeterministically
        run the parallel solver deterministically (env SOLVE_RUN_DETERMINISTICALLY)
  -solve.solver.plangroupsize.delta int
        delta (env SOLVE_SOLVER_PLAN_GROUP_SIZE_DELTA)
  -solve.solver.plangroupsize.deltaafteriterations int
        delta after each iterations (env SOLVE_SOLVER_PLAN_GROUP_SIZE_DELTA_AFTER_ITERATIONS) (default 1000000000)
  -solve.solver.plangroupsize.maxvalue int
        max value of parameter (env SOLVE_SOLVER_PLAN_GROUP_SIZE_MAX_VALUE) (default 2)
  -solve.solver.plangroupsize.minvalue int
        min value of parameter (env SOLVE_SOLVER_PLAN_GROUP_SIZE_MIN_VALUE) (default 2)
  -solve.solver.plangroupsize.snapbackafterimprovement
        snap back to start value after improvement of best solution (env SOLVE_SOLVER_PLAN_GROUP_SIZE_SNAP_BACK_AFTER_IMPROVEMENT) (default true)
  -solve.solver.plangroupsize.startvalue int
        start value (env SOLVE_SOLVER_PLAN_GROUP_SIZE_START_VALUE) (default 2)
  -solve.solver.plangroupsize.zigzag
        zigzag between min and max value like a jig saw (env SOLVE_SOLVER_PLAN_GROUP_SIZE_ZIGZAG) (default true)
  -solve.solver.unplanunits.delta int
        delta (env SOLVE_SOLVER_UNPLAN_UNITS_DELTA) (default 2)
  -solve.solver.unplanunits.deltaafteriterations int
        delta after each iterations (env SOLVE_SOLVER_UNPLAN_UNITS_DELTA_AFTER_ITERATIONS) (default 125)
  -solve.solver.unplanunits.maxvalue int
        max value of parameter (env SOLVE_SOLVER_UNPLAN_UNITS_MAX_VALUE) (default -1)
  -solve.solver.unplanunits.minvalue int
        min value of parameter (env SOLVE_SOLVER_UNPLAN_UNITS_MIN_VALUE) (default 2)
  -solve.solver.unplanunits.snapbackafterimprovement
        snap back to start value after improvement of best solution (env SOLVE_SOLVER_UNPLAN_UNITS_SNAP_BACK_AFTER_IMPROVEMENT) (default true)
  -solve.solver.unplanunits.startvalue int
        start value (env SOLVE_SOLVER_UNPLAN_UNITS_START_VALUE) (default 2)
  -solve.solver.unplanunits.zigzag
        zigzag between min and max value like a jig saw (env SOLVE_SOLVER_UNPLAN_UNITS_ZIGZAG) (default true)
  -solve.solver.unplanweights string
        unplan heuristic weights parameter, e.g.: Vehicle:3,Island:1,Location:300 (env SOLVE_SOLVER_UNPLAN_WEIGHTS) (default "Vehicle:3,Island:1,Location:293")
  -solve.startsolutions int
        number of solutions to generate on top of those passed in; one solution generated with sweep algorithm, the rest generated randomly (env SOLVE_START_SOLUTIONS) (default -1)

Info

Valid time units for -solve.duration are as follows, according to time.ParseDuration from Go's standard library:

  • ns (nanoseconds)
  • us/µs (microseconds)
  • ms (milliseconds)
  • s (seconds)
  • m (minutes)
  • h (hours)

Info

The solve duration is displayed in ns in the output.

Python

These are the default options that are available with the python-nextroute community app.

usage: main.py [options]

Options for main.py. Use command-line arguments (highest precedence) or environment variables.

options:
  -h, --help            show this help message and exit
  -check_duration, --check_duration CHECK_DURATION
                        [env var: CHECK_DURATION] (default: 30) (type: float) (additional attributes: {'min': 1, 'max': 300, 'step': 1}) (control type: ControlType.SLIDER) (display name: Check Duration): Maximum duration of the check, in
                        seconds.
  -check_verbosity, --check_verbosity CHECK_VERBOSITY
                        [env var: CHECK_VERBOSITY] (default: off) (type: str) (additional attributes: {'values': ['off', 'low', 'medium', 'high']}) (control type: ControlType.SELECT) (display name: Check Verbosity): Verbosity of the check
                        engine.
  -format_disable_progression, --format_disable_progression FORMAT_DISABLE_PROGRESSION
                        [env var: FORMAT_DISABLE_PROGRESSION] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Progression Format): Whether to disable the progression series.
  -model_constraints_disable_attributes, --model_constraints_disable_attributes MODEL_CONSTRAINTS_DISABLE_ATTRIBUTES
                        [env var: MODEL_CONSTRAINTS_DISABLE_ATTRIBUTES] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Attributes Constraint): Ignore the compatibility attributes constraint.
  -model_constraints_disable_capacity, --model_constraints_disable_capacity MODEL_CONSTRAINTS_DISABLE_CAPACITY
                        [env var: MODEL_CONSTRAINTS_DISABLE_CAPACITY] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Capacity Constraint): Ignore the capacity constraint for all resources.
  -model_constraints_disable_distancelimit, --model_constraints_disable_distancelimit MODEL_CONSTRAINTS_DISABLE_DISTANCELIMIT
                        [env var: MODEL_CONSTRAINTS_DISABLE_DISTANCELIMIT] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Distance Limit Constraint): Ignore the distance limit constraint.
  -model_constraints_disable_groups, --model_constraints_disable_groups MODEL_CONSTRAINTS_DISABLE_GROUPS
                        [env var: MODEL_CONSTRAINTS_DISABLE_GROUPS] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Groups Constraint): Ignore the groups constraint.
  -model_constraints_disable_maximumduration, --model_constraints_disable_maximumduration MODEL_CONSTRAINTS_DISABLE_MAXIMUMDURATION
                        [env var: MODEL_CONSTRAINTS_DISABLE_MAXIMUMDURATION] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Maximum Duration Constraint): Ignore the maximum duration constraint.
  -model_constraints_disable_maximumstops, --model_constraints_disable_maximumstops MODEL_CONSTRAINTS_DISABLE_MAXIMUMSTOPS
                        [env var: MODEL_CONSTRAINTS_DISABLE_MAXIMUMSTOPS] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Maximum Stops Constraint): Ignore the maximum stops constraint.
  -model_constraints_disable_maximumwaitstop, --model_constraints_disable_maximumwaitstop MODEL_CONSTRAINTS_DISABLE_MAXIMUMWAITSTOP
                        [env var: MODEL_CONSTRAINTS_DISABLE_MAXIMUMWAITSTOP] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Maximum Wait Stop Constraint): Ignore the maximum stop wait constraint.
  -model_constraints_disable_maximumwaitvehicle, --model_constraints_disable_maximumwaitvehicle MODEL_CONSTRAINTS_DISABLE_MAXIMUMWAITVEHICLE
                        [env var: MODEL_CONSTRAINTS_DISABLE_MAXIMUMWAITVEHICLE] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Maximum Wait Vehicle Constraint): Ignore the maximum vehicle wait
                        constraint.
  -model_constraints_disable_mixingitems, --model_constraints_disable_mixingitems MODEL_CONSTRAINTS_DISABLE_MIXINGITEMS
                        [env var: MODEL_CONSTRAINTS_DISABLE_MIXINGITEMS] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Mixing Items Constraint): Ignore the do not mix items constraint.
  -model_constraints_disable_precedence, --model_constraints_disable_precedence MODEL_CONSTRAINTS_DISABLE_PRECEDENCE
                        [env var: MODEL_CONSTRAINTS_DISABLE_PRECEDENCE] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Precedence Constraint): Ignore the precedence (pickups & deliveries)
                        constraint.
  -model_constraints_disable_starttimewindows, --model_constraints_disable_starttimewindows MODEL_CONSTRAINTS_DISABLE_STARTTIMEWINDOWS
                        [env var: MODEL_CONSTRAINTS_DISABLE_STARTTIMEWINDOWS] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Start Time Windows Constraint): Ignore the start time windows constraint.
  -model_constraints_disable_vehicleendtime, --model_constraints_disable_vehicleendtime MODEL_CONSTRAINTS_DISABLE_VEHICLEENDTIME
                        [env var: MODEL_CONSTRAINTS_DISABLE_VEHICLEENDTIME] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Vehicle End Time Constraint): Ignore the vehicle end time constraint.
  -model_constraints_disable_vehiclestarttime, --model_constraints_disable_vehiclestarttime MODEL_CONSTRAINTS_DISABLE_VEHICLESTARTTIME
                        [env var: MODEL_CONSTRAINTS_DISABLE_VEHICLESTARTTIME] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Vehicle Start Time Constraint): Ignore the vehicle start time constraint.
  -model_constraints_enable_cluster, --model_constraints_enable_cluster MODEL_CONSTRAINTS_ENABLE_CLUSTER
                        [env var: MODEL_CONSTRAINTS_ENABLE_CLUSTER] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Enable Cluster Constraint): Enable the cluster constraint.
  -model_objectives_capacities, --model_objectives_capacities MODEL_OBJECTIVES_CAPACITIES
                        [env var: MODEL_OBJECTIVES_CAPACITIES] (default: ) (type: str) (control type: ControlType.INPUT) (display name: Capacities Objective): Capacity objective, provide triple for each resource
                        `name=default;factor=1.0;offset=0.0`.
  -model_objectives_cluster, --model_objectives_cluster MODEL_OBJECTIVES_CLUSTER
                        [env var: MODEL_OBJECTIVES_CLUSTER] (default: 0.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Cluster Objective Factor): Factor to
                        weigh the cluster objective.
  -model_objectives_distance, --model_objectives_distance MODEL_OBJECTIVES_DISTANCE
                        [env var: MODEL_OBJECTIVES_DISTANCE] (default: 0.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Distance Objective Factor): Factor
                        to weigh the distance objective.
  -model_objectives_earlyarrivalpenalty, --model_objectives_earlyarrivalpenalty MODEL_OBJECTIVES_EARLYARRIVALPENALTY
                        [env var: MODEL_OBJECTIVES_EARLYARRIVALPENALTY] (default: 1.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Early Arrival Penalty
                        Factor): Factor to weigh the early arrival objective.
  -model_objectives_latearrivalpenalty, --model_objectives_latearrivalpenalty MODEL_OBJECTIVES_LATEARRIVALPENALTY
                        [env var: MODEL_OBJECTIVES_LATEARRIVALPENALTY] (default: 1.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Late Arrival Penalty
                        Factor): Factor to weigh the late arrival objective.
  -model_objectives_minstops, --model_objectives_minstops MODEL_OBJECTIVES_MINSTOPS
                        [env var: MODEL_OBJECTIVES_MINSTOPS] (default: 1.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Min Stops Objective Factor): Factor
                        to weigh the min stops objective.
  -model_objectives_stopbalance, --model_objectives_stopbalance MODEL_OBJECTIVES_STOPBALANCE
                        [env var: MODEL_OBJECTIVES_STOPBALANCE] (default: 0.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Stop Balance Objective Factor):
                        Factor to weigh the stop balance objective.
  -model_objectives_travelduration, --model_objectives_travelduration MODEL_OBJECTIVES_TRAVELDURATION
                        [env var: MODEL_OBJECTIVES_TRAVELDURATION] (default: 0.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Travel Duration Objective
                        Factor): Factor to weigh the travel duration objective.
  -model_objectives_unplannedpenalty, --model_objectives_unplannedpenalty MODEL_OBJECTIVES_UNPLANNEDPENALTY
                        [env var: MODEL_OBJECTIVES_UNPLANNEDPENALTY] (default: 1.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Unplanned Penalty Factor):
                        Factor to weigh the unplanned objective.
  -model_objectives_vehicleactivationpenalty, --model_objectives_vehicleactivationpenalty MODEL_OBJECTIVES_VEHICLEACTIVATIONPENALTY
                        [env var: MODEL_OBJECTIVES_VEHICLEACTIVATIONPENALTY] (default: 1.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Vehicle Activation
                        Penalty Factor): Factor to weigh the vehicle activation objective.
  -model_objectives_vehiclesduration, --model_objectives_vehiclesduration MODEL_OBJECTIVES_VEHICLESDURATION
                        [env var: MODEL_OBJECTIVES_VEHICLESDURATION] (default: 1.0) (type: float) (additional attributes: {'min': 0.0, 'max': 10.0, 'step': 0.1}) (control type: ControlType.SLIDER) (display name: Vehicles Duration Objective
                        Factor): Factor to weigh the vehicles duration objective.
  -model_properties_disable_durationgroups, --model_properties_disable_durationgroups MODEL_PROPERTIES_DISABLE_DURATIONGROUPS
                        [env var: MODEL_PROPERTIES_DISABLE_DURATIONGROUPS] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Duration Groups): Ignore the durations groups of stops.
  -model_properties_disable_durations, --model_properties_disable_durations MODEL_PROPERTIES_DISABLE_DURATIONS
                        [env var: MODEL_PROPERTIES_DISABLE_DURATIONS] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Durations): Ignore the durations of stops.
  -model_properties_disable_initialsolution, --model_properties_disable_initialsolution MODEL_PROPERTIES_DISABLE_INITIALSOLUTION
                        [env var: MODEL_PROPERTIES_DISABLE_INITIALSOLUTION] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Initial Solution): Ignore the initial solution.
  -model_properties_disable_stopdurationmultipliers, --model_properties_disable_stopdurationmultipliers MODEL_PROPERTIES_DISABLE_STOPDURATIONMULTIPLIERS
                        [env var: MODEL_PROPERTIES_DISABLE_STOPDURATIONMULTIPLIERS] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Stop Duration Multipliers): Ignore the stop duration multipliers
                        defined on vehicles.
  -model_properties_maximumtimehorizon, --model_properties_maximumtimehorizon MODEL_PROPERTIES_MAXIMUMTIMEHORIZON
                        [env var: MODEL_PROPERTIES_MAXIMUMTIMEHORIZON] (default: 15552000) (type: int) (additional attributes: {'min': 0}) (control type: ControlType.INPUT) (display name: Maximum Time Horizon): Maximum time horizon for the
                        model in seconds.
  -model_validate_disable_resources, --model_validate_disable_resources MODEL_VALIDATE_DISABLE_RESOURCES
                        [env var: MODEL_VALIDATE_DISABLE_RESOURCES] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Resources Validation): Disable the resources validation.
  -model_validate_disable_starttime, --model_validate_disable_starttime MODEL_VALIDATE_DISABLE_STARTTIME
                        [env var: MODEL_VALIDATE_DISABLE_STARTTIME] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Disable Start Time Validation): Disable the start time validation.
  -model_validate_enable_matrix, --model_validate_enable_matrix MODEL_VALIDATE_ENABLE_MATRIX
                        [env var: MODEL_VALIDATE_ENABLE_MATRIX] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Enable Matrix Validation): Enable matrix validation.
  -model_validate_enable_matrixasymmetrytolerance, --model_validate_enable_matrixasymmetrytolerance MODEL_VALIDATE_ENABLE_MATRIXASYMMETRYTOLERANCE
                        [env var: MODEL_VALIDATE_ENABLE_MATRIXASYMMETRYTOLERANCE] (default: 20) (type: int) (additional attributes: {'min': 0, 'max': 100, 'step': 1}) (control type: ControlType.SLIDER) (display name: Matrix Asymmetry
                        Tolerance): Percentage of acceptable matrix asymmetry, requires matrix validation enabled.
  -solve_duration, --solve_duration SOLVE_DURATION
                        [env var: SOLVE_DURATION] (default: 5) (type: float) (additional attributes: {'min': 1, 'max': 600, 'step': 1}) (control type: ControlType.SLIDER) (display name: Solve Duration): Maximum duration, in seconds, of the
                        solver.
  -solve_iterations, --solve_iterations SOLVE_ITERATIONS
                        [env var: SOLVE_ITERATIONS] (default: -1) (type: int) (additional attributes: {'min': -1}) (control type: ControlType.INPUT) (display name: Solve Iterations): Maximum number of iterations, -1 assumes no limit;
                        iterations are counted after start solutions are generated.
  -solve_parallelruns, --solve_parallelruns SOLVE_PARALLELRUNS
                        [env var: SOLVE_PARALLELRUNS] (default: -1) (type: int) (additional attributes: {'min': -1}) (control type: ControlType.INPUT) (display name: Parallel Runs): Maximum number of parallel runs, -1 results in using all
                        available resources.
  -solve_plateau_delay, --solve_plateau_delay SOLVE_PLATEAU_DELAY
                        [env var: SOLVE_PLATEAU_DELAY] (default: 0.0) (type: float) (additional attributes: {'min': 0.0, 'max': 60.0, 'step': 0.5}) (control type: ControlType.SLIDER) (display name: Plateau Delay): Delay before starting to
                        monitor for a plateau.
  -solve_plateau_absolutethreshold, --solve_plateau_absolutethreshold SOLVE_PLATEAU_ABSOLUTETHRESHOLD
                        [env var: SOLVE_PLATEAU_ABSOLUTETHRESHOLD] (default: -1) (type: float) (control type: ControlType.INPUT) (display name: Plateau Absolute Threshold): Absolute threshold for significant improvement.
  -solve_plateau_duration, --solve_plateau_duration SOLVE_PLATEAU_DURATION
                        [env var: SOLVE_PLATEAU_DURATION] (default: 0.0) (type: float) (additional attributes: {'min': 0.0, 'max': 300.0, 'step': 1.0}) (control type: ControlType.SLIDER) (display name: Plateau Duration): Maximum duration,
                        in seconds, without (significant) improvement.
  -solve_plateau_iterations, --solve_plateau_iterations SOLVE_PLATEAU_ITERATIONS
                        [env var: SOLVE_PLATEAU_ITERATIONS] (default: 0) (type: int) (additional attributes: {'min': 0}) (control type: ControlType.INPUT) (display name: Plateau Iterations): Maximum number of iterations without
                        (significant) improvement.
  -solve_plateau_relativethreshold, --solve_plateau_relativethreshold SOLVE_PLATEAU_RELATIVETHRESHOLD
                        [env var: SOLVE_PLATEAU_RELATIVETHRESHOLD] (default: 0.0) (type: float) (additional attributes: {'min': 0.0, 'max': 1.0, 'step': 0.01}) (control type: ControlType.SLIDER) (display name: Plateau Relative Threshold):
                        Relative threshold for significant improvement.
  -solve_rundeterministically, --solve_rundeterministically SOLVE_RUNDETERMINISTICALLY
                        [env var: SOLVE_RUNDETERMINISTICALLY] (default: False) (type: bool) (control type: ControlType.TOGGLE) (display name: Run Deterministically): Run the parallel solver deterministically.
  -solve_solver_plangroupsize_delta, --solve_solver_plangroupsize_delta SOLVE_SOLVER_PLANGROUPSIZE_DELTA
                        [env var: SOLVE_SOLVER_PLANGROUPSIZE_DELTA] (default: 0) (type: int) (additional attributes: {'min': 0}) (control type: ControlType.INPUT) (display name: Plan Group Size Delta): Delta for the plan group size
                        parameter.
  -solve_solver_plangroupsize_deltaafteriterations, --solve_solver_plangroupsize_deltaafteriterations SOLVE_SOLVER_PLANGROUPSIZE_DELTAAFTERITERATIONS
                        [env var: SOLVE_SOLVER_PLANGROUPSIZE_DELTAAFTERITERATIONS] (default: 1000000000) (type: int) (additional attributes: {'min': 0}) (control type: ControlType.INPUT) (display name: Plan Group Size Delta After
                        Iterations): Delta after each iteration for the plan group size parameter.
  -solve_solver_plangroupsize_maxvalue, --solve_solver_plangroupsize_maxvalue SOLVE_SOLVER_PLANGROUPSIZE_MAXVALUE
                        [env var: SOLVE_SOLVER_PLANGROUPSIZE_MAXVALUE] (default: 2) (type: int) (additional attributes: {'min': 1, 'max': 100, 'step': 1}) (control type: ControlType.SLIDER) (display name: Plan Group Size Max Value):
                        Maximum value for the plan group size parameter.
  -solve_solver_plangroupsize_minvalue, --solve_solver_plangroupsize_minvalue SOLVE_SOLVER_PLANGROUPSIZE_MINVALUE
                        [env var: SOLVE_SOLVER_PLANGROUPSIZE_MINVALUE] (default: 2) (type: int) (additional attributes: {'min': 1, 'max': 100, 'step': 1}) (control type: ControlType.SLIDER) (display name: Plan Group Size Min Value):
                        Minimum value for the plan group size parameter.
  -solve_solver_plangroupsize_snapbackafterimprovement, --solve_solver_plangroupsize_snapbackafterimprovement SOLVE_SOLVER_PLANGROUPSIZE_SNAPBACKAFTERIMPROVEMENT
                        [env var: SOLVE_SOLVER_PLANGROUPSIZE_SNAPBACKAFTERIMPROVEMENT] (default: True) (type: bool) (control type: ControlType.TOGGLE) (display name: Plan Group Size Snap Back After Improvement): Snap back to start value
                        after improvement of best solution for the plan group size parameter.
  -solve_solver_plangroupsize_startvalue, --solve_solver_plangroupsize_startvalue SOLVE_SOLVER_PLANGROUPSIZE_STARTVALUE
                        [env var: SOLVE_SOLVER_PLANGROUPSIZE_STARTVALUE] (default: 2) (type: int) (additional attributes: {'min': 1, 'max': 100, 'step': 1}) (control type: ControlType.SLIDER) (display name: Plan Group Size Start Value):
                        Start value for the plan group size parameter.
  -solve_solver_plangroupsize_zigzag, --solve_solver_plangroupsize_zigzag SOLVE_SOLVER_PLANGROUPSIZE_ZIGZAG
                        [env var: SOLVE_SOLVER_PLANGROUPSIZE_ZIGZAG] (default: True) (type: bool) (control type: ControlType.TOGGLE) (display name: Plan Group Size Zigzag): Zigzag between min and max value like a jig saw for the plan group
                        size parameter.
  -solve_solver_unplanunits_delta, --solve_solver_unplanunits_delta SOLVE_SOLVER_UNPLANUNITS_DELTA
                        [env var: SOLVE_SOLVER_UNPLANUNITS_DELTA] (default: 2) (type: int) (additional attributes: {'min': 0}) (control type: ControlType.INPUT) (display name: Unplan Units Delta): Delta for the unplan units parameter.
  -solve_solver_unplanunits_deltaafteriterations, --solve_solver_unplanunits_deltaafteriterations SOLVE_SOLVER_UNPLANUNITS_DELTAAFTERITERATIONS
                        [env var: SOLVE_SOLVER_UNPLANUNITS_DELTAAFTERITERATIONS] (default: 125) (type: int) (additional attributes: {'min': 0}) (control type: ControlType.INPUT) (display name: Unplan Units Delta After Iterations): Delta
                        after each iteration for the unplan units parameter.
  -solve_solver_unplanunits_maxvalue, --solve_solver_unplanunits_maxvalue SOLVE_SOLVER_UNPLANUNITS_MAXVALUE
                        [env var: SOLVE_SOLVER_UNPLANUNITS_MAXVALUE] (default: -1) (type: int) (additional attributes: {'min': -1}) (control type: ControlType.INPUT) (display name: Unplan Units Max Value): Maximum value for the unplan
                        units parameter.
  -solve_solver_unplanunits_minvalue, --solve_solver_unplanunits_minvalue SOLVE_SOLVER_UNPLANUNITS_MINVALUE
                        [env var: SOLVE_SOLVER_UNPLANUNITS_MINVALUE] (default: 2) (type: int) (additional attributes: {'min': 1, 'max': 100, 'step': 1}) (control type: ControlType.SLIDER) (display name: Unplan Units Min Value): Minimum
                        value for the unplan units parameter.
  -solve_solver_unplanunits_snapbackafterimprovement, --solve_solver_unplanunits_snapbackafterimprovement SOLVE_SOLVER_UNPLANUNITS_SNAPBACKAFTERIMPROVEMENT
                        [env var: SOLVE_SOLVER_UNPLANUNITS_SNAPBACKAFTERIMPROVEMENT] (default: True) (type: bool) (control type: ControlType.TOGGLE) (display name: Unplan Units Snap Back After Improvement): Snap back to start value after
                        improvement of best solution for the unplan units parameter.
  -solve_solver_unplanunits_startvalue, --solve_solver_unplanunits_startvalue SOLVE_SOLVER_UNPLANUNITS_STARTVALUE
                        [env var: SOLVE_SOLVER_UNPLANUNITS_STARTVALUE] (default: 2) (type: int) (additional attributes: {'min': 1, 'max': 100, 'step': 1}) (control type: ControlType.SLIDER) (display name: Unplan Units Start Value): Start
                        value for the unplan units parameter.
  -solve_solver_unplanunits_zigzag, --solve_solver_unplanunits_zigzag SOLVE_SOLVER_UNPLANUNITS_ZIGZAG
                        [env var: SOLVE_SOLVER_UNPLANUNITS_ZIGZAG] (default: True) (type: bool) (control type: ControlType.TOGGLE) (display name: Unplan Units Zigzag): Zigzag between min and max value like a jig saw for the unplan units
                        parameter.
  -solve_solver_unplanweights, --solve_solver_unplanweights SOLVE_SOLVER_UNPLANWEIGHTS
                        [env var: SOLVE_SOLVER_UNPLANWEIGHTS] (default: Vehicle:3,Island:1,Location:293) (type: str) (control type: ControlType.INPUT) (display name: Unplan Weights): Unplan heuristic weights parameter.
  -solve_startsolutions, --solve_startsolutions SOLVE_STARTSOLUTIONS
                        [env var: SOLVE_STARTSOLUTIONS] (default: -1) (type: int) (additional attributes: {'min': -1}) (control type: ControlType.INPUT) (display name: Start Solutions): Number of solutions to generate on top of those
                        passed in; one solution generated with sweep algorithm, the rest generated randomly.

Info

The units for options that deal with time duration (such as -solve_duration) are seconds. This applies for the input and output as well.

Output

Most options are parsed to the output, under the options key. Here is an example of a Go app.

{
  "model": {
    "constraints": {
      "disable": {
        "attributes": false,
        "capacity": false,
        "capacities": null,
        "distance_limit": false,
        "groups": false,
        "maximum_duration": false,
        "maximum_stops": false,
        "maximum_wait_stop": false,
        "maximum_wait_vehicle": false,
        "mixing_items": false,
        "precedence": false,
        "vehicle_start_time": false,
        "vehicle_end_time": false,
        "start_time_windows": false
      },
      "enable": {
        "cluster": false
      }
    },
    "objectives": {
      "capacities": "",
      "min_stops": 1,
      "early_arrival_penalty": 1,
      "late_arrival_penalty": 1,
      "vehicle_activation_penalty": 1,
      "distance": 0,
      "travel_duration": 0,
      "vehicles_duration": 1,
      "unplanned_penalty": 1,
      "cluster": 0,
      "stop_balance": 0
    },
    "properties": {
      "disable": {
        "durations": false,
        "stop_duration_multipliers": false,
        "duration_groups": false,
        "initial_solution": false
      },
      "maximum_time_horizon": 15552000
    },
    "validate": {
      "disable": {
        "start_time": false,
        "resources": false
      },
      "enable": {
        "matrix": false,
        "matrix_asymmetry_tolerance": 20
      }
    }
  },
  "solve": {
    "iterations": 50,
    "duration": 10000000000,
    "plateau": {
      "delay": 0,
      "duration": 0,
      "iterations": 0,
      "relative_threshold": 0,
      "absolute_threshold": -1
    },
    "parallel_runs": 1,
    "start_solutions": 1,
    "solver": {
      "unplan_units": {
        "start_value": 2,
        "delta_after_iterations": 125,
        "delta": 2,
        "min_value": 2,
        "max_value": -1,
        "snap_back_after_improvement": true,
        "zigzag": true
      },
      "unplan_weights": "Vehicle:3,Island:1,Location:293",
      "plan_group_size": {
        "start_value": 2,
        "delta_after_iterations": 1000000000,
        "delta": 0,
        "min_value": 2,
        "max_value": 2,
        "snap_back_after_improvement": true,
        "zigzag": true
      }
    },
    "run_deterministically": true
  },
  "format": {
    "disable": {
      "progression": true
    }
  },
  "check": {
    "duration": 30000000000,
    "verbosity": "off"
  }
}

When working with a custom app, you may also modify the options in code, which would override the ones passed from the runner. Here is an example of how this is done and how the resulting output shows the modified options. Notice that options is modified multiple times inside the solver function.

// © 2019-present nextmv.io inc

// package main holds the implementation of the nextroute template.
package main

import (
    "context"
    "log"
    "time"

    "github.com/nextmv-io/nextroute"
    "github.com/nextmv-io/nextroute/check"
    "github.com/nextmv-io/nextroute/factory"
    "github.com/nextmv-io/nextroute/schema"
    "github.com/nextmv-io/sdk/run"
    runSchema "github.com/nextmv-io/sdk/run/schema"
)

func main() {
    runner := run.CLI(solver)
    err := runner.Run(context.Background())
    if err != nil {
        log.Fatal(err)
    }
}

type options struct {
    Model  factory.Options                `json:"model,omitempty"`
    Solve  nextroute.ParallelSolveOptions `json:"solve,omitempty"`
    Format nextroute.FormatOptions        `json:"format,omitempty"`
    Check  check.Options                  `json:"check,omitempty"`
}

func solver(
    ctx context.Context,
    input schema.Input,
    options options,
) (runSchema.Output, error) {
    // Customize options in the code.
    options.Model.Objectives.TravelDuration = 0.5
    options.Model.Objectives.UnplannedPenalty = 0.3
    options.Model.Constraints.Disable.Capacity = true
    options.Model.Constraints.Disable.Attributes = true
    options.Model.Constraints.Disable.Precedence = true
    options.Solve.Duration = time.Duration(11) * time.Second
    options.Solve.Iterations = 51
    options.Format.Disable.Progression = true

    model, err := factory.NewModel(input, options.Model)
    if err != nil {
        return runSchema.Output{}, err
    }

    solver, err := nextroute.NewParallelSolver(model)
    if err != nil {
        return runSchema.Output{}, err
    }

    solutions, err := solver.Solve(ctx, options.Solve)
    if err != nil {
        return runSchema.Output{}, err
    }
    last, err := solutions.Last()
    if err != nil {
        return runSchema.Output{}, err
    }

    output, err := check.Format(ctx, options, options.Check, solver, last)
    if err != nil {
        return runSchema.Output{}, err
    }
    output.Statistics.Result.Custom = factory.DefaultCustomResultStatistics(last)

    return output, nil
}
{
"options": {
    "check": {
    "duration": 30000000000,
    "verbosity": "off"
    },
    "format": {
    "disable": {
        "progression": true
    }
    },
    "model": {
    "constraints": {
        "disable": {
        "attributes": true,
        "capacities": null,
        "capacity": true,
        "distance_limit": false,
        "groups": false,
        "maximum_duration": false,
        "maximum_stops": false,
        "maximum_wait_stop": false,
        "maximum_wait_vehicle": false,
        "mixing_items": false,
        "precedence": true,
        "start_time_windows": false,
        "vehicle_end_time": false,
        "vehicle_start_time": false
        },
        "enable": {
        "cluster": false
        }
    },
    "objectives": {
        "capacities": "",
        "cluster": 0,
        "distance": 0,
        "early_arrival_penalty": 1,
        "late_arrival_penalty": 1,
        "min_stops": 1,
        "stop_balance": 0,
        "travel_duration": 0.5,
        "unplanned_penalty": 0.3,
        "vehicle_activation_penalty": 1,
        "vehicles_duration": 1
    },
    "properties": {
        "disable": {
        "duration_groups": false,
        "durations": false,
        "initial_solution": false,
        "stop_duration_multipliers": false
        },
        "maximum_time_horizon": 15552000
    },
    "validate": {
        "disable": {
        "resources": false,
        "start_time": false
        },
        "enable": {
        "matrix": false,
        "matrix_asymmetry_tolerance": 20
        }
    }
    },
    "solve": {
    "duration": 11000000000,
    "iterations": 51,
    "parallel_runs": 1,
    "plateau": {
        "absolute_threshold": -1,
        "delay": 0,
        "duration": 0,
        "iterations": 0,
        "relative_threshold": 0
    },
    "run_deterministically": true,
    "solver": {
        "plan_group_size": {
        "delta": 0,
        "delta_after_iterations": 1000000000,
        "max_value": 2,
        "min_value": 2,
        "snap_back_after_improvement": true,
        "start_value": 2,
        "zigzag": true
        },
        "unplan_units": {
        "delta": 2,
        "delta_after_iterations": 125,
        "max_value": -1,
        "min_value": 2,
        "snap_back_after_improvement": true,
        "start_value": 2,
        "zigzag": true
        },
        "unplan_weights": "Vehicle:3,Island:1,Location:293"
    },
    "start_solutions": 1
    }
},
"solutions": [
    {
    "objective": {
        "name": "0.5 * travel_duration + 1 * vehicles_duration + 0.3 * unplanned_penalty",
        "objectives": [
        {
            "base": 909.0466359667602,
            "factor": 0.5,
            "name": "travel_duration",
            "value": 454.5233179833801
        },
        {
            "base": 909.0466359667602,
            "factor": 1,
            "name": "vehicles_duration",
            "value": 909.0466359667602
        },
        {
            "factor": 0.3,
            "name": "unplanned_penalty",
            "value": 0
        }
        ],
        "value": 1363.5699539501402
    },
    "unplanned": [],
    "vehicles": [
        {
        "id": "v1",
        "route": [
            {
            "cumulative_travel_duration": 0,
            "stop": {
                "id": "v1-start",
                "location": {
                "lat": 35.017209,
                "lon": 135.672009
                }
            },
            "travel_duration": 0
            },
            {
            "cumulative_travel_duration": 0,
            "stop": {
                "id": "Arashiyama Bamboo Forest",
                "location": {
                "lat": 35.017209,
                "lon": 135.672009
                }
            },
            "travel_duration": 0
            },
            {
            "cumulative_travel_distance": 5752,
            "cumulative_travel_duration": 287,
            "stop": {
                "id": "Kinkaku-ji",
                "location": {
                "lat": 35.039705,
                "lon": 135.728898
                }
            },
            "travel_distance": 5752,
            "travel_duration": 287
            },
            {
            "cumulative_travel_distance": 9081,
            "cumulative_travel_duration": 454,
            "stop": {
                "id": "Nijō Castle",
                "location": {
                "lat": 35.014239,
                "lon": 135.748134
                }
            },
            "travel_distance": 3329,
            "travel_duration": 166
            },
            {
            "cumulative_travel_distance": 10857,
            "cumulative_travel_duration": 542,
            "stop": {
                "id": "Kyoto Imperial Palace",
                "location": {
                "lat": 35.025431,
                "lon": 135.762057
                }
            },
            "travel_distance": 1776,
            "travel_duration": 88
            },
            {
            "cumulative_travel_distance": 13696,
            "cumulative_travel_duration": 684,
            "stop": {
                "id": "Gionmachi",
                "location": {
                "lat": 35.002457,
                "lon": 135.775682
                }
            },
            "travel_distance": 2839,
            "travel_duration": 141
            },
            {
            "cumulative_travel_distance": 14897,
            "cumulative_travel_duration": 745,
            "stop": {
                "id": "Kiyomizu-dera",
                "location": {
                "lat": 34.994857,
                "lon": 135.78506
                }
            },
            "travel_distance": 1201,
            "travel_duration": 60
            },
            {
            "cumulative_travel_distance": 18177,
            "cumulative_travel_duration": 909,
            "stop": {
                "id": "Fushimi Inari Taisha",
                "location": {
                "lat": 34.967146,
                "lon": 135.772695
                }
            },
            "travel_distance": 3280,
            "travel_duration": 164
            }
        ],
        "route_duration": 909,
        "route_travel_distance": 18177,
        "route_travel_duration": 909
        }
    ]
    }
],
"statistics": {
    "result": {
    "custom": {
        "activated_vehicles": 1,
        "max_duration": 909,
        "max_stops_in_vehicle": 7,
        "max_travel_duration": 909,
        "min_duration": 909,
        "min_stops_in_vehicle": 7,
        "min_travel_duration": 909,
        "unplanned_stops": 0
    },
    "duration": 0.123,
    "value": 1363.5699539501402
    },
    "run": {
    "duration": 0.123,
    "iterations": 51
    },
    "schema": "v1"
},
"version": {
    "sdk": "VERSION"
}
}