-
-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #20296: MixedIntegerLinearProgram: New backend using Interactive…
…LPProblem If one has to solve a small LP with irrational (say, `AA`) data (and needs access to the exact solution), the only available tool is the didactical implementation of the simplex method in `InteractiveLPProblem` (but see #18735). This ticket implements a `MixedIntegerLinearProgram` backend using `InteractiveLPProblem`. Example: {{{ sage: poly = polytopes.dodecahedron(base_ring=AA) sage: lp = poly.to_linear_program(solver='InteractiveLP') sage: b = lp.get_backend() sage: b.set_objective([1, 1, 1]) sage: lp.solve() 2.291796067500631? }}} (This example uses backend functions because of #20301; and the `base_ring=AA` is there because of #13041.) URL: http://trac.sagemath.org/20296 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Andrey Novoseltsev, Dima Pasechnik
- Loading branch information
Showing
9 changed files
with
1,489 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
############################################################################## | ||
# Copyright (C) 2010 Nathann Cohen <nathann.cohen@gmail.com> | ||
# Copyright (C) 2016 Matthias Koeppe <mkoeppe@math.ucdavis.edu> | ||
# Distributed under the terms of the GNU General Public License (GPL) | ||
# The full text of the GPL is available at: | ||
# http://www.gnu.org/licenses/ | ||
############################################################################## | ||
|
||
from sage.numerical.backends.generic_backend cimport GenericBackend | ||
|
||
cdef class InteractiveLPBackend(GenericBackend): | ||
|
||
cdef object lp | ||
cdef object row_names | ||
cdef object prob_name | ||
|
||
cdef object lp_std_form | ||
cdef object final_dictionary | ||
cdef int verbosity | ||
|
||
cpdef dictionary(self) | ||
|
||
cpdef interactive_lp_problem(self) |
Oops, something went wrong.