-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
I am consistently encountering a Colab session crash (indicated by an F0000 error, usually a Check failed assertion) when attempting to solve a Vehicle Routing Problem (VRP) with time windows using OR-Tools. This issue persists even after significant troubleshooting, including:
- Extreme Simplification of Problem Size:
- Reducing the number of locations to visit down to only 2 locations (excluding the depot).
- Setting the number of vehicles to 3.
- Extensive Relaxation of Constraints:
- Max vehicle working time (MAX_VEHICLE_TIME): Increased to 48 hours.
- Location time windows: Expanded to 24 hours per day (00:00 to 24:00) or even 48 hours for depot and all locations.
- Service time at locations: Reduced to 0 minutes for all locations.
- Removal of strict depot start time constraint: The initial SetRange for the depot was removed to allow the solver more flexibility.
Colab Environment & OR-Tools Version:
The crash occurs on both standard Colab and Colab Pro environments (ruling out simple resource limitations like RAM or GPU).
The crash occurs with the latest OR-Tools version (9.13.4784) and also with a specific older version (9.10.4067) that was explicitly installed.
A very basic OR-Tools VRP sample code (without time windows) runs successfully on the same Colab environment, indicating the OR-Tools installation itself might be generally okay.
The crash manifests as a sudden session termination, often with an F0000 log, rather than a "No solution found" message (which was observed when a simpler OR-Tools example was run). This suggests an internal assertion failure or memory corruption within the solver when processing my specific VRP model and data.
teps to Reproduce:
Open a new Google Colaboratory notebook.
Install OR-Tools:
Python
!pip install ortools==9.10.4067 # Or try the latest version if preferredRestart the Colab runtime. (Runtime -> Restart runtime)
Re-run the OR-Tools installation cell (step 2) after restarting.
Paste and run the provided Python code below. (Please provide your simplified code here, ideally the version with 2 locations and relaxed constraints that still crashes).
Expected Behavior:
The OR-Tools VRP solver should either find a solution or indicate that no solution exists (e.g., "No solution found!") within the given time limit. It should not cause a session crash.
Actual Behavior:
The Colab session crashes unexpectedly during routing.SolveWithParameters(search_parameters), often displaying an F0000 error message or similar assertion failure in the console output.
Your Environment:
Operating System: Google Colaboratory (Linux based)
Python Version: (Typically 3.10 or newer on Colab, you can check with !python --version)
OR-Tools Version: 9.13.4784 (or 9.10.4067 when explicitly tested)
Hardware: Google Colaboratory (tested on both standard and Pro tiers, including "High RAM" runtime).
Provided Code (Please paste your problematic VRP code here - the simplified one that still crashes):
# ここに、クラッシュが再現するあなたのPython VRPコード(例えば、訪問地点が2つで制約が緩和されたバージョン)を貼り付けてください。
# 完全なLOCATIONSデータ、create_distance_matrix、create_time_matrix、solve_vrp_nasu関数、print_solution_nasu関数を含めてください。
# コメントで、訪問地点の絞り込み (VISIT_LOCATION_INDICES = [1, 2]) や、
# 時間制約の緩和 (MAX_VEHICLE_TIME = 48 * 3600, time_windows の範囲など) を明記するとより伝わりやすくなります。