summaryrefslogtreecommitdiff
path: root/build/Bonmin/include/coin/ClpDualRowPivot.hpp
diff options
context:
space:
mode:
authorHarpreet2016-08-04 15:25:44 +0530
committerHarpreet2016-08-04 15:25:44 +0530
commit9fd2976931c088dc523974afb901e96bad20f73c (patch)
tree22502de6e6988d5cd595290d11266f8432ad825b /build/Bonmin/include/coin/ClpDualRowPivot.hpp
downloadFOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.gz
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.bz2
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.zip
initial add
Diffstat (limited to 'build/Bonmin/include/coin/ClpDualRowPivot.hpp')
-rw-r--r--build/Bonmin/include/coin/ClpDualRowPivot.hpp129
1 files changed, 129 insertions, 0 deletions
diff --git a/build/Bonmin/include/coin/ClpDualRowPivot.hpp b/build/Bonmin/include/coin/ClpDualRowPivot.hpp
new file mode 100644
index 0000000..f1f57a6
--- /dev/null
+++ b/build/Bonmin/include/coin/ClpDualRowPivot.hpp
@@ -0,0 +1,129 @@
+/* $Id: ClpDualRowPivot.hpp 2070 2014-11-18 11:12:54Z forrest $ */
+// Copyright (C) 2002, International Business Machines
+// Corporation and others. All Rights Reserved.
+// This code is licensed under the terms of the Eclipse Public License (EPL).
+
+#ifndef ClpDualRowPivot_H
+#define ClpDualRowPivot_H
+
+class ClpSimplex;
+class CoinIndexedVector;
+
+//#############################################################################
+
+/** Dual Row Pivot Abstract Base Class
+
+Abstract Base Class for describing an interface to an algorithm
+to choose row pivot in dual simplex algorithm. For some algorithms
+e.g. Dantzig choice then some functions may be null.
+
+*/
+
+class ClpDualRowPivot {
+
+public:
+
+ ///@name Algorithmic methods
+ //@{
+
+ /// Returns pivot row, -1 if none
+ virtual int pivotRow() = 0;
+
+ /** Updates weights and returns pivot alpha.
+ Also does FT update */
+ virtual double updateWeights(CoinIndexedVector * input,
+ CoinIndexedVector * spare,
+ CoinIndexedVector * spare2,
+ CoinIndexedVector * updatedColumn) = 0;
+
+ /** Updates primal solution (and maybe list of candidates)
+ Uses input vector which it deletes
+ Computes change in objective function
+ Would be faster if we kept basic regions, but on other hand it
+ means everything is always in sync
+ */
+ /* FIXME: this was pure virtul (=0). Why? */
+ virtual void updatePrimalSolution(CoinIndexedVector * input,
+ double theta,
+ double & changeInObjective) = 0;
+ /** Saves any weights round factorization as pivot rows may change
+ Will be empty unless steepest edge (will save model)
+ May also recompute infeasibility stuff
+ 1) before factorization
+ 2) after good factorization (if weights empty may initialize)
+ 3) after something happened but no factorization
+ (e.g. check for infeasible)
+ 4) as 2 but restore weights from previous snapshot
+ 5) for strong branching - initialize to 1 , infeasibilities
+ 6) scale back
+ 7) for strong branching - initialize full weights , infeasibilities
+ */
+ virtual void saveWeights(ClpSimplex * model, int mode);
+ /// checks accuracy and may re-initialize (may be empty)
+ virtual void checkAccuracy();
+ /// Gets rid of last update (may be empty)
+ virtual void unrollWeights();
+ /// Gets rid of all arrays (may be empty)
+ virtual void clearArrays();
+ /// Returns true if would not find any row
+ virtual bool looksOptimal() const {
+ return false;
+ }
+ /// Called when maximum pivots changes
+ virtual void maximumPivotsChanged() {}
+ //@}
+
+
+ ///@name Constructors and destructors
+ //@{
+ /// Default Constructor
+ ClpDualRowPivot();
+
+ /// Copy constructor
+ ClpDualRowPivot(const ClpDualRowPivot &);
+
+ /// Assignment operator
+ ClpDualRowPivot & operator=(const ClpDualRowPivot& rhs);
+
+ /// Destructor
+ virtual ~ClpDualRowPivot ();
+
+ /// Clone
+ virtual ClpDualRowPivot * clone(bool copyData = true) const = 0;
+
+ //@}
+
+ ///@name Other
+ //@{
+ /// Returns model
+ inline ClpSimplex * model() {
+ return model_;
+ }
+
+ /// Sets model (normally to NULL)
+ inline void setModel(ClpSimplex * newmodel) {
+ model_ = newmodel;
+ }
+
+ /// Returns type (above 63 is extra information)
+ inline int type() {
+ return type_;
+ }
+
+ //@}
+
+ //---------------------------------------------------------------------------
+
+protected:
+ ///@name Protected member data
+ //@{
+ /// Pointer to model
+ ClpSimplex * model_;
+ /// Type of row pivot algorithm
+ int type_;
+ //@}
+};
+#ifndef CLP_DUAL_COLUMN_MULTIPLIER
+//#define CLP_DUAL_COLUMN_MULTIPLIER 0.99999
+#endif
+#endif