Skip to content

MixedIntegerLinearProgram.add_constraint: Option to return row indices, fix handling of empty constraints #34878

@mkoeppe

Description

@mkoeppe

(from #21003 comment:136)

... for use with methods that take row indices as input, such as row, row_bounds, remove_constraint.

If a backend does not map a constraint to a unique new row (or check_redundant=True and the constraint is discarded by the frontend), the method may return None.

We also fix a longstanding bug in how empty constraints are handled in add_constraint.

The changed interface (an optional return value) is backward-compatible with user code.

We also add a Feature CVXOPT so that the backend gets tested again.

CC: @mantepse @dimpase

Component: linear programming

Author: Matthias Koeppe, Martin Rubey

Branch/Commit: 3b929f8

Reviewer: Martin Rubey, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/34878

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions