00001 // Copyright (C) 2002, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 00004 #ifndef CoinPresolveTighten_H 00005 #define CoinPresolveTighten_H 00006 // This action has no separate class; 00007 // instead, it decides which columns can be made fixed 00008 // and calls make_fixed_action::presolve. 00009 const CoinPresolveAction *tighten_zero_cost(CoinPresolveMatrix *prob, 00010 const CoinPresolveAction *next); 00011 00012 #define DO_TIGHTEN 30 00013 00014 class do_tighten_action : public CoinPresolveAction { 00015 struct action { 00016 int *rows; 00017 double *lbound; 00018 double *ubound; 00019 int col; 00020 int nrows; 00021 int direction; // just for assertions 00022 }; 00023 00024 const int nactions_; 00025 const action *const actions_; 00026 00027 do_tighten_action(int nactions, 00028 const action *actions, 00029 const CoinPresolveAction *next) : 00030 CoinPresolveAction(next), 00031 nactions_(nactions), actions_(actions) {} 00032 00033 public: 00034 const char *name() const; 00035 00036 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob, 00037 const CoinPresolveAction *next); 00038 00039 void postsolve(CoinPostsolveMatrix *prob) const; 00040 }; 00041 #endif 00042 00043