Skip to content

cuopt_mcp: warn/error when cuopt_solve_lp is given a model with integer/binary variables #1942

Description

@ramakrishnap-nv

Reported in review on #1916.

`cuopt_solve_lp`/`cuopt_solve_milp` pick a settings schema (`pdlp_settings` vs `mip_settings`) based only on which tool was called, not on the parsed model. After `Read()`, the model's variable types are known — an `.lp` file with a `Generals`/`Binaries` section submitted via `cuopt_solve_lp` silently becomes an LP relaxation (integrality dropped) instead of failing loudly.

Suggestion: in `tools.submit`, after `_read_problem`, check the model's variable types against `kind`; if `kind == "pdlp_settings"` and any variable is integer/binary, raise a clear `CuOptMCPError` telling the caller to use `cuopt_solve_milp` instead (or at minimum return a warning field in the response).

Not done in #1916 to keep that PR's scope to the review items already raised.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

awaiting responseThis expects a response from maintainer or contributor depending on who requested in last comment.improvementImproves an existing functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions