On 2014-01-17, Erik Quaeghebeur <[email protected]> wrote:
>>> Does MixedIntegerLinearProgram allow for warm restarts, meaning that
>>> after solving a first time one changes the objective and resolve,
>>> starting from the feasible solution of the previous solver run?
>
> Based on the responses by Raniere and John (Thanks), and the implicit
> pointers contained therein, I went to look in the glpk_backend source
> code and the GLPK reference. My conclusion is now that, when using the
> simplex method explicitly:
>
> solver_parameter(backend.glp_simplex_or_intopt,
> backend.glp_simplex_only)
>
one also needs to specify that the dual simplex method is used
(the primal simplex method is not meant for warm restart with adding
constraints, although it should be able to warm-restart after adding
variables...)
The default is primal (according to glpk_backend.pyx)
* - ``primal_v_dual``
- - ``GLP_PRIMAL`` (default)
- ``GLP_DUAL``
- ``GLP_DUALP``
So you'd need to set this (not sure whether it's GLP_DUAL or
GLP_DUALP)
HTH,
Dmitrii
> Then (by GLPK default), presolving is turned off, and then a warm start
> will be performed when the basis still present in the solver object is
> still valid. So this should work when only changing the objective
> function. Otherwise (for constraint add/remove or for bound change), the
> "LP basis constructing routines"
>
> glp_set_row_stat
> glp_set_col_stat
>
> must be used to construct a valid basis before calling the solver again.
> It is not clear to me whether glp_factorize and/or glp_warm_up needs to
> be called. Currently, when removing constraints the sage module creates
> a new basis using the basic crashing routine glp_std_basis (undocumented
> why -- will need to test).
>
>
> Erik
>
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.