NVIDIA / NVIDIA/cuopt

[BUG] cuOpt VRP solver ignores min_vehicles constraint when fixed costs are included

Open
#904 18 comments 0 reactions 1 assignee View on GitHub

@hlinsen is already working on this.

Since Feb 24, 2026.

awaiting response bug
Dominant language
Cuda
Stars
1k
Forks
233
Avg merge
4d 4h
Merged PRs (30d)
95

Description

When vehicle costs are included in the data VRP data model and min_vehicles constraint is set, cuOpt generates a solution with fewer than min_vehicles constraint value. Likely, this arises when min_vehicles value = total number of vehicles and fixed costs are included.

The expected behavior is for the solver to use no fewer than min_vehicles vehicles and pick the least costly vehicles as dictated by fixed costs.

The following example is where total num vehicles is 3, and they all have fixed costs + min_vehicles = 3, and the resulting solution uses only 1 vehicle.

{ "cost_matrix_data": { "data": { "0": [ [0, 17, 12, 11, 10, 18, 10], [16, 0, 15, 11, 19, 15, 16], [19, 19, 0, 11, 16, 11, 17], [17, 19, 17, 0, 11, 18, 19], [10, 19, 19, 19, 0, 17, 15], [12, 18, 15, 18, 18, 0, 14], [12, 12, 11, 19, 10, 17, 0] ] } }, "fleet_data": { "vehicle_locations": [ [0, 0], [0, 0], [0, 0] ], "vehicle_fixed_costs": [10, 20, 30], "min_vehicles": 3 }, "task_data": { "task_locations": [1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 0], "demand": [[2, 1, 4, 2, 1, 4, -2, -1, -4, -2, -1, -4]] }, "solver_config": { "objectives": { "cost": 1, "vehicle_fixed_cost": 1 } } }

When the vehicle_fixed_cost values are set to 0, the solution uses 3 vehicles, as required by min_vehicles setting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.