Describe the bug
CUOPT_MIP_PRESOLVE is declared in the public constants header but is not a real parameter:
cpp/include/cuopt/mathematical_optimization/constants.h:66:#define CUOPT_MIP_PRESOLVE "mip_presolve"
It is registered nowhere in cpp/src/math_optimization/solver_settings.cu and referenced nowhere else in the tree, so cuOptSetParameter(settings, CUOPT_MIP_PRESOLVE, ...) is rejected as an unknown parameter.
Comparing the two directions: all 109 distinct parameter names registered in solver_settings.cu are declared in constants.h, and CUOPT_MIP_PRESOLVE is the single declared name with no registration.
Steps/Code to reproduce bug
cuOptSolverSettings settings = NULL;
cuOptCreateSolverSettings(&settings);
cuOptSetParameter(settings, CUOPT_MIP_PRESOLVE, "1"); /* CUOPT_INVALID_ARGUMENT */
Expected behavior
Either register the parameter, or remove the constant. A public header should not advertise a parameter the solver rejects.
Additional context
This matters more than a stray macro because bindings are generated from this header rather than from a runtime list — the approach @mlubin confirmed in #1705. The Java bindings generate CuOptConstants.java from constants.h at build time, so CuOptConstants.CUOPT_MIP_PRESOLVE exists today and any caller using it gets a runtime error. The same would apply to any future Go, Rust, or C# binding generated the same way.
Note there is a separate, real mip_presolve-adjacent parameter set (CUOPT_MIP_PROBING, the CUOPT_MIP_HYPER_HEURISTIC_PRESOLVE_MAX_ROUNDS family), so the fix is not simply renaming — it needs someone who knows whether a mip_presolve toggle was intended.
Found while verifying #1705.
Describe the bug
CUOPT_MIP_PRESOLVEis declared in the public constants header but is not a real parameter:It is registered nowhere in
cpp/src/math_optimization/solver_settings.cuand referenced nowhere else in the tree, socuOptSetParameter(settings, CUOPT_MIP_PRESOLVE, ...)is rejected as an unknown parameter.Comparing the two directions: all 109 distinct parameter names registered in
solver_settings.cuare declared inconstants.h, andCUOPT_MIP_PRESOLVEis the single declared name with no registration.Steps/Code to reproduce bug
Expected behavior
Either register the parameter, or remove the constant. A public header should not advertise a parameter the solver rejects.
Additional context
This matters more than a stray macro because bindings are generated from this header rather than from a runtime list — the approach @mlubin confirmed in #1705. The Java bindings generate
CuOptConstants.javafromconstants.hat build time, soCuOptConstants.CUOPT_MIP_PRESOLVEexists today and any caller using it gets a runtime error. The same would apply to any future Go, Rust, or C# binding generated the same way.Note there is a separate, real
mip_presolve-adjacent parameter set (CUOPT_MIP_PROBING, theCUOPT_MIP_HYPER_HEURISTIC_PRESOLVE_MAX_ROUNDSfamily), so the fix is not simply renaming — it needs someone who knows whether amip_presolvetoggle was intended.Found while verifying #1705.