Features

Nextcheck

A how-to guide for checking the feasibility of a problem.

This feature is configurable options, without the need for code customization and is available for both the Marketplace app and Platform. You can find a list of all available features here.

Nextcheck is a feature that can be used with apps based on our vehicle routing engine in the following scenarios:

  • Input check: In this scenario the submitted input file is checked. As a result Nextcheck will report which plan units can be planned and which cannot. This check can be run locally to test input files ad hoc, or it could be used as a pre-check for your input files.
  • Solution check: In this use case you have a solution and want to know why you have unplanned stops.

Usage

A move is the act of adding an unplanned plan unit to an existing solution. Not every move is feasible or improves the existing solution.

The Nextcheck report is enabled by defining the verbosity level for Nextcheck through options. There are four levels of verbosity that you can request for your report: off, low, medium, and high.

  1. off — Nextcheck is disabled, no report is generated. This is the default setting for Nextroute.
  2. low — For each plan unit we determine if there is a feasible move that improves the solution.
  3. medium — For each plan unit we determine the best feasible move that improves the solution and report its impact on the objective. At this level we also report how many moves on each vehicle can be executed.
    • For each plan unit, Nextcheck determines the best feasible move that improves the solution and reports its impact on the objective. At this level, it also reports how many moves on each vehicle can be executed.
    • If a move is not executable, the report will provide a list of constraints that have prevented a feasible move and the number of times that constraint was responsible for not accepting a move. Note that other constraints may have been violated as well, but as soon as Nextcheck encounters a constraint violation for a move, it stops checking for other constraint violations for that move because it is no longer necessary to do so.
  4. high — For each plan unit, we report the same level of detail defined in medium above with the addition of a property that defines which vehicles have moves for the plan unit that will improve the solution.

To check an input file you need to make sure that none of the vehicles have any initial stops with the property fixed set to false. Once the input file complies with this requirement the check can be performed.

If you want to check a solution, you need to create an input file where your previously generated solution is added to the vehicles as initial stops.

You can see an example output here where the verbosity was set to high:

{
  "options": {
    "check": {
      "duration": 30000000000,
      "verbosity": "high"
    },
    "format": {
      "disable": {
        "progression": true
      }
    },
    "model": {
      "constraints": {
        "disable": {
          "attributes": false,
          "capacities": null,
          "capacity": false,
          "distance_limit": false,
          "groups": false,
          "maximum_duration": false,
          "maximum_stops": false,
          "maximum_wait_stop": false,
          "maximum_wait_vehicle": false,
          "mixing_items": false,
          "precedence": false,
          "start_time_windows": false,
          "vehicle_end_time": false,
          "vehicle_start_time": false
        },
        "enable": {
          "cluster": false
        }
      },
      "objectives": {
        "capacities": "",
        "cluster": 0,
        "early_arrival_penalty": 1,
        "late_arrival_penalty": 1,
        "min_stops": 1,
        "travel_duration": 0,
        "unplanned_penalty": 1,
        "vehicle_activation_penalty": 1,
        "vehicles_duration": 1
      },
      "properties": {
        "disable": {
          "duration_groups": false,
          "durations": false,
          "initial_solution": false,
          "stop_duration_multipliers": false
        }
      },
      "validate": {
        "disable": {
          "resources": false,
          "start_time": false
        },
        "enable": {
          "matrix": false,
          "matrix_asymmetry_tolerance": 20
        }
      }
    },
    "solve": {
      "duration": 10000000000,
      "iterations": 0,
      "parallel_runs": 1,
      "run_deterministically": true,
      "start_solutions": 0
    }
  },
  "solutions": [
    {
      "check": {
        "duration_maximum": 30,
        "duration_used": 0.123,
        "plan_units": [
          {
            "best_move_failed": false,
            "best_move_increases_objective": false,
            "best_move_objective": {
              "terms": [
                {
                  "base": 536.4530622299,
                  "factor": 1,
                  "name": "vehicles_duration",
                  "value": 536.4530622299
                },
                {
                  "base": -1000000,
                  "factor": 1,
                  "name": "unplanned_penalty",
                  "value": -1000000
                }
              ],
              "value": -1998927.0938755402,
              "vehicle": "v1"
            },
            "has_best_move": true,
            "stops": [
              "Fushimi Inari Taisha"
            ],
            "vehicles_have_moves": 1,
            "vehicles_with_moves": [
              "v1"
            ]
          },
          {
            "best_move_failed": false,
            "best_move_increases_objective": false,
            "best_move_objective": {
              "terms": [
                {
                  "base": 529.6139038839777,
                  "factor": 1,
                  "name": "vehicles_duration",
                  "value": 529.6139038839777
                },
                {
                  "base": -1000000,
                  "factor": 1,
                  "name": "unplanned_penalty",
                  "value": -1000000
                }
              ],
              "value": -1998940.772192232,
              "vehicle": "v1"
            },
            "has_best_move": true,
            "stops": [
              "Kiyomizu-dera"
            ],
            "vehicles_have_moves": 1,
            "vehicles_with_moves": [
              "v1"
            ]
          },
          {
            "best_move_failed": false,
            "best_move_increases_objective": false,
            "best_move_objective": {
              "terms": [
                {
                  "base": 347.02081951153525,
                  "factor": 1,
                  "name": "vehicles_duration",
                  "value": 347.02081951153525
                },
                {
                  "base": -1000000,
                  "factor": 1,
                  "name": "unplanned_penalty",
                  "value": -1000000
                }
              ],
              "value": -1999305.958360977,
              "vehicle": "v1"
            },
            "has_best_move": true,
            "stops": [
              "Nijō Castle"
            ],
            "vehicles_have_moves": 1,
            "vehicles_with_moves": [
              "v1"
            ]
          },
          {
            "best_move_failed": false,
            "best_move_increases_objective": false,
            "best_move_objective": {
              "terms": [
                {
                  "base": 412.537144030441,
                  "factor": 1,
                  "name": "vehicles_duration",
                  "value": 412.537144030441
                },
                {
                  "base": -1000000,
                  "factor": 1,
                  "name": "unplanned_penalty",
                  "value": -1000000
                }
              ],
              "value": -1999174.925711939,
              "vehicle": "v1"
            },
            "has_best_move": true,
            "stops": [
              "Kyoto Imperial Palace"
            ],
            "vehicles_have_moves": 1,
            "vehicles_with_moves": [
              "v1"
            ]
          },
          {
            "best_move_failed": false,
            "best_move_increases_objective": false,
            "best_move_objective": {
              "terms": [
                {
                  "base": 479.1702973276746,
                  "factor": 1,
                  "name": "vehicles_duration",
                  "value": 479.1702973276746
                },
                {
                  "base": -1000000,
                  "factor": 1,
                  "name": "unplanned_penalty",
                  "value": -1000000
                }
              ],
              "value": -1999041.6594053446,
              "vehicle": "v1"
            },
            "has_best_move": true,
            "stops": [
              "Gionmachi"
            ],
            "vehicles_have_moves": 1,
            "vehicles_with_moves": [
              "v1"
            ]
          },
          {
            "best_move_failed": false,
            "best_move_increases_objective": false,
            "best_move_objective": {
              "terms": [
                {
                  "base": 287.61617185337144,
                  "factor": 1,
                  "name": "vehicles_duration",
                  "value": 287.61617185337144
                },
                {
                  "base": -1000000,
                  "factor": 1,
                  "name": "unplanned_penalty",
                  "value": -1000000
                }
              ],
              "value": -1999424.7676562932,
              "vehicle": "v1"
            },
            "has_best_move": true,
            "stops": [
              "Kinkaku-ji"
            ],
            "vehicles_have_moves": 1,
            "vehicles_with_moves": [
              "v1"
            ]
          },
          {
            "best_move_failed": false,
            "best_move_increases_objective": false,
            "best_move_objective": {
              "terms": [
                {
                  "base": 0,
                  "factor": 1,
                  "name": "vehicles_duration",
                  "value": 0
                },
                {
                  "base": -1000000,
                  "factor": 1,
                  "name": "unplanned_penalty",
                  "value": -1000000
                }
              ],
              "value": -2000000,
              "vehicle": "v1"
            },
            "has_best_move": true,
            "stops": [
              "Arashiyama Bamboo Forest"
            ],
            "vehicles_have_moves": 1,
            "vehicles_with_moves": [
              "v1"
            ]
          }
        ],
        "remark": "completed",
        "solution": {
          "objective": {
            "terms": [
              {
                "base": 0,
                "factor": 1,
                "name": "vehicles_duration",
                "value": 0
              },
              {
                "base": 7000000,
                "factor": 1,
                "name": "unplanned_penalty",
                "value": 7000000
              }
            ],
            "value": 7000000
          },
          "plan_units_planned": 0,
          "plan_units_unplanned": 7,
          "stops_planned": 0,
          "vehicles_not_used": 1,
          "vehicles_used": 0
        },
        "summary": {
          "moves_failed": 0,
          "plan_units_best_move_failed": 0,
          "plan_units_best_move_found": 7,
          "plan_units_best_move_increases_objective": 0,
          "plan_units_checked": 7,
          "plan_units_have_no_move": 0,
          "plan_units_to_be_checked": 7
        },
        "vehicles": [
          {
            "id": "v1",
            "plan_units_have_moves": 7
          }
        ],
        "verbosity": "high"
      },
      "objective": {
        "name": "1 * vehicles_duration + 1 * unplanned_penalty",
        "objectives": [
          {
            "factor": 1,
            "name": "vehicles_duration",
            "value": 0
          },
          {
            "base": 7000000,
            "factor": 1,
            "name": "unplanned_penalty",
            "value": 7000000
          }
        ],
        "value": 7000000
      },
      "unplanned": [
        {
          "id": "Arashiyama Bamboo Forest",
          "location": {
            "lat": 35.017209,
            "lon": 135.672009
          }
        },
        {
          "id": "Fushimi Inari Taisha",
          "location": {
            "lat": 34.967146,
            "lon": 135.772695
          }
        },
        {
          "id": "Gionmachi",
          "location": {
            "lat": 35.002457,
            "lon": 135.775682
          }
        },
        {
          "id": "Kinkaku-ji",
          "location": {
            "lat": 35.039705,
            "lon": 135.728898
          }
        },
        {
          "id": "Kiyomizu-dera",
          "location": {
            "lat": 34.994857,
            "lon": 135.78506
          }
        },
        {
          "id": "Kyoto Imperial Palace",
          "location": {
            "lat": 35.025431,
            "lon": 135.762057
          }
        },
        {
          "id": "Nijō Castle",
          "location": {
            "lat": 35.014239,
            "lon": 135.748134
          }
        }
      ],
      "vehicles": [
        {
          "id": "v1",
          "route": [
            {
              "cumulative_travel_duration": 0,
              "stop": {
                "id": "v1-start",
                "location": {
                  "lat": 35.017209,
                  "lon": 135.672009
                }
              },
              "travel_duration": 0
            }
          ],
          "route_duration": 0,
          "route_travel_duration": 0
        }
      ]
    }
  ],
  "statistics": {
    "result": {
      "custom": {
        "activated_vehicles": 0,
        "max_duration": 0,
        "max_stops_in_vehicle": 0,
        "max_travel_duration": 0,
        "min_duration": 9223372036854776000,
        "min_stops_in_vehicle": 9223372036854776000,
        "min_travel_duration": 9223372036854776000,
        "unplanned_stops": 7
      },
      "duration": 0.123,
      "value": 7000000
    },
    "run": {
      "duration": 0.123,
      "iterations": 0
    },
    "schema": "v1"
  },
  "version": {
    "sdk": "VERSION"
  }
}
Copy

Page last updated

Go to on-page nav menu