#10785: Setting solver-specific options
----------------------------------+-----------------------------------------
Reporter: ncohen | Owner: ncohen
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.8
Component: linear programming | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Nathann Cohen
Merged: | Dependencies:
----------------------------------+-----------------------------------------
Comment(by fichtejo):
The lastest developper's version does not work for me. I have an build
issue on ubuntu, so we have to postpone that one.
A short (hopefully better) description of the problem above:[[BR]]The code
online linked in trac is the latest developper's code, is't it?
When we create a new instance of a MixedIntegerLinearProgram (see
http://trac.sagemath.org/sage_trac/browser/sage/numerical/mip.pyx#L200)
like
{{{
p = MixedIntegerLinearProgram(maximization=True)
}}}
''', '''we call
{{{
get_solver(solver=solver, constraint_generation=constraint_generation)
}}}
Then '''get_solver'''(...) checks for a solver (e.g. CPLEX see
http://trac.sagemath.org/sage_trac/browser/sage/numerical/backends/generic_backend.pyx#L90),
but the solver is required to be a string, not an instance of a solver.
Since MixedIntegerLinearProgram uses get_solver to obtain a solver,
get_solver requires a string in the input, and the backend is hidden in
the !MixedIntegerLinearProgram, we will never be able to use the solver
with special parameters in an instance of MixedIntegerLinearProgramm, e.g:
{{{
my_solver = get_solver(solver = "CPLEX")
my_solver.solver_parameter("timelimit", 60)
p = MixedIntegerLinearProgram(solver=my_solver)
}}}
will fail. I do not see this addressed in the patch.
But I may be mistaken?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10785#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.