Clp 1.17.6

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CoinPresolveSingleton.hpp
Go to the documentation of this file.
1 /* $Id: CoinPresolveSingleton.hpp 2083 2019-01-06 19:38:09Z unxusr $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 #ifndef CoinPresolveSingleton_H
7 #define CoinPresolveSingleton_H
8 #define SLACK_DOUBLETON 2
9 #define SLACK_SINGLETON 8
10
15 //const int MAX_SLACK_DOUBLETONS = 1000;
16
24 class slack_doubleton_action : public CoinPresolveAction {
25 struct action {
26 double clo;
27 double cup;
28
29 double rlo;
30 double rup;
31
32 double coeff;
33
34 int col;
35 int row;
36 };
37
38 const int nactions_;
39 const action *const actions_;
40
41 slack_doubleton_action(int nactions,
42 const action *actions,
43 const CoinPresolveAction *next)
44 : CoinPresolveAction(next)
45 , nactions_(nactions)
46 , actions_(actions)
47 {
48 }
49
50 public:
51 const char *name() const { return ("slack_doubleton_action"); }
52
59 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
60 const CoinPresolveAction *next,
61 bool &notFinished);
62
63 void postsolve(CoinPostsolveMatrix *prob) const;
64
65 virtual ~slack_doubleton_action() { deleteAction(actions_, action *); }
66 };
75 class slack_singleton_action : public CoinPresolveAction {
76 struct action {
77 double clo;
78 double cup;
79
80 double rlo;
81 double rup;
82
83 double coeff;
84
85 int col;
86 int row;
87 };
88
89 const int nactions_;
90 const action *const actions_;
91
92 slack_singleton_action(int nactions,
93 const action *actions,
94 const CoinPresolveAction *next)
95 : CoinPresolveAction(next)
96 , nactions_(nactions)
97 , actions_(actions)
98 {
99 }
100
101 public:
102 const char *name() const { return ("slack_singleton_action"); }
103
104 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
105 const CoinPresolveAction *next,
106 double *rowObjective);
107
108 void postsolve(CoinPostsolveMatrix *prob) const;
109
110 virtual ~slack_singleton_action() { deleteAction(actions_, action *); }
111 };
112 #endif
113
114 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
115 */
slack_doubleton_action::action::coeff
double coeff
Definition: CoinPresolveSingleton.hpp:32
slack_doubleton_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next, bool &notFinished)
Convert explicit bound constraints to column bounds.
slack_singleton_action
For variables with one entry.
Definition: CoinPresolveSingleton.hpp:75
slack_doubleton_action::action::col
int col
Definition: CoinPresolveSingleton.hpp:34
slack_doubleton_action::action::rup
double rup
Definition: CoinPresolveSingleton.hpp:30
slack_doubleton_action::nactions_
const int nactions_
Definition: CoinPresolveSingleton.hpp:38
slack_doubleton_action::action::clo
double clo
Definition: CoinPresolveSingleton.hpp:26
CoinPresolveAction
Abstract base class of all presolve routines.
Definition: CoinPresolveMatrix.hpp:163
slack_singleton_action::action::rlo
double rlo
Definition: CoinPresolveSingleton.hpp:80
slack_doubleton_action::slack_doubleton_action
slack_doubleton_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveSingleton.hpp:41
deleteAction
#define deleteAction(array, type)
Definition: CoinPresolveMatrix.hpp:38
slack_singleton_action::nactions_
const int nactions_
Definition: CoinPresolveSingleton.hpp:89
slack_doubleton_action::action::row
int row
Definition: CoinPresolveSingleton.hpp:35
slack_singleton_action::action::clo
double clo
Definition: CoinPresolveSingleton.hpp:77
slack_singleton_action::actions_
const action *const actions_
Definition: CoinPresolveSingleton.hpp:90
CoinPresolveAction::next
const CoinPresolveAction * next
The next presolve transformation.
Definition: CoinPresolveMatrix.hpp:180
CoinPostsolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Definition: CoinPresolveMatrix.hpp:1552
slack_doubleton_action::action
Definition: CoinPresolveSingleton.hpp:25
slack_singleton_action::action::cup
double cup
Definition: CoinPresolveSingleton.hpp:78
slack_doubleton_action::action::cup
double cup
Definition: CoinPresolveSingleton.hpp:27
slack_singleton_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
slack_singleton_action::action::rup
double rup
Definition: CoinPresolveSingleton.hpp:81
slack_doubleton_action::action::rlo
double rlo
Definition: CoinPresolveSingleton.hpp:29
slack_singleton_action::action
Definition: CoinPresolveSingleton.hpp:76
CoinPresolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
Definition: CoinPresolveMatrix.hpp:905
slack_doubleton_action::~slack_doubleton_action
virtual ~slack_doubleton_action()
Definition: CoinPresolveSingleton.hpp:65
slack_doubleton_action
Convert an explicit bound constraint to a column bound.
Definition: CoinPresolveSingleton.hpp:24
slack_singleton_action::action::col
int col
Definition: CoinPresolveSingleton.hpp:85
slack_singleton_action::action::coeff
double coeff
Definition: CoinPresolveSingleton.hpp:83
slack_singleton_action::action::row
int row
Definition: CoinPresolveSingleton.hpp:86
slack_doubleton_action::name
const char * name() const
A name for debug printing.
Definition: CoinPresolveSingleton.hpp:51
slack_doubleton_action::actions_
const action *const actions_
Definition: CoinPresolveSingleton.hpp:39
slack_doubleton_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
slack_singleton_action::~slack_singleton_action
virtual ~slack_singleton_action()
Definition: CoinPresolveSingleton.hpp:110
slack_singleton_action::name
const char * name() const
A name for debug printing.
Definition: CoinPresolveSingleton.hpp:102
slack_singleton_action::slack_singleton_action
slack_singleton_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveSingleton.hpp:92
slack_singleton_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next, double *rowObjective)