Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
lp.h
Go to the documentation of this file.
1
30#pragma once
31
36
37
38#pragma GCC visibility push(default)
39namespace abacus {
40
41class Master;
42class SparVec;
43class Row;
44class Column;
45
46
48
71class OGDF_EXPORT LP : public AbacusRoot {
72public:
73
75 enum OPTSTAT {
77 Unoptimized,
80 Feasible,
84 LimitReached
85 };
86
88 enum SOLSTAT {
90 Missing
91 };
92
101
103
106 LP (Master *master) :
107 master_(master),
108 optStat_(Unoptimized),
109 xValStatus_(Missing),
110 barXValStatus_(Missing),
111 yValStatus_(Missing),
112 recoStatus_(Missing),
113 slackStatus_(Missing),
114 basisStatus_(Missing),
115 nOpt_(0)
116 { }
117
119 virtual ~LP () { }
120
137 friend OGDF_EXPORT std::ostream &operator<<(std::ostream& out, const LP& rhs);
138
162 OptSense sense,
163 int nRow,
164 int maxRow,
165 int nCol,
166 int maxCol,
167 Array<double> &obj,
168 Array<double> &lBound,
169 Array<double> &uBound,
170 Array<Row*> &rows) {
171 _initialize(sense, nRow, maxRow, nCol, maxCol, obj, lBound, uBound, rows);
172 }
173
191 OptSense sense,
192 int nRow, int maxRow,
193 int nCol, int maxCol,
194 Array<double> &obj,
195 Array<double> &lBound,
196 Array<double> &uBound,
197 Array<Row*> &rows,
198 Array<LPVARSTAT::STATUS> &lpVarStat,
199 Array<SlackStat::STATUS> &slackStat) {
200 _initialize(sense, nRow, maxRow, nCol, maxCol, obj, lBound, uBound, rows);
201 loadBasis(lpVarStat,slackStat);
202 }
203
204
210 virtual void loadBasis(
211 Array<LPVARSTAT::STATUS> &lpVarStat,
212 Array<SlackStat::STATUS> &slackStat) {
213 _loadBasis(lpVarStat,slackStat);
214 }
215
216 OptSense sense() const { return _sense(); }
217
218 void sense(const OptSense &newSense) { _sense(newSense); }
219
220 int nRow() const { return _nRow(); }
221
222 int maxRow() const { return _maxRow(); }
223
224 int nCol() const { return _nCol(); }
225
226 int maxCol() const { return _maxCol(); }
227
228 int nnz() const { return _nnz(); }
229
230 double obj(int i) const {
231#ifdef OGDF_DEBUG
232 colRangeCheck(i);
233#endif
234 return _obj(i);
235 }
236
237 double lBound(int i) const {
238#ifdef OGDF_DEBUG
239 colRangeCheck(i);
240#endif
241 return _lBound(i);
242 }
243
244 double uBound(int i) const {
245#ifdef OGDF_DEBUG
246 colRangeCheck(i);
247#endif
248 return _uBound(i);
249 }
250
251 void row(int i, Row &r) const {
252#ifdef OGDF_DEBUG
253 rowRangeCheck(i);
254#endif
255 _row(i, r);
256 }
257
258 double rhs(int i) const {
259#ifdef ABACUSSAFE
260 rowRangeCheck(i);
261#endif
262 return _rhs(i);
263 }
264
265 virtual double value() const { return _value(); }
266
267 virtual double xVal(int i) const {
268#ifdef OGDF_DEBUG
269 colRangeCheck(i);
270#endif
271 return _xVal(i);
272 }
273
274 virtual double barXVal(int i) const {
275#ifdef OGDF_DEBUG
276 colRangeCheck(i);
277#endif
278 return _barXVal(i);
279 }
280
281 virtual double reco(int i) const {
282#ifdef OGDF_DEBUG
283 colRangeCheck(i);
284#endif
285 return _reco(i);
286 }
287
288 virtual double yVal(int c) const {
289#ifdef OGDF_DEBUG
290 rowRangeCheck(c);
291#endif
292 return _yVal(c);
293 }
294
295 virtual double slack(int c) const {
296#ifdef OGDF_DEBUG
297 rowRangeCheck(c);
298#endif
299 return _slack(c);
300 }
301
302 SOLSTAT xValStatus() const { return xValStatus_; }
303
304 SOLSTAT barXValStatus() const { return barXValStatus_; }
305
306 SOLSTAT yValStatus() const { return yValStatus_; }
307
308 SOLSTAT recoStatus() const { return recoStatus_; }
309
310 SOLSTAT slackStatus() const { return slackStatus_; }
311
312 SOLSTAT basisStatus() const { return basisStatus_; }
313
314 int nOpt() const { return nOpt_; }
315
316 virtual bool infeasible() const {
317 return ( optStat_ == Infeasible );
318 }
319
320
347 virtual int getInfeas(int &infeasRow, int &infeasCol, double *bInvRow) const {
348 return _getInfeas(infeasRow,infeasCol,bInvRow);
349 }
350
351 virtual LPVARSTAT::STATUS lpVarStat(int i) const {
352#ifdef OGDF_DEBUG
353 colRangeCheck(i);
354#endif
355 return _lpVarStat(i);
356 }
357
358 virtual SlackStat::STATUS slackStat(int i) const {
359#ifdef OGDF_DEBUG
360 rowRangeCheck(i);
361#endif
362 return _slackStat(i);
363 }
364
371 virtual OPTSTAT optimize(METHOD method);
372
378 initPostOpt();
379 _remRows(ind);
380 }
381
390
396 initPostOpt();
397 _remCols(cols);
398 }
399
408
413 void changeRhs(Array<double> &newRhs) {
414 initPostOpt();
415 _changeRhs(newRhs);
416 }
417
423 virtual void changeLBound(int i, double newLb);
424
430 virtual void changeUBound(int i, double newUb);
431
441
446 void rowRealloc(int newSize) {
447 _rowRealloc(newSize);
448 }
449
454 void colRealloc(int newSize) {
455 _colRealloc(newSize);
456 }
457
458
467 int writeBasisMatrix(const char *fileName);
468
477 return _setSimplexIterationLimit(limit);
478 }
479
486 int getSimplexIterationLimit(int &limit) const {
487 return _getSimplexIterationLimit(limit);
488 }
489
490 ogdf::StopwatchCPU* lpSolverTime() { return &lpSolverTime_; }
491
492protected:
493
502 void colsNnz(int nRow, Array<Row*> &rows, Array<int> &nnz);
503
518 void rows2cols(int nRow, Array<Row*> &rows,
519 Array<SparVec*> &cols);
520
525 void rowRangeCheck(int r) const;
526
531 void colRangeCheck(int i) const;
532
536 virtual OptSense _sense() const = 0;
537 virtual void _sense(const OptSense &newSense) = 0;
538
542 virtual int _nRow() const = 0;
543
547 virtual int _maxRow() const = 0;
548
552 virtual int _nCol() const = 0;
553
557 virtual int _maxCol() const = 0;
558
564 virtual int _nnz() const = 0;
565
570 virtual double _obj(int i) const = 0;
571
575 virtual double _lBound(int i) const = 0;
576
580 virtual double _uBound(int i) const = 0;
581
585 virtual double _rhs(int i) const = 0;
586
590 virtual void _row(int i, Row &r) const = 0;
591
605 virtual void _initialize(OptSense sense, int nRow, int maxRow,
606 int nCol, int maxCol,
607 Array<double> &obj, Array<double> &lBound,
608 Array<double> &uBound, Array<Row*> &rows) = 0;
609
615 virtual void _loadBasis(Array<LPVARSTAT::STATUS> &lpVarStat,
616 Array<SlackStat::STATUS> &slackStat) = 0;
617
622 virtual OPTSTAT _primalSimplex() = 0;
623
628 virtual OPTSTAT _dualSimplex() = 0;
629
634 virtual OPTSTAT _barrier(bool doCrossover) = 0;
635
640 virtual OPTSTAT _approx() = 0;
641
646 virtual double _value() const = 0;
647
652 virtual double _xVal(int i) const = 0;
653 virtual double _barXVal(int i) const = 0;
654
658 virtual double _reco(int i) const = 0;
659
663 virtual double _slack(int i) const = 0;
664
669 virtual double _yVal(int i) const = 0;
670
675 virtual LPVARSTAT::STATUS _lpVarStat(int i) const = 0;
676
681 virtual SlackStat::STATUS _slackStat(int i) const = 0;
682
695 virtual int _getInfeas(int &infeasRow, int &infeasCol,
696 double *bInvRow) const = 0;
697
702 virtual void _remRows(ArrayBuffer<int> &ind) = 0;
703
708 virtual void _addRows(ArrayBuffer<Row*> &newRows) = 0;
709
714 virtual void _remCols(ArrayBuffer<int> &vars) = 0;
715
720 virtual void _addCols(ArrayBuffer<Column*> &newCols) = 0;
721
726 virtual void _changeRhs(Array<double> &newRhs) = 0;
727
732 virtual void _changeLBound(int i, double newLb) = 0;
733
738 virtual void _changeUBound(int i, double newUb) = 0;
739
750
756 virtual void _rowRealloc(int newSize) = 0;
757
762 virtual void _colRealloc(int newSize) = 0;
763
772 virtual int _setSimplexIterationLimit(int limit) = 0;
773
783 virtual int _getSimplexIterationLimit(int &limit) const = 0;
784
788
792
799
806
812
819
827
830 int nOpt_;
832
833private:
834
842 void initPostOpt() {
843 optStat_= Unoptimized;
844 xValStatus_= barXValStatus_= recoStatus_= Missing;
845 slackStatus_= yValStatus_= basisStatus_= Missing;
846 }
847
848 LP(const LP &rhs);
849 const LP &operator=(const LP &rhs);
850};
851
852
853#if 0
854inline OptSense LP::sense() const
855{
856 return _sense();
857}
858
859inline void LP::sense(const OptSense &newSense)
860{
861 _sense(newSense);
862}
863
864inline int LP::nRow() const
865{
866 return _nRow();
867}
868
869inline int LP::maxRow() const
870{
871 return _maxRow();
872}
873
874inline int LP::nCol() const
875{
876 return _nCol();
877}
878
879inline int LP::maxCol() const
880{
881 return _maxCol();
882}
883
884inline int LP::nnz() const
885{
886 return _nnz();
887}
888
889inline double LP::obj(int i) const
890{
891#ifdef OGDF_DEBUG
892 colRangeCheck(i);
893#endif
894 return _obj(i);
895}
896
897inline double LP::lBound(int i) const
898{
899#ifdef OGDF_DEBUG
900 colRangeCheck(i);
901#endif
902 return _lBound(i);
903}
904
905inline double LP::uBound(int i) const
906{
907#ifdef OGDF_DEBUG
908 colRangeCheck(i);
909#endif
910 return _uBound(i);
911}
912
913inline void LP::row(int i, Row &r) const
914{
915#ifdef OGDF_DEBUG
916 rowRangeCheck(i);
917#endif
918 _row(i, r);
919}
920
921inline double LP::rhs(int i) const
922{
923#ifdef ABACUSSAFE
924 rowRangeCheck(i);
925#endif
926 return _rhs(i);
927}
928
929inline double LP::value() const
930{
931 return _value();
932}
933
934inline double LP::xVal(int i)
935{
936#ifdef OGDF_DEBUG
937 colRangeCheck(i);
938#endif
939 return _xVal(i);
940}
941
942inline double LP::barXVal(int i)
943{
944#ifdef OGDF_DEBUG
945 colRangeCheck(i);
946#endif
947 return _barXVal(i);
948}
949
950inline double LP::reco(int i)
951{
952#ifdef OGDF_DEBUG
953 colRangeCheck(i);
954#endif
955 return _reco(i);
956}
957
958inline double LP::yVal(int c)
959{
960#ifdef OGDF_DEBUG
961 rowRangeCheck(c);
962#endif
963 return _yVal(c);
964}
965
966inline double LP::slack(int c)
967{
968#ifdef OGDF_DEBUG
969 rowRangeCheck(c);
970#endif
971 return _slack(c);
972}
973
974inline LP::SOLSTAT LP::xValStatus() const
975{
976 return xValStatus_;
977}
978
979inline LP::SOLSTAT LP::barXValStatus() const
980{
981 return barXValStatus_;
982}
983
984inline LP::SOLSTAT LP::recoStatus() const
985{
986 return recoStatus_;
987}
988
989inline LP::SOLSTAT LP::yValStatus() const
990{
991 return yValStatus_;
992}
993
994inline LP::SOLSTAT LP::slackStatus() const
995{
996 return slackStatus_;
997}
998
999inline LP::SOLSTAT LP::basisStatus() const
1000{
1001 return basisStatus_;
1002}
1003
1004inline int LP::nOpt() const
1005{
1006 return nOpt_;
1007}
1008
1009inline bool LP::infeasible() const
1010{
1011 if (optStat_ == Infeasible) return true;
1012 else return false;
1013}
1014
1015inline LPVARSTAT::STATUS LP::lpVarStat(int i)
1016{
1017#ifdef OGDF_DEBUG
1018 colRangeCheck(i);
1019#endif
1020 return _lpVarStat(i);
1021}
1022
1023inline SlackStat::STATUS LP::slackStat(int i)
1024{
1025#ifdef OGDF_DEBUG
1026 rowRangeCheck(i);
1027#endif
1028 return _slackStat(i);
1029}
1030#endif
1031
1032}
1033#pragma GCC visibility pop
Declaration of stopwatch classes.
Base class of all other classes of ABACUS.
Definition abacusroot.h:69
Linear programs.
Definition lp.h:71
virtual int _getInfeas(int &infeasRow, int &infeasCol, double *bInvRow) const =0
The pure virtual function _getInfeas() must be defined by the used LP-solver and can be called if the...
void row(int i, Row &r) const
Definition lp.h:251
virtual void _loadBasis(Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat)=0
This pure virtual function should load a basis into the LP-solver.
virtual bool infeasible() const
Definition lp.h:316
virtual OPTSTAT _primalSimplex()=0
The pure virtual function _primalSimplex() must be defined by the used LP-solver and should call the ...
virtual int _setSimplexIterationLimit(int limit)=0
The function setSimplexIterationLimit() changes the iteration limit of the Simplex algorithm.
void initPostOpt()
Resets the optimization status and the availability statuses of the solution.
Definition lp.h:842
SOLSTAT slackStatus() const
Definition lp.h:310
virtual int pivotSlackVariableIn(ArrayBuffer< int > &rows)
Pivots the slack variables stored in the buffer rows into the basis.
virtual void _initialize(OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lBound, Array< double > &uBound, Array< Row * > &rows)=0
The pure virtual function _initialize() must be defined by the used LP-solver and should initialize t...
void remCols(ArrayBuffer< int > &cols)
Removes columns from the linear program.
Definition lp.h:395
virtual double _value() const =0
The pure virtual function _value() must be defined by the used LP-solver and should return the optimu...
int nnz() const
Definition lp.h:228
double rhs(int i) const
Definition lp.h:258
Master * master_
A pointer to the corresponding master of the optimization.
Definition lp.h:787
virtual LPVARSTAT::STATUS lpVarStat(int i) const
Definition lp.h:351
int maxRow() const
Definition lp.h:222
virtual void _changeRhs(Array< double > &newRhs)=0
The pure virtual function _changeRhs() must be defined by the used LP-solver and should set the right...
virtual int _nCol() const =0
The pure virtual function _nCol() must be defined by the used LP-solver and return the number of colu...
virtual double _xVal(int i) const =0
The pure virtual function _xVal() must be defined by the used LP-solver and should return the value o...
SOLSTAT yValStatus() const
Definition lp.h:306
virtual int _getSimplexIterationLimit(int &limit) const =0
The function getSimplexIterationLimit() retrieves the value of the iteration limit of the simplex alg...
OPTSTAT
The optimization status of the linear program.
Definition lp.h:75
@ Optimal
The optimal solution has been computed.
Definition lp.h:76
@ Infeasible
The linear program is primal infeasible.
Definition lp.h:82
@ Unbounded
The linear program is unbounded.
Definition lp.h:83
@ Error
An error has happened during optimization.
Definition lp.h:79
void initialize(OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lBound, Array< double > &uBound, Array< Row * > &rows, Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat)
This version of the function initialize() performs like its previous version, but also initializes th...
Definition lp.h:190
LP(const LP &rhs)
ogdf::StopwatchCPU * lpSolverTime()
Definition lp.h:490
virtual double _reco(int i) const =0
The pure virtual function _reco() must be defined by the used LP-solver and should return the reduced...
SOLSTAT yValStatus_
This member becomes Available if the values of the dual variables of the optimal solution can be acce...
Definition lp.h:805
virtual double xVal(int i) const
Definition lp.h:267
virtual void _remCols(ArrayBuffer< int > &vars)=0
The pure virtual function _remCols() must be defined by the used LP-solver and should remove the colu...
virtual double _rhs(int i) const =0
The pure virtual function _rhs() must be defined by the used LP-solver and return the right hand side...
virtual OPTSTAT _approx()=0
The pure virtual function _approx() must be defined by the used LP-solver and should call the approxi...
virtual void _addCols(ArrayBuffer< Column * > &newCols)=0
The pure virtual function _addCols() must be defined by the used LP-solver and should add the columns...
virtual void changeUBound(int i, double newUb)
Changes the upper bound of a single column.
OPTSTAT optStat_
The status of the linear program.
Definition lp.h:791
virtual double reco(int i) const
Definition lp.h:281
SOLSTAT xValStatus_
This member becomes Available if the -values of the optimal solution can be accessed with the functio...
Definition lp.h:797
virtual void _addRows(ArrayBuffer< Row * > &newRows)=0
The pure virtual function _addRows() must be defined by the used LP-solver and should add the rows gi...
SOLSTAT barXValStatus_
Definition lp.h:798
void rows2cols(int nRow, Array< Row * > &rows, Array< SparVec * > &cols)
Computes the columnwise representation of the row matrix.
int nCol() const
Definition lp.h:224
virtual int _maxRow() const =0
The pure virtual function _maxRow() must be defined by the used LP-solver and return the maximal numb...
void rowRealloc(int newSize)
Performs a reallocation of the row space of the linear program.
Definition lp.h:446
virtual double _yVal(int i) const =0
The pure virtual function _yVal() must be defined by the used LP-solver and should return the value o...
SOLSTAT basisStatus_
This member becomes Available if the status of the variables and the slack variables of the optimal s...
Definition lp.h:826
double lBound(int i) const
Definition lp.h:237
void colsNnz(int nRow, Array< Row * > &rows, Array< int > &nnz)
Computes the number of nonzero elements in each column of a given set of rows.
virtual double yVal(int c) const
Definition lp.h:288
virtual int _nnz() const =0
The pure virtual function _nnz() must be defined by the used LP-solver and return the number of nonze...
SOLSTAT recoStatus_
This member becomes Available if the reduced costs of the optimal solution can be accessed with the f...
Definition lp.h:811
virtual LPVARSTAT::STATUS _lpVarStat(int i) const =0
The pure virtual function _lpVarStat() must be defined by the used LP-solver and should return the st...
virtual void _colRealloc(int newSize)=0
The pure virtual function _colRealloc() must be defined by the used LP-solver and should reallocate i...
virtual double slack(int c) const
Definition lp.h:295
OptSense sense() const
Definition lp.h:216
virtual double _barXVal(int i) const =0
virtual double _obj(int i) const =0
The pure virtual function _obj() must be defined by the used LP-solver and return the objective funct...
friend std::ostream & operator<<(std::ostream &out, const LP &rhs)
The output operator writes the objective function, followed by the constraints, the bounds on the col...
virtual OPTSTAT _dualSimplex()=0
The pure virtual function _dualSimplex() must be defined by the used LP-solver and should call the du...
virtual double _slack(int i) const =0
The pure virtual function _slack() must be defined by the used LP-solver and should return the value ...
void colRangeCheck(int i) const
Terminates the program if there is no column with index i.
SOLSTAT basisStatus() const
Definition lp.h:312
virtual double value() const
Definition lp.h:265
void addRows(ArrayBuffer< Row * > &newRows)
Adds rows to the linear program.
virtual SlackStat::STATUS slackStat(int i) const
Definition lp.h:358
METHOD
The solution method for the linear program.
Definition lp.h:94
@ Dual
The dual simplex method.
Definition lp.h:96
@ BarrierAndCrossover
The barrier method followed by a crossover to a basis.
Definition lp.h:97
@ BarrierNoCrossover
The barrier method without crossover.
Definition lp.h:98
@ Primal
The primal simplex method.
Definition lp.h:95
void colRealloc(int newSize)
Performs a reallocation of the column space of the linear program.
Definition lp.h:454
const LP & operator=(const LP &rhs)
virtual void _remRows(ArrayBuffer< int > &ind)=0
The pure virtual function _remRows() must be defined by the used LP-solver and should remove the rows...
void remRows(ArrayBuffer< int > &ind)
Removes rows of the linear program.
Definition lp.h:377
virtual int getInfeas(int &infeasRow, int &infeasCol, double *bInvRow) const
Can be called if the last linear program has been solved with the dual simplex method and is infeasib...
Definition lp.h:347
LP(Master *master)
Creates a linear program.
Definition lp.h:106
virtual void _row(int i, Row &r) const =0
The pure virtual function _row() must be defined by the used LP-solver and store the i-th row of the ...
virtual int _pivotSlackVariableIn(ArrayBuffer< int > &rows)=0
The function pivotSlackVariableIn() pivots the slack variables stored in the buffer rows into the bas...
void changeRhs(Array< double > &newRhs)
Changes the complete right hand side of the linear program.
Definition lp.h:413
virtual void changeLBound(int i, double newLb)
Changes the lower bound of a single column.
int writeBasisMatrix(const char *fileName)
Writes the complete basis of an optimal linear program to a file.
int nOpt_
The number of optimizations of the linear program.
Definition lp.h:830
SOLSTAT slackStatus_
This member becomes Available if the values of the slack variables of the optimal solution can be acc...
Definition lp.h:818
virtual OPTSTAT _barrier(bool doCrossover)=0
The pure virtual function _barrier() must be defined by the used LP-solver and should call the barrie...
virtual OPTSTAT optimize(METHOD method)
Performs the optimization of the linear program.
double uBound(int i) const
Definition lp.h:244
virtual OptSense _sense() const =0
The pure virtual function _sense() must be defined by the used LP-solver and return the sense of the ...
ogdf::StopwatchCPU lpSolverTime_
Definition lp.h:831
virtual ~LP()
The destructor.
Definition lp.h:119
virtual int _maxCol() const =0
The pure virtual function _maxCol() must be defined by the the used LP-solver and return the maximal ...
double obj(int i) const
Definition lp.h:230
virtual void _changeUBound(int i, double newUb)=0
The pure virtual function _changeLBound() must be defined by the used LP-solver and should set the up...
int nRow() const
Definition lp.h:220
virtual double _lBound(int i) const =0
The pure virtual function _lBound() must be defined by the used LP-solver and return the lower bound ...
SOLSTAT barXValStatus() const
Definition lp.h:304
virtual void _sense(const OptSense &newSense)=0
int getSimplexIterationLimit(int &limit) const
Definition lp.h:486
int nOpt() const
Definition lp.h:314
SOLSTAT recoStatus() const
Definition lp.h:308
virtual double barXVal(int i) const
Definition lp.h:274
int setSimplexIterationLimit(int limit)
Changes the iteration limit of the Simplex algorithm.
Definition lp.h:476
void sense(const OptSense &newSense)
Definition lp.h:218
SOLSTAT xValStatus() const
Definition lp.h:302
SOLSTAT
Describes if parts of the solution like x-values, reduced costs, etc. are available.
Definition lp.h:88
@ Available
The part of the solution is available.
Definition lp.h:89
virtual double _uBound(int i) const =0
The pure virtual function _uBound() must be defined by the used LP-solver and return the upper bound ...
void rowRangeCheck(int r) const
Terminates the program if there is no row with index r.
virtual int _nRow() const =0
The pure virtual function _nRow() must be defined by the used LP-solver and return the number of rows...
virtual void _rowRealloc(int newSize)=0
The pure virtual function _rowRealloc() must be defined in the used LP-solver and should reallocate i...
virtual void loadBasis(Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat)
Loads a new basis for the linear program.
Definition lp.h:210
virtual void _changeLBound(int i, double newLb)=0
The pure virtual function _changeLBound() must be defined by the used LP-solver and should set the lo...
void initialize(OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lBound, Array< double > &uBound, Array< Row * > &rows)
Loads the linear program defined by its arguments.
Definition lp.h:161
int maxCol() const
Definition lp.h:226
virtual SlackStat::STATUS _slackStat(int i) const =0
The pure virtual function _slackStat() must be defined by the used LP-solver and should return the st...
void addCols(ArrayBuffer< Column * > &newCols)
Adds columns to the linear program.
STATUS
The enumeration of the statuses a variable gets from the linear program solver.
Definition lpvarstat.h:55
The master of the optimization.
Definition master.h:70
Sense of optimization.
Definition optsense.h:45
Representation of constraints in the row format.
Definition row.h:52
STATUS
The different statuses of a slack variable.
Definition slackstat.h:52
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition ArrayBuffer.h:64
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
Implements a stopwatch measuring CPU time.
Definition Stopwatch.h:157
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
status of variables.
sense of optimization.
status of slack variables