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

- File List
- File Members

# /home/coin/SVN-release/Cgl-0.53.1/CoinUtils/src/CoinPresolveFixed.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2002, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003
    00004 #ifndef CoinPresolveFixed_H
    00005 #define CoinPresolveFixed_H
    00006 #define FIXED_VARIABLE  1
    00007
    00023 class remove_fixed_action : public CoinPresolveAction {
    00024  public:
    00028   struct action {
    00029     int col;
    00030     int start;
    00031     double sol;
    00032   };
    00034   int *colrows_;
    00036   double *colels_;
    00038   int nactions_;
    00040   action *actions_;
    00041
    00042  private:
    00044   remove_fixed_action(int nactions,
    00045                       action *actions,
    00046                       double * colels,
    00047                       int * colrows,
    00048                       const CoinPresolveAction *next);
    00049
    00050  public:
    00052   const char *name() const;
    00053
    00061   static const remove_fixed_action *presolve(CoinPresolveMatrix *prob,
    00062                                          int *fcols,
    00063                                          int nfcols,
    00064                                          const CoinPresolveAction *next);
    00065
    00066   void postsolve(CoinPostsolveMatrix *prob) const;
    00067
    00069   ~remove_fixed_action();
    00070 };
    00071
    00072
    00080 const CoinPresolveAction *remove_fixed(CoinPresolveMatrix *prob,
    00081                                     const CoinPresolveAction *next);
    00082
    00083
    00093 class make_fixed_action : public CoinPresolveAction {
    00094
    00096   struct action {
    00097     double bound;
    00098     int col ;
    00099   };
    00100
    00102   int nactions_;
    00104   const action *actions_;
    00105
    00110   const bool fix_to_lower_;
    00111
    00113   const remove_fixed_action *faction_;
    00114
    00116   make_fixed_action(int nactions,
    00117                     const action *actions,
    00118                     bool fix_to_lower,
    00119                     const remove_fixed_action *faction,
    00120                     const CoinPresolveAction *next) :
    00121     CoinPresolveAction(next),
    00122     nactions_(nactions), actions_(actions),
    00123     fix_to_lower_(fix_to_lower),
    00124     faction_(faction)
    00125   {}
    00126
    00127  public:
    00129   const char *name() const;
    00130
    00138   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00139                                          int *fcols,
    00140                                          int nfcols,
    00141                                          bool fix_to_lower,
    00142                                          const CoinPresolveAction *next);
    00143
    00148   void postsolve(CoinPostsolveMatrix *prob) const;
    00149
    00151   ~make_fixed_action() {
    00152     deleteAction(actions_,action*);
    00153     delete faction_;
    00154   }
    00155 };
    00156
    00164 const CoinPresolveAction *make_fixed(CoinPresolveMatrix *prob,
    00165                                     const CoinPresolveAction *next);
    00167 void transferCosts(CoinPresolveMatrix * prob);
    00168 #endif