Opened 16 years ago
Last modified 15 years ago
#203 closed enhancement
faster addRow operation for LP — at Initial Version
Reported by: | Tapolcai János | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.2 release |
Component: | core | Version: | hg main |
Keywords: | LP interface | Cc: | |
Revision id: |
Description
A new function is requested in lp_base.h:
virtual int _addRow(ConstRowIterator?, ConstRowIterator?, Value, Value) =0;
int this cae the following two function can be replaced in lp_base.h 1.
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;
}
2.
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;
}
For each solver a new int _addRow(ConstRowIterator?, ConstRowIterator?, Value, Value) function must be implemented (see also the attached files).