Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbcWarmStart.hpp
Go to the documentation of this file.
1 /* $Id: AbcWarmStart.hpp 1910 2013-01-27 02:00:13Z stefan $ */
9 #ifndef AbcWarmStart_H
10 #define AbcWarmStart_H
11 #include "AbcCommon.hpp"
12 #include "CoinWarmStartBasis.hpp"
13 // could test using ClpSimplex (or for fans)
14 #define CLP_WARMSTART
15 #ifdef CLP_WARMSTART
16 #include "ClpSimplex.hpp"
17 #define AbcSimplex ClpSimplex
18 #else
19 #include "AbcSimplex.hpp"
20 #endif
21 class AbcWarmStart;
22 //#############################################################################
24 public:
26  void createBasis0();
28  void createBasis12();
30  void createBasis34();
32  void deleteBasis(AbcWarmStart * basis);
36 
41  AbcWarmStartOrganizer(AbcSimplex * model=NULL);
42 
45 
47  virtual ~AbcWarmStartOrganizer();
48 
53 
54 protected:
68 };
69 
75 class AbcWarmStart : public virtual CoinWarmStartBasis {
76 public:
79 
85  virtual void setSize(int ns, int na) ;
86 
95  virtual void resize (int newNumberRows, int newNumberColumns);
96 
113  virtual void compressRows (int tgtCnt, const int *tgts) ;
114 
126  virtual void deleteRows(int rawTgtCnt, const int *rawTgts) ;
127 
138  virtual void deleteColumns(int number, const int * which);
140  inline void setModel(AbcSimplex * model)
141  { model_=model;}
143  inline AbcSimplex * model() const
144  { return model_;}
146  void createBasis0(const AbcSimplex * model);
148  void createBasis12(const AbcSimplex * model);
150  void createBasis34(const AbcSimplex * model);
154 
160  AbcWarmStart();
161 
171  AbcWarmStart(AbcSimplex * model,int type) ;
172 
174  AbcWarmStart(const AbcWarmStart& ws) ;
175 
177  virtual CoinWarmStart *clone() const
178  {
179  return new AbcWarmStart(*this);
180  }
181 
183  virtual ~AbcWarmStart();
184 
187  virtual AbcWarmStart& operator=(const AbcWarmStart& rhs) ;
188 
204  virtual void assignBasisStatus(int ns, int na, char*& sStat, char*& aStat) ;
206 
207 protected:
232  int stamp_;
239 };
240 #endif
void setModel(AbcSimplex *model)
Set model.
AbcWarmStart * firstBasis_
Pointer to first basis.
virtual AbcWarmStartOrganizer & operator=(const AbcWarmStartOrganizer &rhs)
Assignment.
AbcSimplex * model() const
Get model.
virtual void compressRows(int tgtCnt, const int *tgts)
Delete a set of rows from the basis.
void createBasis12()
Create Basis type 1,2.
virtual void assignBasisStatus(int ns, int na, char *&sStat, char *&aStat)
Assign the status vectors to be the warm start information.
virtual void deleteRows(int rawTgtCnt, const int *rawTgts)
Delete a set of rows from the basis.
virtual void resize(int newNumberRows, int newNumberColumns)
Set basis capacity; existing basis is maintained.
The default COIN simplex (basis-oriented) warm start class.
int numberBases_
Number of bases.
void createBasis0()
Create Basis type 0.
AbcWarmStart * previousBasis_
Pointer to previous basis.
int typeExtraInformation_
Type of basis (always status arrays) 0 - as CoinWarmStartBasis 1,2 - plus factor order as shorts or ...
char * extraInformation_
The extra information.
AbcSimplex * model_
Pointer to AbcSimplex (can only be applied to that)
void createBasis12(const AbcSimplex *model)
Create Basis type 12.
virtual ~AbcWarmStartOrganizer()
Destructor.
int stamp_
Sequence stamp for deletion.
virtual void setSize(int ns, int na)
Set basis capacity; existing basis is discarded.
AbcWarmStart * lastBasis_
Pointer to last basis.
virtual AbcWarmStart & operator=(const AbcWarmStart &rhs)
Assignment.
int numberValidRows_
Number of valid rows (rest should have slacks) Check to see if weights are OK for these rows and then...
int sizeBases_
Size of bases (extra)
AbcWarmStart * nextBasis_
Pointer to next basis.
void createBasis0(const AbcSimplex *model)
Create Basis type 0.
virtual ~AbcWarmStart()
Destructor.
As CoinWarmStartBasis but with alternatives (Also uses Clp status meaning for slacks) ...
AbcSimplex * model_
Pointer back to AbcSimplex (can only be applied to that)
virtual CoinWarmStart * clone() const
`Virtual constructor'
virtual void deleteColumns(int number, const int *which)
Delete a set of columns from the basis.
void createBasis34()
Create Basis type 3,4.
AbcWarmStartOrganizer(AbcSimplex *model=NULL)
Default constructor.
Abstract base class for warm start information.
void createBasis34(const AbcSimplex *model)
Create Basis type 34.
void deleteBasis(AbcWarmStart *basis)
delete basis
AbcWarmStart()
Default constructor.
int lengthExtraInformation_
Length of extra information in bytes.
AbcWarmStartOrganizer * organizer_
Pointer back to AbcWarmStartOrganizer for organization.