00001
00002
00003
00004 #ifndef CoinPresolveSingleton_H
00005 #define CoinPresolveSingleton_H
00006 #define SLACK_DOUBLETON 2
00007
00008 const int MAX_SLACK_DOUBLETONS = 1000;
00009
00010 class slack_doubleton_action : public CoinPresolveAction {
00011 struct action {
00012 double clo;
00013 double cup;
00014
00015 double rlo;
00016 double rup;
00017
00018 double coeff;
00019
00020 int col;
00021 int row;
00022 };
00023
00024 const int nactions_;
00025 const action *const actions_;
00026
00027 slack_doubleton_action(int nactions,
00028 const action *actions,
00029 const CoinPresolveAction *next) :
00030 CoinPresolveAction(next),
00031 nactions_(nactions),
00032 actions_(actions)
00033 {}
00034
00035 public:
00036 const char *name() const { return ("slack_doubleton_action"); }
00037
00038
00039 static const CoinPresolveAction *presolve(CoinPresolveMatrix *,
00040 const CoinPresolveAction *next,
00041 bool ¬Finished);
00042
00043 void postsolve(CoinPostsolveMatrix *prob) const;
00044
00045
00046 ~slack_doubleton_action() { deleteAction(actions_,action*); }
00047 };
00048 #endif