Opened 7 years ago
Last modified 16 months ago
#20331 closed enhancement
MIPVariable misreports its dimension (always 1) — at Version 2
Reported by: | Matthias Köppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.4 |
Component: | numerical | Keywords: | lp |
Cc: | Dima Pasechnik, Vincent Delecroix, Jeroen Demeyer, Yuan Zhou | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
sage: p = MixedIntegerLinearProgram(solver="glpk") sage: bar = p.new_variable(name="bar") sage: bar MIPVariable of dimension 1 sage: bar[0] x_0 sage: bar MIPVariable of dimension 1 sage: bar[1] x_1 sage: bar MIPVariable of dimension 1 sage: p.solve() 0.0 sage: bar.values() [x_0, x_1] sage: p.get_values(bar) {0: 0.0, 1: 0.0}
I think the print method should also print some useful information, such as the name of the variable.
Change History (2)
comment:1 Changed 7 years ago by
Cc: | Dima Pasechnik Vincent Delecroix Jeroen Demeyer added |
---|
comment:2 Changed 7 years ago by
Description: | modified (diff) |
---|
Note: See
TracTickets for help on using
tickets.