00001 /* $Id: CoinPresolveUseless.hpp 1566 2012-11-29 19:33:56Z lou $ */ 00002 // Copyright (C) 2002, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 // This code is licensed under the terms of the Eclipse Public License (EPL). 00005 00006 #ifndef CoinPresolveUseless_H 00007 #define CoinPresolveUseless_H 00008 #define USELESS 20 00009 00010 class useless_constraint_action : public CoinPresolveAction { 00011 struct action { 00012 double rlo; 00013 double rup; 00014 const int *rowcols; 00015 const double *rowels; 00016 int row; 00017 int ninrow; 00018 }; 00019 00020 const int nactions_; 00021 const action *const actions_; 00022 00023 useless_constraint_action(int nactions, 00024 const action *actions, 00025 const CoinPresolveAction *next); 00026 00027 public: 00028 const char *name() const; 00029 00030 // These rows are asserted to be useless, 00031 // that is, given a solution the row activity 00032 // must be in range. 00033 static const CoinPresolveAction *presolve(CoinPresolveMatrix * prob, 00034 const int *useless_rows, 00035 int nuseless_rows, 00036 const CoinPresolveAction *next); 00037 00038 void postsolve(CoinPostsolveMatrix *prob) const; 00039 00040 virtual ~useless_constraint_action(); 00041 00042 }; 00043 00058 const CoinPresolveAction *testRedundant(CoinPresolveMatrix *prob, 00059 const CoinPresolveAction *next) ; 00060 00061 00062 00063 #endif