#10341: make MIP backend interface more Python-ic
----------------------------------------------+-----------------------------
   Reporter:  malb                            |       Owner:  ncohen    
       Type:  enhancement                     |      Status:  needs_work
   Priority:  major                           |   Milestone:  sage-4.6.1
  Component:  linear programming              |    Keywords:  LP, MIP   
     Author:  Martin Albrecht, Nathann Cohen  |    Upstream:  N/A       
   Reviewer:                                  |      Merged:            
Work_issues:                                  |  
----------------------------------------------+-----------------------------

Comment(by ncohen):

 Replying to [comment:22 malb]:
 > Did you check my patch? For some reason p.show() still works, or is the
 doctest not enough to ensure this?

 Well, if your doctests pass then I guess the docstring is not enough.
 Anyway, for the moment the variable's names are just "cached" inside of
 MixedIntegerLinearProgram, because I thought stupid to call routines to
 updates the names unless someone wants to show() it or to export it to a
 file (which one never does when actually trying to solve them). There is a
 method named update_variable_name, which you commented in your patch,
 which does just that : before print show() or exporting the result, it
 updates the variable's names. This is the only way for the variables to
 have a name, and as it is usually done after the LP has been generated, it
 has to use the set_col_name commands. I remember having written somewhere
 that it was broken at some point, but I am never too eager to deal with
 this name mess.

 Oh, of course everything works fine if you comment #update_variable_names.
 The .show() method will just print x_1, x_2, etc and the .lp and .mps
 files will have the same kind of names. I do not think it is that awful,
 and removing all this name-related stuff from the class will just make it
 easier to work with.

 I mean, it would have been nice to be able to deal with names, but :

     * The solvers all have a different way to deal with them. If we want
 to be able to deal with them all, we'll just end up with an awkward
 interface
     * You don't use them, I don't use them, they play no part in the
 actual solving of LP which stil;l has to be considered the main point here
     * The LP file formats deal with names, the solver's libraries too, but
 then again people write LP in languages like AMPL or Mathprog (for GLPK),
 which have a very basic set of commands available as they are only meant
 to deal with LP. In Sage, we have Python which is infinitely more
 expressive...

 It looks like a lot of work for something we're not even sure we can
 use...

 Nathann

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10341#comment:23>
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.

Reply via email to