COIN-OR::LEMON - Graph Library

Opened 11 years ago

Closed 11 years ago

#202 closed enhancement (duplicate)

faster add row operation for lp interface

Reported by: Tapolcai János Owned by: Alpar Juttner
Priority: major Milestone: LEMON 1.1 release
Component: core Version: hg main
Keywords: LP interface Cc:
Revision id:

Description

A new virtual function is requested for lp_base.h:

virtual int _addRow(ConstRowIterator?, ConstRowIterator?, Value, Value) =0;

in this case replace this function in lp_base.h

Row addRow(Value l,const Expr &e, Value u) {

Row r=addRow(); row(r,l,e,u); return r;

}

by

Row addRow(Value l,const Expr &e, Value u) {

Row r;

e.simplify(); r.id = _addRow(ConstRowIterator?(e.begin(), *this),

ConstRowIterator?(e.end(), *this),l-e.constComp(),u-e.constComp() );

return r;

}

and also this function:

Row addRow(const Constr &c) {

Row r=addRow(); row(r,c); return r;

}

by

Row addRow(const Constr &c) {

Row r=addRow(c.lowerBounded()?c.lowerBound():-INF,

c.expr(), c.upperBounded()?c.upperBound():INF);

return r;

}

also int _addRow(ConstRowIterator?, ConstRowIterator?, Value, Value) must be implemented for each solver. see the attached files

Én CBC-vel használtam a lemon-t, ott ez a trükk sokat gyorsított (bár a cbc-s interface-t magam implementáltam, és lehet hogy ott bénáztam el valamit).

Change History (1)

comment:1 Changed 11 years ago by Alpar Juttner

Resolution: duplicate
Status: newclosed

This ticket is broken. See #203 for the right one.

Note: See TracTickets for help on using tickets.