summaryrefslogtreecommitdiff
path: root/thirdparty/linux/include/coin/CoinPresolveSingleton.hpp
diff options
context:
space:
mode:
authorHarpreet2016-09-03 00:36:51 +0530
committerHarpreet2016-09-03 00:36:51 +0530
commita0d9443af147e949c1e6a01ac24749d12593ec5b (patch)
tree1a1955c5482ae608fd7f618b06f4ecc6a0d39a23 /thirdparty/linux/include/coin/CoinPresolveSingleton.hpp
parent4b64cf486f5c999fd8167758cae27839f3b50848 (diff)
downloadFOSSEE-Optim-toolbox-development-a0d9443af147e949c1e6a01ac24749d12593ec5b.tar.gz
FOSSEE-Optim-toolbox-development-a0d9443af147e949c1e6a01ac24749d12593ec5b.tar.bz2
FOSSEE-Optim-toolbox-development-a0d9443af147e949c1e6a01ac24749d12593ec5b.zip
cbcintlinprog added
Diffstat (limited to 'thirdparty/linux/include/coin/CoinPresolveSingleton.hpp')
-rw-r--r--thirdparty/linux/include/coin/CoinPresolveSingleton.hpp112
1 files changed, 112 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin/CoinPresolveSingleton.hpp b/thirdparty/linux/include/coin/CoinPresolveSingleton.hpp
new file mode 100644
index 0000000..10bc1cc
--- /dev/null
+++ b/thirdparty/linux/include/coin/CoinPresolveSingleton.hpp
@@ -0,0 +1,112 @@
+/* $Id: CoinPresolveSingleton.hpp 1498 2011-11-02 15:25:35Z mjs $ */
+// 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 CoinPresolveSingleton_H
+#define CoinPresolveSingleton_H
+#define SLACK_DOUBLETON 2
+#define SLACK_SINGLETON 8
+
+/*!
+ \file
+*/
+
+//const int MAX_SLACK_DOUBLETONS = 1000;
+
+/*! \class slack_doubleton_action
+ \brief Convert an explicit bound constraint to a column bound
+
+ This transform looks for explicit bound constraints for a variable and
+ transfers the bound to the appropriate column bound array.
+ The constraint is removed from the constraint system.
+*/
+class slack_doubleton_action : public CoinPresolveAction {
+ struct action {
+ double clo;
+ double cup;
+
+ double rlo;
+ double rup;
+
+ double coeff;
+
+ int col;
+ int row;
+ };
+
+ const int nactions_;
+ const action *const actions_;
+
+ slack_doubleton_action(int nactions,
+ const action *actions,
+ const CoinPresolveAction *next) :
+ CoinPresolveAction(next),
+ nactions_(nactions),
+ actions_(actions)
+{}
+
+ public:
+ const char *name() const { return ("slack_doubleton_action"); }
+
+ /*! \brief Convert explicit bound constraints to column bounds.
+
+ Not now There is a hard limit (#MAX_SLACK_DOUBLETONS) on the number of
+ constraints processed in a given call. \p notFinished is set to true
+ if candidates remain.
+ */
+ static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
+ const CoinPresolveAction *next,
+ bool &notFinished);
+
+ void postsolve(CoinPostsolveMatrix *prob) const;
+
+
+ virtual ~slack_doubleton_action() { deleteAction(actions_,action*); }
+};
+/*! \class slack_singleton_action
+ \brief For variables with one entry
+
+ If we have a variable with one entry and no cost then we can
+ transform the row from E to G etc.
+ If there is a row objective region then we may be able to do
+ this even with a cost.
+*/
+class slack_singleton_action : public CoinPresolveAction {
+ struct action {
+ double clo;
+ double cup;
+
+ double rlo;
+ double rup;
+
+ double coeff;
+
+ int col;
+ int row;
+ };
+
+ const int nactions_;
+ const action *const actions_;
+
+ slack_singleton_action(int nactions,
+ const action *actions,
+ const CoinPresolveAction *next) :
+ CoinPresolveAction(next),
+ nactions_(nactions),
+ actions_(actions)
+{}
+
+ public:
+ const char *name() const { return ("slack_singleton_action"); }
+
+ static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
+ const CoinPresolveAction *next,
+ double * rowObjective);
+
+ void postsolve(CoinPostsolveMatrix *prob) const;
+
+
+ virtual ~slack_singleton_action() { deleteAction(actions_,action*); }
+};
+#endif