- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 //#############################################################################
23 class AbcWarmStartOrganizer {
24 public:
26 void createBasis0();
28 void createBasis12();
30 void createBasis34();
32 void deleteBasis(AbcWarmStart * basis);
36
41 AbcWarmStartOrganizer(AbcSimplex * model=NULL);
42
44 AbcWarmStartOrganizer(const AbcWarmStartOrganizer& ws) ;
45
47 virtual ~AbcWarmStartOrganizer();
48
51 virtual AbcWarmStartOrganizer& operator=(const AbcWarmStartOrganizer& rhs) ;
53
54 protected:
57 AbcSimplex * model_;
60 AbcWarmStart * firstBasis_;
62 AbcWarmStart * lastBasis_;
64 int numberBases_;
66 int sizeBases_;
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:
218 int typeExtraInformation_;
220 int lengthExtraInformation_;
222 char * extraInformation_;
224 AbcSimplex * model_;
226 AbcWarmStartOrganizer * organizer_;
228 AbcWarmStart * previousBasis_;
230 AbcWarmStart * nextBasis_;
232 int stamp_;
237 int numberValidRows_;
239 };
240 #endif
AbcSimplex
Definition: AbcSimplex.hpp:62
AbcSimplex.hpp
AbcWarmStart::createBasis0
void createBasis0(const AbcSimplex *model)
Create Basis type 0.
AbcWarmStart::model_
AbcSimplex * model_
Pointer back to AbcSimplex (can only be applied to that)
Definition: AbcWarmStart.hpp:224
AbcWarmStart::resize
virtual void resize(int newNumberRows, int newNumberColumns)
Set basis capacity; existing basis is maintained.
AbcWarmStartOrganizer::operator=
virtual AbcWarmStartOrganizer & operator=(const AbcWarmStartOrganizer &rhs)
Assignment.
AbcWarmStartOrganizer::AbcWarmStartOrganizer
AbcWarmStartOrganizer(AbcSimplex *model=NULL)
Default constructor.
AbcWarmStart::previousBasis_
AbcWarmStart * previousBasis_
Pointer to previous basis.
Definition: AbcWarmStart.hpp:228
AbcWarmStart::extraInformation_
char * extraInformation_
The extra information.
Definition: AbcWarmStart.hpp:222
AbcCommon.hpp
ClpSimplex.hpp
AbcWarmStartOrganizer::sizeBases_
int sizeBases_
Size of bases (extra)
Definition: AbcWarmStart.hpp:66
AbcWarmStart::setSize
virtual void setSize(int ns, int na)
Set basis capacity; existing basis is discarded.
AbcWarmStartOrganizer::lastBasis_
AbcWarmStart * lastBasis_
Pointer to last basis.
Definition: AbcWarmStart.hpp:62
AbcWarmStart::stamp_
int stamp_
Sequence stamp for deletion.
Definition: AbcWarmStart.hpp:232
AbcWarmStartOrganizer::createBasis34
void createBasis34()
Create Basis type 3,4.
AbcWarmStart::nextBasis_
AbcWarmStart * nextBasis_
Pointer to next basis.
Definition: AbcWarmStart.hpp:230
AbcWarmStartOrganizer::numberBases_
int numberBases_
Number of bases.
Definition: AbcWarmStart.hpp:64
AbcWarmStart::model
AbcSimplex * model() const
Get model.
Definition: AbcWarmStart.hpp:143
AbcWarmStart::createBasis34
void createBasis34(const AbcSimplex *model)
Create Basis type 34.
AbcWarmStart::deleteRows
virtual void deleteRows(int rawTgtCnt, const int *rawTgts)
Delete a set of rows from the basis.
AbcWarmStart::typeExtraInformation_
int typeExtraInformation_
Type of basis (always status arrays) 0 - as CoinWarmStartBasis 1,2 - plus factor order as shorts or ...
Definition: AbcWarmStart.hpp:218
AbcWarmStartOrganizer::~AbcWarmStartOrganizer
virtual ~AbcWarmStartOrganizer()
Destructor.
AbcWarmStart::operator=
virtual AbcWarmStart & operator=(const AbcWarmStart &rhs)
Assignment.
AbcWarmStartOrganizer::createBasis12
void createBasis12()
Create Basis type 1,2.
AbcWarmStart::deleteColumns
virtual void deleteColumns(int number, const int *which)
Delete a set of columns from the basis.
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:237
CoinWarmStartBasis.hpp
AbcWarmStart::setModel
void setModel(AbcSimplex *model)
Set model.
Definition: AbcWarmStart.hpp:140
AbcWarmStartOrganizer::model_
AbcSimplex * model_
Pointer to AbcSimplex (can only be applied to that)
Definition: AbcWarmStart.hpp:58
AbcWarmStart::assignBasisStatus
virtual void assignBasisStatus(int ns, int na, char *&sStat, char *&aStat)
Assign the status vectors to be the warm start information.
AbcWarmStartOrganizer::createBasis0
void createBasis0()
Create Basis type 0.
AbcWarmStart::AbcWarmStart
AbcWarmStart()
Default constructor.
CoinWarmStart
Abstract base class for warm start information.
Definition: CoinWarmStart.hpp:21
AbcWarmStartOrganizer::firstBasis_
AbcWarmStart * firstBasis_
Pointer to first basis.
Definition: AbcWarmStart.hpp:60
AbcWarmStart::clone
virtual CoinWarmStart * clone() const
`Virtual constructor&#39;
Definition: AbcWarmStart.hpp:177
AbcWarmStartOrganizer::deleteBasis
void deleteBasis(AbcWarmStart *basis)
delete basis
AbcWarmStart::compressRows
virtual void compressRows(int tgtCnt, const int *tgts)
Delete a set of rows from the basis.
AbcWarmStart::createBasis12
void createBasis12(const AbcSimplex *model)
Create Basis type 12.
AbcWarmStart
Definition: AbcWarmStart.hpp:75
AbcWarmStart::lengthExtraInformation_
int lengthExtraInformation_
Length of extra information in bytes.
Definition: AbcWarmStart.hpp:220
AbcWarmStart::organizer_
AbcWarmStartOrganizer * organizer_
Pointer back to AbcWarmStartOrganizer for organization.
Definition: AbcWarmStart.hpp:226
AbcWarmStart::~AbcWarmStart
virtual ~AbcWarmStart()
Destructor.
CoinWarmStartBasis
The default COIN simplex (basis-oriented) warm start class.
Definition: CoinWarmStartBasis.hpp:40
AbcWarmStartOrganizer
Definition: AbcWarmStart.hpp:23