Skip to content

chained inequalities bug in add_constraint to MixedIntegerLinearProgram #12091

@dimpase

Description

@dimpase

This ticket was originally started to address problems now dealt with in #13646.
Still, the following (chained inequalities don't work) needs to be fixed:

sage: p = MixedIntegerLinearProgram()
sage: b = p.new_variable()
sage: b[0] <= b[1] <= 2  # This is not ok
x_1 <= 2
sage: (b[0] <= b[1] <= 2).constraints # Not ok
[x_1, 2]
sage: 1 >= b[1] >= 2*b[0] # Not ok (note that without #13646 this returns False)
2 x_0 <= x_1
sage: b[2] >= b[1] >= 2*b[0]  # Not ok
2 x_0 <= x_1

See also this sage-support thread.

Apply

Depends on #13650

CC: @nathanncohen @kini @vbraun

Component: linear programming

Author: Volker Braun

Reviewer: Dmitrii Pasechnik

Merged: sage-5.5.rc0

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions