Skip to content

Add piecewise cumul costs - #84

Open
erickreutz wants to merge 1 commit into
ankane:masterfrom
lugg:eric/upstream-piecewise-cumul-costs
Open

Add piecewise cumul costs#84
erickreutz wants to merge 1 commit into
ankane:masterfrom
lugg:eric/upstream-piecewise-cumul-costs

Conversation

@erickreutz

@erickreutz erickreutz commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

RoutingDimension::SetCumulVarPiecewiseLinearCost is excluded from generated language bindings, which prevents Ruby routing models from expressing progressive cumul costs without callbacks. This exposes it as set_cumul_var_piecewise_linear_cost with Ruby breakpoint and slope arrays.

The binding validates shape, ordering, and nonnegative cost before calling native constructors that otherwise use fatal checks. OR-Tools copies the curve into the model, so the solve retains no Ruby objects. The coverage exercises objective behavior, warm solves, copied ownership, disabled behavior, and invalid inputs.

Expose native piecewise cumul costs with Ruby arrays and validate inputs before OR-Tools reaches fatal checks.
@erickreutz erickreutz changed the title feat(routing): Add piecewise cumul costs Add piecewise cumul costs Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant