#18734: Construct an interactive_simplex_method.LPDictionary from a
MixedIntegerLinearProgram
-------------------------------------+-------------------------------------
       Reporter:  mkoeppe            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  numerical          |   Resolution:
       Keywords:  lp                 |    Merged in:
        Authors:  Aedi Wang,         |    Reviewers:
  Matthias Koeppe                    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  b17dd3a6524557b668870c60820c49443bdf44e6
  
u/mkoeppe/construct_an_interactive_simplex_method_lpdictionary_from_a_mixedintegerlinearprogram|
     Stopgaps:
   Dependencies:  #18685, #18732     |
-------------------------------------+-------------------------------------

Comment (by dimpase):

 you don't seem to need `slack_names` if `form is None`, why would you
 always create them?

 {{{
 +        # Construct slack names
 +        slack_names = [format(back_end.row_name(i), 'w', i) for i in
 range(back_end.nrows())]
 +
 +        A = coef_matrix
 +        b = upper_bound_vector
 +        c = objective_coefs_vector
 +        x = var_names
 +        w = slack_names
 +
 +        if form is None:
 +            from sage.numerical.interactive_simplex_method import
 InteractiveLPProblem
 +            return InteractiveLPProblem(A, b, c, x), None
 +        elif form == 'standard' or form == 'std':
 +            from sage.numerical.interactive_simplex_method import
 InteractiveLPProblemStandardForm
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/18734#comment:46>
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 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to