Clp  1.17.8
AbcWarmStart.hpp
Go to the documentation of this file.
1 /* $Id$ */
8 #ifndef AbcWarmStart_H
9 #define AbcWarmStart_H
10 #include "AbcCommon.hpp"
11 #include "CoinWarmStartBasis.hpp"
12 // could test using ClpSimplex (or for fans)
13 #define CLP_WARMSTART
14 #ifdef CLP_WARMSTART
15 #include "ClpSimplex.hpp"
16 #define AbcSimplex ClpSimplex
17 #else
18 #include "AbcSimplex.hpp"
19 #endif
20 class AbcWarmStart;
21 //#############################################################################
23 public:
25  void createBasis0();
27  void createBasis12();
29  void createBasis34();
31  void deleteBasis(AbcWarmStart *basis);
35 
40  AbcWarmStartOrganizer(AbcSimplex *model = NULL);
41 
44 
46  virtual ~AbcWarmStartOrganizer();
47 
52 
53 protected:
67 };
68 
74 class AbcWarmStart : public virtual CoinWarmStartBasis {
75 public:
78 
84  virtual void setSize(int ns, int na);
85 
94  virtual void resize(int newNumberRows, int newNumberColumns);
95 
112  virtual void compressRows(int tgtCnt, const int *tgts);
113 
125  virtual void deleteRows(int rawTgtCnt, const int *rawTgts);
126 
137  virtual void deleteColumns(int number, const int *which);
139  inline void setModel(AbcSimplex *model)
140  {
141  model_ = model;
142  }
144  inline AbcSimplex *model() const
145  {
146  return model_;
147  }
149  void createBasis0(const AbcSimplex *model);
151  void createBasis12(const AbcSimplex *model);
153  void createBasis34(const AbcSimplex *model);
157 
163  AbcWarmStart();
164 
174  AbcWarmStart(AbcSimplex *model, int type);
175 
177  AbcWarmStart(const AbcWarmStart &ws);
178 
180  virtual CoinWarmStart *clone() const
181  {
182  return new AbcWarmStart(*this);
183  }
184 
186  virtual ~AbcWarmStart();
187 
190  virtual AbcWarmStart &operator=(const AbcWarmStart &rhs);
191 
207  virtual void assignBasisStatus(int ns, int na, char *&sStat, char *&aStat);
209 
210 protected:
235  int stamp_;
242 };
243 #endif
244 
245 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
246 */
AbcWarmStart::setSize
virtual void setSize(int ns, int na)
Set basis capacity; existing basis is discarded.
AbcWarmStart::nextBasis_
AbcWarmStart * nextBasis_
Pointer to next basis.
Definition: AbcWarmStart.hpp:233
AbcWarmStart::model_
AbcSimplex * model_
Pointer back to AbcSimplex (can only be applied to that)
Definition: AbcWarmStart.hpp:227
AbcWarmStartOrganizer::AbcWarmStartOrganizer
AbcWarmStartOrganizer(AbcSimplex *model=NULL)
Default constructor.
AbcWarmStart::deleteColumns
virtual void deleteColumns(int number, const int *which)
Delete a set of columns from the basis.
AbcWarmStart
Definition: AbcWarmStart.hpp:74
AbcWarmStart::lengthExtraInformation_
int lengthExtraInformation_
Length of extra information in bytes.
Definition: AbcWarmStart.hpp:223
AbcWarmStartOrganizer::deleteBasis
void deleteBasis(AbcWarmStart *basis)
delete basis
AbcWarmStart::createBasis0
void createBasis0(const AbcSimplex *model)
Create Basis type 0.
AbcWarmStartOrganizer::~AbcWarmStartOrganizer
virtual ~AbcWarmStartOrganizer()
Destructor.
AbcWarmStart::setModel
void setModel(AbcSimplex *model)
Set model.
Definition: AbcWarmStart.hpp:139
AbcCommon.hpp
AbcWarmStart::typeExtraInformation_
int typeExtraInformation_
Type of basis (always status arrays) 0 - as CoinWarmStartBasis 1,2 - plus factor order as shorts or i...
Definition: AbcWarmStart.hpp:221
AbcWarmStart::~AbcWarmStart
virtual ~AbcWarmStart()
Destructor.
AbcWarmStart::stamp_
int stamp_
Sequence stamp for deletion.
Definition: AbcWarmStart.hpp:235
ClpSimplex.hpp
AbcWarmStart::AbcWarmStart
AbcWarmStart()
Default constructor.
AbcWarmStartOrganizer::createBasis0
void createBasis0()
Create Basis type 0.
AbcWarmStart::assignBasisStatus
virtual void assignBasisStatus(int ns, int na, char *&sStat, char *&aStat)
Assign the status vectors to be the warm start information.
AbcWarmStartOrganizer::operator=
virtual AbcWarmStartOrganizer & operator=(const AbcWarmStartOrganizer &rhs)
Assignment.
AbcWarmStart::deleteRows
virtual void deleteRows(int rawTgtCnt, const int *rawTgts)
Delete a set of rows from the basis.
AbcSimplex
Definition: AbcSimplex.hpp:62
AbcWarmStart::model
AbcSimplex * model() const
Get model.
Definition: AbcWarmStart.hpp:144
AbcWarmStart::extraInformation_
char * extraInformation_
The extra information.
Definition: AbcWarmStart.hpp:225
AbcWarmStartOrganizer::createBasis12
void createBasis12()
Create Basis type 1,2.
AbcWarmStart::createBasis34
void createBasis34(const AbcSimplex *model)
Create Basis type 34.
AbcWarmStartOrganizer
Definition: AbcWarmStart.hpp:22
AbcWarmStart::previousBasis_
AbcWarmStart * previousBasis_
Pointer to previous basis.
Definition: AbcWarmStart.hpp:231
AbcWarmStart::createBasis12
void createBasis12(const AbcSimplex *model)
Create Basis type 12.
AbcWarmStartOrganizer::numberBases_
int numberBases_
Number of bases.
Definition: AbcWarmStart.hpp:63
AbcWarmStartOrganizer::firstBasis_
AbcWarmStart * firstBasis_
Pointer to first basis.
Definition: AbcWarmStart.hpp:59
AbcSimplex.hpp
AbcWarmStart::numberValidRows_
int numberValidRows_
Number of valid rows (rest should have slacks) Check to see if weights are OK for these rows and then...
Definition: AbcWarmStart.hpp:240
AbcWarmStart::organizer_
AbcWarmStartOrganizer * organizer_
Pointer back to AbcWarmStartOrganizer for organization.
Definition: AbcWarmStart.hpp:229
AbcWarmStart::clone
virtual CoinWarmStart * clone() const
‘Virtual constructor’
Definition: AbcWarmStart.hpp:180
AbcWarmStartOrganizer::createBasis34
void createBasis34()
Create Basis type 3,4.
AbcWarmStartOrganizer::model_
AbcSimplex * model_
Pointer to AbcSimplex (can only be applied to that)
Definition: AbcWarmStart.hpp:57
AbcWarmStart::operator=
virtual AbcWarmStart & operator=(const AbcWarmStart &rhs)
Assignment.
AbcWarmStartOrganizer::sizeBases_
int sizeBases_
Size of bases (extra)
Definition: AbcWarmStart.hpp:65
AbcWarmStart::compressRows
virtual void compressRows(int tgtCnt, const int *tgts)
Delete a set of rows from the basis.
AbcWarmStart::resize
virtual void resize(int newNumberRows, int newNumberColumns)
Set basis capacity; existing basis is maintained.
AbcWarmStartOrganizer::lastBasis_
AbcWarmStart * lastBasis_
Pointer to last basis.
Definition: AbcWarmStart.hpp:61