#16714: Add a matrix of constraints in a LP
-------------------------------------+-------------------------------------
       Reporter:  ncohen             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  linear             |   Resolution:
  programming                        |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Volker Braun       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  0090edc953f5930e0a10b0c981e99c317db6c27c
  u/vbraun/add_a_matrix_of_constraints_in_a_lp|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by dimpase):

 Replying to [comment:32 ncohen]:
 > `add_linear_constraints` is supposed to work, and if not how you'd
 envision it to work. Create empty rows and then mutate later? Or is the
 constraint data just missing from the argspec? or what?
 >
 > I guess that it is meant to allocate space for new rows, before changing
 the coefficient. As I said above I implemented this function only to
 expose those that are available in the solvers, and they do the very same
 thing (if not `less).

 GUROBI does have [http://www.gurobi.com/documentation/5.6/reference-
 manual/c_grbaddconstrs `GRBaddconstrs`] which a full thing, in the sense
 you can specify a bunch of constraints, specified by a sparse matrix, at
 once.

 >
 > GLPK: takes only a number of rows as an argument. Nothing else
 > {{{
 > glp_add_rows(self.lp, number)
 > }}}
 >
 > Cplex: takes a number of rows and the corresponding upper/lower bound.
 Plus names
 >
 > {{{
 > CPXnewrows(self.env, self.lp, number, bound, sense, rng, c_names if
 names else NULL) #
 > }}}

 there is
 
[http://web.njit.edu/all_topics/Prog_Lang_Docs/cplex80/doc/refman/html/addrows.html
 `CPXaddrows`] in CPLEX, similar to the one in GUROBI.

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

Reply via email to