CoinPresolveFixed.hpp
Go to the documentation of this file.
1 /* $Id: CoinPresolveFixed.hpp 1215 2009-11-05 11:03:04Z forrest $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 
5 #ifndef CoinPresolveFixed_H
6 #define CoinPresolveFixed_H
7 #define FIXED_VARIABLE 1
8 
25  public:
29  struct action {
30  int col;
31  int start;
32  double sol;
33  };
35  int *colrows_;
37  double *colels_;
39  int nactions_;
42 
43  private:
45  remove_fixed_action(int nactions,
46  action *actions,
47  double * colels,
48  int * colrows,
49  const CoinPresolveAction *next);
50 
51  public:
53  const char *name() const;
54 
63  int *fcols,
64  int nfcols,
65  const CoinPresolveAction *next);
66 
67  void postsolve(CoinPostsolveMatrix *prob) const;
68 
71 };
72 
73 
82  const CoinPresolveAction *next);
83 
84 
95 
97  struct action {
98  double bound;
99  int col ;
100  };
101 
105  const action *actions_;
106 
111  const bool fix_to_lower_;
112 
115 
117  make_fixed_action(int nactions,
118  const action *actions,
119  bool fix_to_lower,
120  const remove_fixed_action *faction,
121  const CoinPresolveAction *next) :
122  CoinPresolveAction(next),
123  nactions_(nactions), actions_(actions),
124  fix_to_lower_(fix_to_lower),
125  faction_(faction)
126  {}
127 
128  public:
130  const char *name() const;
131 
139  static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
140  int *fcols,
141  int nfcols,
142  bool fix_to_lower,
143  const CoinPresolveAction *next);
144 
149  void postsolve(CoinPostsolveMatrix *prob) const;
150 
154  delete faction_;
155  }
156 };
157 
166  const CoinPresolveAction *next);
168 void transferCosts(CoinPresolveMatrix * prob);
169 #endif