Opened 9 years ago
Last modified 6 years ago
#14540 closed defect
Fix complicated MILP constraints — at Version 17
Reported by:  ncohen  Owned by:  ncohen 

Priority:  major  Milestone:  sage7.2 
Component:  linear programming  Keywords:  
Cc:  vbraun, dimpase, mkoeppe, vdelecroix, tscrim  Merged in:  
Authors:  Jeroen Demeyer  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/jdemeyer/milp_constraints_do_no_deal_with_python_ints_properly (Commits, GitHub, GitLab)  Commit:  ba7613b12a717f7ca72137d9c91d7edca5f6cbbb 
Dependencies:  Stopgaps: 
Description (last modified by )
sage: p = MixedIntegerLinearProgram() sage: b = p.new_variable() sage: int(1) <= b[0] <= int(2) x_0 <= 2
sage: p = MixedIntegerLinearProgram() sage: b = p.new_variable() sage: b[0] <= 3 <= 4 <= b[1] 4 <= x_1
sage: p = MixedIntegerLinearProgram() sage: b = p.new_variable() sage: float(0) <= b[0] <= int(1) <= b[1] <= float(2) 1 <= x_1 <= 2
sage: p = MixedIntegerLinearProgram() sage: b = p.new_variable() sage: b[0] <= 555*b[1] >= 2 2 <= x_0 <= 555*x_1
Change History (17)
comment:1 Changed 9 years ago by
comment:2 followup: ↓ 3 Changed 9 years ago by
Well, in any script that does not wrap integers with Integer()
. So a .py that you load with %runfile
is ok !
Nathann
comment:3 in reply to: ↑ 2 Changed 9 years ago by
Replying to ncohen:
Well, in any script that does not wrap integers with
Integer()
. So a .py that you load with%runfile
is ok !Nathann
and it's not only int
, but float
, too, that gives this problem.
comment:4 Changed 8 years ago by
 Milestone changed from sage5.11 to sage5.12
comment:5 Changed 8 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:6 Changed 8 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:7 Changed 7 years ago by
 Milestone changed from sage6.3 to sage6.4
comment:8 Changed 6 years ago by
 Description modified (diff)
 Milestone changed from sage6.4 to sage7.2
 Summary changed from MILP constraints are silently misunderstood to MILP constraints do no deal with Python ints properly
comment:9 Changed 6 years ago by
 Description modified (diff)
comment:10 Changed 6 years ago by
I'm investigating this.
comment:11 Changed 6 years ago by
 Description modified (diff)
 Summary changed from MILP constraints do no deal with Python ints properly to MILP constraints do no deal with Python types properly
comment:12 Changed 6 years ago by
comment:13 Changed 6 years ago by
 Branch set to u/jdemeyer/milp_constraints_do_no_deal_with_python_ints_properly
comment:14 Changed 6 years ago by
 Commit set to ba7613b12a717f7ca72137d9c91d7edca5f6cbbb
 Status changed from new to needs_review
New commits:
ba7613b  Fix chained inequalities with nonSage types

comment:15 Changed 6 years ago by
 Cc mkoeppe added
New commits:
ba7613b  Fix chained inequalities with nonSage types

comment:16 Changed 6 years ago by
 Status changed from needs_review to needs_work
It's not completely fixed. Example:
sage: p = MixedIntegerLinearProgram() sage: b = p.new_variable() sage: float(0) <= b[0] <= int(1) <= b[1] <= float(2) 1 <= x_1 <= 2
comment:17 Changed 6 years ago by
 Description modified (diff)
 Summary changed from MILP constraints do no deal with Python types properly to Fix complicated MILP constraints
Allright, let's fix everything on this ticket...
Note: See
TracTickets for help on using
tickets.
In a script
 do you mean a Python script, not Sage script, right?