# AbcWarmStart.hpp

Go to the documentation of this file.

    00001 /* $Id: AbcWarmStart.hpp 1910 2013-01-27 02:00:13Z stefan $ */
    00009 #ifndef AbcWarmStart_H
    00010 #define AbcWarmStart_H
    00011 #include "AbcCommon.hpp"
    00012 #include "CoinWarmStartBasis.hpp"
    00013 // could test using ClpSimplex (or for fans)
    00014 #define CLP_WARMSTART
    00015 #ifdef CLP_WARMSTART
    00016 #include "ClpSimplex.hpp"
    00017 #define AbcSimplex ClpSimplex
    00018 #else
    00019 #include "AbcSimplex.hpp"
    00020 #endif
    00021 class AbcWarmStart;
    00022 //#############################################################################
    00023 class AbcWarmStartOrganizer {
    00024 public:
    00026   void createBasis0();
    00028   void createBasis12();
    00030   void createBasis34();
    00032   void deleteBasis(AbcWarmStart * basis);
    00036
    00041   AbcWarmStartOrganizer(AbcSimplex * model=NULL);
    00042
    00044   AbcWarmStartOrganizer(const AbcWarmStartOrganizer& ws) ;
    00045
    00047   virtual ~AbcWarmStartOrganizer();
    00048
    00051   virtual AbcWarmStartOrganizer& operator=(const AbcWarmStartOrganizer& rhs) ;
    00053
    00054 protected:
    00057
    00058   AbcSimplex * model_;
    00060   AbcWarmStart * firstBasis_;
    00062   AbcWarmStart * lastBasis_;
    00064   int numberBases_;
    00066   int sizeBases_;
    00068 };
    00069
    00075 class AbcWarmStart : public virtual CoinWarmStartBasis {
    00076 public:
    00079
    00085   virtual void setSize(int ns, int na) ;
    00086
    00095   virtual void resize (int newNumberRows, int newNumberColumns);
    00096
    00113   virtual void compressRows (int tgtCnt, const int *tgts) ;
    00114
    00126   virtual void deleteRows(int rawTgtCnt, const int *rawTgts) ;
    00127
    00138   virtual void deleteColumns(int number, const int * which);
    00140   inline void setModel(AbcSimplex * model)
    00141   { model_=model;}
    00143   inline AbcSimplex * model() const
    00144   { return model_;}
    00146   void createBasis0(const AbcSimplex * model);
    00148   void createBasis12(const AbcSimplex * model);
    00150   void createBasis34(const AbcSimplex * model);
    00154
    00160   AbcWarmStart();
    00161
    00171   AbcWarmStart(AbcSimplex * model,int type) ;
    00172
    00174   AbcWarmStart(const AbcWarmStart& ws) ;
    00175
    00177   virtual CoinWarmStart *clone() const
    00178   {
    00179      return new AbcWarmStart(*this);
    00180   }
    00181
    00183   virtual ~AbcWarmStart();
    00184
    00187   virtual AbcWarmStart& operator=(const AbcWarmStart& rhs) ;
    00188
    00204   virtual void assignBasisStatus(int ns, int na, char*& sStat, char*& aStat) ;
    00206
    00207 protected:
    00218   int typeExtraInformation_;
    00220   int lengthExtraInformation_;
    00222   char * extraInformation_;
    00224   AbcSimplex * model_;
    00226   AbcWarmStartOrganizer * organizer_;
    00228   AbcWarmStart * previousBasis_;
    00230   AbcWarmStart * nextBasis_;
    00232   int stamp_;
    00237   int numberValidRows_;
    00239 };
    00240 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines