Opened 9 years ago

Closed 9 years ago

#12546 closed defect (duplicate)

Inequalities in MixedIntegerLinearProgram are not properly handled

Reported by: ppurka Owned by: ncohen
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: linear programming Keywords: MixedIntegerLinearProgram LinearConstraint LinearFunction
Cc: dimpase Merged in:
Authors: Reviewers: Dmitrii Pasechnik, Punarbasu Purkayastha
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The <= and >= inequalities are not properly handled in MixedIntegerLinearProgram - essentially in both sage.numerical.mip.LinearConstraint and sage.numerical.mip.LinearFunction. Here is an example:

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: b[0] >= b[1] # This is ok
x_1 <= x_0
sage: 1 >= b[1]    # This is not since it starts with a constant
False
sage: 1 >= b[1] >= 2*b[0] # Not ok
False
sage: b[2] >= b[1] >= 2*b[0]  # Not ok
2 x_0 <= x_1

Change History (7)

comment:1 Changed 9 years ago by dimpase

  • Status changed from new to needs_review

this is a duplicate of #12091, right?

comment:2 follow-up: Changed 9 years ago by ppurka

This is dupe of #12091. Please close. I don't see the option to close tickets. ( I got no powers :'( )

comment:3 in reply to: ↑ 2 Changed 9 years ago by dimpase

  • Status changed from needs_review to positive_review

Replying to ppurka:

This is dupe of #12091. Please close. I don't see the option to close tickets. ( I got no powers :'( )

Me neither, but we can positively review it to its quick and painless demise.

Hoogedelgeleerde Release Manager, AUB, dit is een dupe...

comment:4 follow-up: Changed 9 years ago by ncohen

  • Milestone changed from sage-5.0 to sage-duplicate/invalid/wontfix

This + "positive review" is the standard incantation :-)

Nathann

comment:5 in reply to: ↑ 4 ; follow-up: Changed 9 years ago by dimpase

Replying to ncohen:

This + "positive review" is the standard incantation :-)

Nathann

natuurlijk, als u nu in Brussel woont, moet u ook de laatste woord, "dupe", ofwel "slachtoffer", kennen :)

comment:6 in reply to: ↑ 5 Changed 9 years ago by ncohen

natuurlijk, als u nu in Brussel woont, moet u ook de laatste woord, "dupe", ofwel "slachtoffer", kennen :)

My god. This last incantation is not in my book. Hopefully Jeroen will understand :-D

Nathann

comment:7 Changed 9 years ago by jdemeyer

  • Resolution set to duplicate
  • Reviewers set to Dmitrii Pasechnik, Punarbasu Purkayastha
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.