Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

lp.h
Go to the documentation of this file.
1 
30 #pragma once
31 
35 #include <ogdf/basic/Stopwatch.h>
36 
37 
38 namespace abacus {
39 
40 class Master;
41 class SparVec;
42 class Row;
43 class Column;
44 
45 
47 
70 class OGDF_EXPORT LP : public AbacusRoot {
71 public:
72 
74  enum OPTSTAT {
76  Unoptimized,
79  Feasible,
83  LimitReached
84  };
85 
87  enum SOLSTAT {
89  Missing
90  };
91 
93  enum METHOD {
95  Dual,
98  Approximate
99  };
100 
102 
105  LP (Master *master) :
106  master_(master),
107  optStat_(Unoptimized),
108  xValStatus_(Missing),
109  barXValStatus_(Missing),
110  yValStatus_(Missing),
111  recoStatus_(Missing),
112  slackStatus_(Missing),
113  basisStatus_(Missing),
114  nOpt_(0)
115  { }
116 
118  virtual ~LP () { }
119 
136  friend OGDF_EXPORT std::ostream &operator<<(std::ostream& out, const LP& rhs);
137 
161  OptSense sense,
162  int nRow,
163  int maxRow,
164  int nCol,
165  int maxCol,
166  Array<double> &obj,
167  Array<double> &lBound,
168  Array<double> &uBound,
169  Array<Row*> &rows) {
170  _initialize(sense, nRow, maxRow, nCol, maxCol, obj, lBound, uBound, rows);
171  }
172 
190  OptSense sense,
191  int nRow, int maxRow,
192  int nCol, int maxCol,
193  Array<double> &obj,
194  Array<double> &lBound,
195  Array<double> &uBound,
196  Array<Row*> &rows,
197  Array<LPVARSTAT::STATUS> &lpVarStat,
198  Array<SlackStat::STATUS> &slackStat) {
199  _initialize(sense, nRow, maxRow, nCol, maxCol, obj, lBound, uBound, rows);
200  loadBasis(lpVarStat,slackStat);
201  }
202 
203 
209  virtual void loadBasis(
210  Array<LPVARSTAT::STATUS> &lpVarStat,
211  Array<SlackStat::STATUS> &slackStat) {
212  _loadBasis(lpVarStat,slackStat);
213  }
214 
215  OptSense sense() const { return _sense(); }
216 
217  void sense(const OptSense &newSense) { _sense(newSense); }
218 
219  int nRow() const { return _nRow(); }
220 
221  int maxRow() const { return _maxRow(); }
222 
223  int nCol() const { return _nCol(); }
224 
225  int maxCol() const { return _maxCol(); }
226 
227  int nnz() const { return _nnz(); }
228 
229  double obj(int i) const {
230 #ifdef OGDF_DEBUG
231  colRangeCheck(i);
232 #endif
233  return _obj(i);
234  }
235 
236  double lBound(int i) const {
237 #ifdef OGDF_DEBUG
238  colRangeCheck(i);
239 #endif
240  return _lBound(i);
241  }
242 
243  double uBound(int i) const {
244 #ifdef OGDF_DEBUG
245  colRangeCheck(i);
246 #endif
247  return _uBound(i);
248  }
249 
250  void row(int i, Row &r) const {
251 #ifdef OGDF_DEBUG
252  rowRangeCheck(i);
253 #endif
254  _row(i, r);
255  }
256 
257  double rhs(int i) const {
258 #ifdef ABACUSSAFE
259  rowRangeCheck(i);
260 #endif
261  return _rhs(i);
262  }
263 
264  virtual double value() const { return _value(); }
265 
266  virtual double xVal(int i) const {
267 #ifdef OGDF_DEBUG
268  colRangeCheck(i);
269 #endif
270  return _xVal(i);
271  }
272 
273  virtual double barXVal(int i) const {
274 #ifdef OGDF_DEBUG
275  colRangeCheck(i);
276 #endif
277  return _barXVal(i);
278  }
279 
280  virtual double reco(int i) const {
281 #ifdef OGDF_DEBUG
282  colRangeCheck(i);
283 #endif
284  return _reco(i);
285  }
286 
287  virtual double yVal(int c) const {
288 #ifdef OGDF_DEBUG
289  rowRangeCheck(c);
290 #endif
291  return _yVal(c);
292  }
293 
294  virtual double slack(int c) const {
295 #ifdef OGDF_DEBUG
296  rowRangeCheck(c);
297 #endif
298  return _slack(c);
299  }
300 
301  SOLSTAT xValStatus() const { return xValStatus_; }
302 
303  SOLSTAT barXValStatus() const { return barXValStatus_; }
304 
305  SOLSTAT yValStatus() const { return yValStatus_; }
306 
307  SOLSTAT recoStatus() const { return recoStatus_; }
308 
309  SOLSTAT slackStatus() const { return slackStatus_; }
310 
311  SOLSTAT basisStatus() const { return basisStatus_; }
312 
313  int nOpt() const { return nOpt_; }
314 
315  virtual bool infeasible() const {
316  return ( optStat_ == Infeasible );
317  }
318 
319 
346  virtual int getInfeas(int &infeasRow, int &infeasCol, double *bInvRow) const {
347  return _getInfeas(infeasRow,infeasCol,bInvRow);
348  }
349 
350  virtual LPVARSTAT::STATUS lpVarStat(int i) const {
351 #ifdef OGDF_DEBUG
352  colRangeCheck(i);
353 #endif
354  return _lpVarStat(i);
355  }
356 
357  virtual SlackStat::STATUS slackStat(int i) const {
358 #ifdef OGDF_DEBUG
359  rowRangeCheck(i);
360 #endif
361  return _slackStat(i);
362  }
363 
370  virtual OPTSTAT optimize(METHOD method);
371 
377  initPostOpt();
378  _remRows(ind);
379  }
380 
388  void addRows(ArrayBuffer<Row*> &newRows);
389 
394  void remCols(ArrayBuffer<int> &cols) {
395  initPostOpt();
396  _remCols(cols);
397  }
398 
406  void addCols(ArrayBuffer<Column*> &newCols);
407 
412  void changeRhs(Array<double> &newRhs) {
413  initPostOpt();
414  _changeRhs(newRhs);
415  }
416 
422  virtual void changeLBound(int i, double newLb);
423 
429  virtual void changeUBound(int i, double newUb);
430 
439  virtual int pivotSlackVariableIn(ArrayBuffer<int> &rows);
440 
445  void rowRealloc(int newSize) {
446  _rowRealloc(newSize);
447  }
448 
453  void colRealloc(int newSize) {
454  _colRealloc(newSize);
455  }
456 
457 
466  int writeBasisMatrix(const char *fileName);
467 
475  int setSimplexIterationLimit(int limit) {
476  return _setSimplexIterationLimit(limit);
477  }
478 
485  int getSimplexIterationLimit(int &limit) const {
486  return _getSimplexIterationLimit(limit);
487  }
488 
489  ogdf::StopwatchCPU* lpSolverTime() { return &lpSolverTime_; }
490 
491 protected:
492 
501  void colsNnz(int nRow, Array<Row*> &rows, Array<int> &nnz);
502 
517  void rows2cols(int nRow, Array<Row*> &rows,
518  Array<SparVec*> &cols);
519 
524  void rowRangeCheck(int r) const;
525 
530  void colRangeCheck(int i) const;
531 
535  virtual OptSense _sense() const = 0;
536  virtual void _sense(const OptSense &newSense) = 0;
537 
541  virtual int _nRow() const = 0;
542 
546  virtual int _maxRow() const = 0;
547 
551  virtual int _nCol() const = 0;
552 
556  virtual int _maxCol() const = 0;
557 
563  virtual int _nnz() const = 0;
564 
569  virtual double _obj(int i) const = 0;
570 
574  virtual double _lBound(int i) const = 0;
575 
579  virtual double _uBound(int i) const = 0;
580 
584  virtual double _rhs(int i) const = 0;
585 
589  virtual void _row(int i, Row &r) const = 0;
590 
604  virtual void _initialize(OptSense sense, int nRow, int maxRow,
605  int nCol, int maxCol,
606  Array<double> &obj, Array<double> &lBound,
607  Array<double> &uBound, Array<Row*> &rows) = 0;
608 
614  virtual void _loadBasis(Array<LPVARSTAT::STATUS> &lpVarStat,
615  Array<SlackStat::STATUS> &slackStat) = 0;
616 
621  virtual OPTSTAT _primalSimplex() = 0;
622 
627  virtual OPTSTAT _dualSimplex() = 0;
628 
633  virtual OPTSTAT _barrier(bool doCrossover) = 0;
634 
639  virtual OPTSTAT _approx() = 0;
640 
645  virtual double _value() const = 0;
646 
651  virtual double _xVal(int i) const = 0;
652  virtual double _barXVal(int i) const = 0;
653 
657  virtual double _reco(int i) const = 0;
658 
662  virtual double _slack(int i) const = 0;
663 
668  virtual double _yVal(int i) const = 0;
669 
674  virtual LPVARSTAT::STATUS _lpVarStat(int i) const = 0;
675 
680  virtual SlackStat::STATUS _slackStat(int i) const = 0;
681 
694  virtual int _getInfeas(int &infeasRow, int &infeasCol,
695  double *bInvRow) const = 0;
696 
701  virtual void _remRows(ArrayBuffer<int> &ind) = 0;
702 
707  virtual void _addRows(ArrayBuffer<Row*> &newRows) = 0;
708 
713  virtual void _remCols(ArrayBuffer<int> &vars) = 0;
714 
719  virtual void _addCols(ArrayBuffer<Column*> &newCols) = 0;
720 
725  virtual void _changeRhs(Array<double> &newRhs) = 0;
726 
731  virtual void _changeLBound(int i, double newLb) = 0;
732 
737  virtual void _changeUBound(int i, double newUb) = 0;
738 
748  virtual int _pivotSlackVariableIn(ArrayBuffer<int> &rows) = 0;
749 
755  virtual void _rowRealloc(int newSize) = 0;
756 
761  virtual void _colRealloc(int newSize) = 0;
762 
771  virtual int _setSimplexIterationLimit(int limit) = 0;
772 
782  virtual int _getSimplexIterationLimit(int &limit) const = 0;
783 
787 
791 
798 
805 
811 
818 
826 
829  int nOpt_;
831 
832 private:
833 
841  void initPostOpt() {
842  optStat_= Unoptimized;
843  xValStatus_= barXValStatus_= recoStatus_= Missing;
844  slackStatus_= yValStatus_= basisStatus_= Missing;
845  }
846 
847  LP(const LP &rhs);
848  const LP &operator=(const LP &rhs);
849 };
850 
851 
852 #if 0
853 inline OptSense LP::sense() const
854 {
855  return _sense();
856 }
857 
858 inline void LP::sense(const OptSense &newSense)
859 {
860  _sense(newSense);
861 }
862 
863 inline int LP::nRow() const
864 {
865  return _nRow();
866 }
867 
868 inline int LP::maxRow() const
869 {
870  return _maxRow();
871 }
872 
873 inline int LP::nCol() const
874 {
875  return _nCol();
876 }
877 
878 inline int LP::maxCol() const
879 {
880  return _maxCol();
881 }
882 
883 inline int LP::nnz() const
884 {
885  return _nnz();
886 }
887 
888 inline double LP::obj(int i) const
889 {
890 #ifdef OGDF_DEBUG
891  colRangeCheck(i);
892 #endif
893  return _obj(i);
894 }
895 
896 inline double LP::lBound(int i) const
897 {
898 #ifdef OGDF_DEBUG
899  colRangeCheck(i);
900 #endif
901  return _lBound(i);
902 }
903 
904 inline double LP::uBound(int i) const
905 {
906 #ifdef OGDF_DEBUG
907  colRangeCheck(i);
908 #endif
909  return _uBound(i);
910 }
911 
912 inline void LP::row(int i, Row &r) const
913 {
914 #ifdef OGDF_DEBUG
915  rowRangeCheck(i);
916 #endif
917  _row(i, r);
918 }
919 
920 inline double LP::rhs(int i) const
921 {
922 #ifdef ABACUSSAFE
923  rowRangeCheck(i);
924 #endif
925  return _rhs(i);
926 }
927 
928 inline double LP::value() const
929 {
930  return _value();
931 }
932 
933 inline double LP::xVal(int i)
934 {
935 #ifdef OGDF_DEBUG
936  colRangeCheck(i);
937 #endif
938  return _xVal(i);
939 }
940 
941 inline double LP::barXVal(int i)
942 {
943 #ifdef OGDF_DEBUG
944  colRangeCheck(i);
945 #endif
946  return _barXVal(i);
947 }
948 
949 inline double LP::reco(int i)
950 {
951 #ifdef OGDF_DEBUG
952  colRangeCheck(i);
953 #endif
954  return _reco(i);
955 }
956 
957 inline double LP::yVal(int c)
958 {
959 #ifdef OGDF_DEBUG
960  rowRangeCheck(c);
961 #endif
962  return _yVal(c);
963 }
964 
965 inline double LP::slack(int c)
966 {
967 #ifdef OGDF_DEBUG
968  rowRangeCheck(c);
969 #endif
970  return _slack(c);
971 }
972 
973 inline LP::SOLSTAT LP::xValStatus() const
974 {
975  return xValStatus_;
976 }
977 
978 inline LP::SOLSTAT LP::barXValStatus() const
979 {
980  return barXValStatus_;
981 }
982 
983 inline LP::SOLSTAT LP::recoStatus() const
984 {
985  return recoStatus_;
986 }
987 
988 inline LP::SOLSTAT LP::yValStatus() const
989 {
990  return yValStatus_;
991 }
992 
993 inline LP::SOLSTAT LP::slackStatus() const
994 {
995  return slackStatus_;
996 }
997 
998 inline LP::SOLSTAT LP::basisStatus() const
999 {
1000  return basisStatus_;
1001 }
1002 
1003 inline int LP::nOpt() const
1004 {
1005  return nOpt_;
1006 }
1007 
1008 inline bool LP::infeasible() const
1009 {
1010  if (optStat_ == Infeasible) return true;
1011  else return false;
1012 }
1013 
1014 inline LPVARSTAT::STATUS LP::lpVarStat(int i)
1015 {
1016 #ifdef OGDF_DEBUG
1017  colRangeCheck(i);
1018 #endif
1019  return _lpVarStat(i);
1020 }
1021 
1022 inline SlackStat::STATUS LP::slackStat(int i)
1023 {
1024 #ifdef OGDF_DEBUG
1025  rowRangeCheck(i);
1026 #endif
1027  return _slackStat(i);
1028 }
1029 #endif
1030 
1031 }
ogdf::ArrayBuffer
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition: Array.h:46
lpvarstat.h
status of variables.
abacus::LP::rowRealloc
void rowRealloc(int newSize)
Performs a reallocation of the row space of the linear program.
Definition: lp.h:445
abacus::LP::BarrierAndCrossover
@ BarrierAndCrossover
The barrier method followed by a crossover to a basis.
Definition: lp.h:96
abacus::LP::reco
virtual double reco(int i) const
Definition: lp.h:280
abacus::LP::sense
OptSense sense() const
Definition: lp.h:215
abacus::LP::_row
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 ...
abacus::LP::yVal
virtual double yVal(int c) const
Definition: lp.h:287
abacus::LP::slackStatus
SOLSTAT slackStatus() const
Definition: lp.h:309
abacus::LP::basisStatus
SOLSTAT basisStatus() const
Definition: lp.h:311
abacus::LP::nOpt
int nOpt() const
Definition: lp.h:313
abacus::LP::initialize
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:189
abacus::LP::_barXVal
virtual double _barXVal(int i) const =0
abacus::operator<<
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)
abacus::OptSense
Sense of optimization.
Definition: optsense.h:44
abacus::LP::recoStatus
SOLSTAT recoStatus() const
Definition: lp.h:307
abacus::LP::_lBound
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 ...
abacus::LP::remCols
void remCols(ArrayBuffer< int > &cols)
Removes columns from the linear program.
Definition: lp.h:394
abacus::LP::recoStatus_
SOLSTAT recoStatus_
This member becomes Available if the reduced costs of the optimal solution can be accessed with the f...
Definition: lp.h:810
abacus
Definition: abacusroot.h:48
abacus::LP::Primal
@ Primal
The primal simplex method.
Definition: lp.h:94
abacus::LP::lpVarStat
virtual LPVARSTAT::STATUS lpVarStat(int i) const
Definition: lp.h:350
abacus::LP::xVal
virtual double xVal(int i) const
Definition: lp.h:266
abacus::LP::_slack
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 ...
abacus::LPVARSTAT::STATUS
STATUS
The enumeration of the statuses a variable gets from the linear program solver.
Definition: lpvarstat.h:54
abacus::LP::_obj
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...
abacus::LP::_nnz
virtual int _nnz() const =0
The pure virtual function _nnz() must be defined by the used LP-solver and return the number of nonze...
abacus::LP::_maxCol
virtual int _maxCol() const =0
The pure virtual function _maxCol() must be defined by the the used LP-solver and return the maximal ...
abacus::LP::obj
double obj(int i) const
Definition: lp.h:229
abacus::LP::nnz
int nnz() const
Definition: lp.h:227
abacus::LP::_reco
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...
abacus::LP::basisStatus_
SOLSTAT basisStatus_
This member becomes Available if the status of the variables and the slack variables of the optimal s...
Definition: lp.h:825
ogdf::StopwatchCPU
Implements a stopwatch measuring CPU time.
Definition: Stopwatch.h:154
abacus::LP::slackStatus_
SOLSTAT slackStatus_
This member becomes Available if the values of the slack variables of the optimal solution can be acc...
Definition: lp.h:817
abacus::LP::_uBound
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 ...
abacus::LP::lpSolverTime_
ogdf::StopwatchCPU lpSolverTime_
Definition: lp.h:830
abacus::LP::Optimal
@ Optimal
The optimal solution has been computed.
Definition: lp.h:75
abacus::SlackStat::STATUS
STATUS
The different statuses of a slack variable.
Definition: slackstat.h:51
abacus::LP::_maxRow
virtual int _maxRow() const =0
The pure virtual function _maxRow() must be defined by the used LP-solver and return the maximal numb...
abacus::LP::_nCol
virtual int _nCol() const =0
The pure virtual function _nCol() must be defined by the used LP-solver and return the number of colu...
abacus::LP::Unbounded
@ Unbounded
The linear program is unbounded.
Definition: lp.h:82
abacus::LP::slack
virtual double slack(int c) const
Definition: lp.h:294
abacus::LP::_yVal
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...
abacus::LP::rowRangeCheck
void rowRangeCheck(int r) const
Terminates the program if there is no row with index r.
abacus::LP::colRealloc
void colRealloc(int newSize)
Performs a reallocation of the column space of the linear program.
Definition: lp.h:453
abacus::LP::_rhs
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...
abacus::LP::maxRow
int maxRow() const
Definition: lp.h:221
abacus::LP::yValStatus_
SOLSTAT yValStatus_
This member becomes Available if the values of the dual variables of the optimal solution can be acce...
Definition: lp.h:804
abacus::LP::barXValStatus
SOLSTAT barXValStatus() const
Definition: lp.h:303
abacus::LP::row
void row(int i, Row &r) const
Definition: lp.h:250
abacus::LP::slackStat
virtual SlackStat::STATUS slackStat(int i) const
Definition: lp.h:357
abacus::LP::Available
@ Available
The part of the solution is available.
Definition: lp.h:88
abacus::LP::master_
Master * master_
A pointer to the corresponding master of the optimization.
Definition: lp.h:786
abacus::LP::sense
void sense(const OptSense &newSense)
Definition: lp.h:217
r
int r[]
Definition: hierarchical-ranking.cpp:8
abacus::LP::OPTSTAT
OPTSTAT
The optimization status of the linear program.
Definition: lp.h:74
abacus::LP::yValStatus
SOLSTAT yValStatus() const
Definition: lp.h:305
abacus::LP::getSimplexIterationLimit
int getSimplexIterationLimit(int &limit) const
Definition: lp.h:485
abacus::LP::LP
LP(Master *master)
Creates a linear program.
Definition: lp.h:105
abacus::LP::nRow
int nRow() const
Definition: lp.h:219
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:68
abacus::LP::BarrierNoCrossover
@ BarrierNoCrossover
The barrier method without crossover.
Definition: lp.h:97
abacus::LP::getInfeas
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:346
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:214
abacus::LP::changeRhs
void changeRhs(Array< double > &newRhs)
Changes the complete right hand side of the linear program.
Definition: lp.h:412
optsense.h
sense of optimization.
abacus::Row
Representation of constraints in the row format.
Definition: row.h:51
abacus::LP::barXValStatus_
SOLSTAT barXValStatus_
Definition: lp.h:797
abacus::LP::uBound
double uBound(int i) const
Definition: lp.h:243
abacus::LP
Linear programs.
Definition: lp.h:70
abacus::LP::xValStatus
SOLSTAT xValStatus() const
Definition: lp.h:301
Stopwatch.h
Declaration of stopwatch classes.
abacus::LP::barXVal
virtual double barXVal(int i) const
Definition: lp.h:273
abacus::LP::nCol
int nCol() const
Definition: lp.h:223
abacus::LP::initialize
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:160
abacus::LP::_value
virtual double _value() const =0
The pure virtual function _value() must be defined by the used LP-solver and should return the optimu...
abacus::LP::METHOD
METHOD
The solution method for the linear program.
Definition: lp.h:93
abacus::LP::colRangeCheck
void colRangeCheck(int i) const
Terminates the program if there is no column with index i.
abacus::LP::xValStatus_
SOLSTAT xValStatus_
This member becomes Available if the -values of the optimal solution can be accessed with the functio...
Definition: lp.h:796
abacus::LP::value
virtual double value() const
Definition: lp.h:264
abacus::LP::Dual
@ Dual
The dual simplex method.
Definition: lp.h:95
abacus::LP::_slackStat
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...
abacus::LP::infeasible
virtual bool infeasible() const
Definition: lp.h:315
abacus::LP::setSimplexIterationLimit
int setSimplexIterationLimit(int limit)
Changes the iteration limit of the Simplex algorithm.
Definition: lp.h:475
abacus::LP::remRows
void remRows(ArrayBuffer< int > &ind)
Removes rows of the linear program.
Definition: lp.h:376
abacus::LP::rhs
double rhs(int i) const
Definition: lp.h:257
abacus::LP::_xVal
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...
abacus::LP::maxCol
int maxCol() const
Definition: lp.h:225
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::AlgorithmFailureCode::SparVec
@ SparVec
abacus::LP::initPostOpt
void initPostOpt()
Resets the optimization status and the availability statuses of the solution.
Definition: lp.h:841
abacus::LP::SOLSTAT
SOLSTAT
Describes if parts of the solution like x-values, reduced costs, etc. are available.
Definition: lp.h:87
abacus::LP::lBound
double lBound(int i) const
Definition: lp.h:236
abacus::LP::loadBasis
virtual void loadBasis(Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat)
Loads a new basis for the linear program.
Definition: lp.h:209
abacus::LP::Error
@ Error
An error has happened during optimization.
Definition: lp.h:78
abacus::LP::_nRow
virtual int _nRow() const =0
The pure virtual function _nRow() must be defined by the used LP-solver and return the number of rows...
abacus::LP::Infeasible
@ Infeasible
The linear program is primal infeasible.
Definition: lp.h:81
abacus::LP::lpSolverTime
ogdf::StopwatchCPU * lpSolverTime()
Definition: lp.h:489
abacus::LP::_lpVarStat
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...
abacus::LP::~LP
virtual ~LP()
The destructor.
Definition: lp.h:118
abacus::LP::_sense
virtual OptSense _sense() const =0
The pure virtual function _sense() must be defined by the used LP-solver and return the sense of the ...
abacus::Master
The master of the optimization.
Definition: master.h:69
abacus::LP::nOpt_
int nOpt_
The number of optimizations of the linear program.
Definition: lp.h:829
slackstat.h
status of slack variables
abacus::LP::optStat_
OPTSTAT optStat_
The status of the linear program.
Definition: lp.h:790