#20559: InteractiveLPProblem, dictionaries: add_constraint / add_row methods
-------------------------------------+-------------------------------------
       Reporter:  mkoeppe            |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-7.2
      Component:  linear             |   Resolution:
  programming                        |    Merged in:
       Keywords:                     |    Reviewers:  Andrey Novoseltsev
        Authors:  Peijun Xiao        |  Work issues:  rebasing
Report Upstream:  N/A                |       Commit:
         Branch:                     |  2d444bc2f4c5ebca4003ce6b0e20a762e41f49b2
  
u/mkoeppe/interactivelpproblem__dictionaries__add_constraint___add_row_methods| 
    Stopgaps:
   Dependencies:  #20500             |
-------------------------------------+-------------------------------------
Changes (by novoselt):

 * status:  needs_review => needs_work


Comment:

 1. "a 1 by n matrix of the new constraint coefficients" is a bit weird,
 especially since examples show using a list rather than a matrix. I'd
 write just "coefficients of the new constraint"
 2. `new_row` does not reflect very well the meaning, how about
 `coefficients`?..
 3. I think the method for adding constraints should not do input check
 that can be done by the problem constructor - it will reduce code
 duplication and lead to more uniform error messages.
 4. When constructing a new problem, as much of the old one as possible
 should be preserved. The current version does not keep even the type of
 the problem!!!
 5. It should not be necessary to explicitly name a new slack variable.
 6. It would be better not to construct polynomial rings where variables
 leave directly - leave it to the constructor of the problem in case we
 want to do something else later.
 7. I don't think that `add_row` should be supported by abstract
 dictionaries - for the current revised dictionaries I'd say it is
 confusing what does it even mean. And the convoluted code to achieve it
 agrees with me ;-) Rather I'd suggest having it for regular dictionaries
 (perhaps `add_relation` would be a better name). For the revised ones
 `add_constraint`, the same as for the problem with more or less the same
 parameters, would make more sense - since revised dictionaries are linked
 to the problem, they can construct the new one and then based on it
 construct a new suitable dictionary.

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