Loading...
Searching...
No Matches
AbcWarmStart.hpp
Go to the documentation of this file.
/* $Id$ */
#ifndef AbcWarmStart_H
#define AbcWarmStart_H
#include "AbcCommon.hpp"
#include "CoinWarmStartBasis.hpp"
// could test using ClpSimplex (or for fans)
#define CLP_WARMSTART
#ifdef CLP_WARMSTART
#include "ClpSimplex.hpp"
#define AbcSimplex ClpSimplex
#else
#include "AbcSimplex.hpp"
#endif
class AbcWarmStart;
//#############################################################################
class AbcWarmStartOrganizer {
public:
void createBasis0();
void createBasis12();
void createBasis34();
void deleteBasis(AbcWarmStart *basis);
AbcWarmStartOrganizer(AbcSimplex *model = NULL);
AbcWarmStartOrganizer(const AbcWarmStartOrganizer &ws);
virtual ~AbcWarmStartOrganizer();
virtual AbcWarmStartOrganizer &operator=(const AbcWarmStartOrganizer &rhs);
protected:
AbcSimplex *model_;
AbcWarmStart *firstBasis_;
AbcWarmStart *lastBasis_;
int numberBases_;
int sizeBases_;
};
class AbcWarmStart : public virtual CoinWarmStartBasis {
public:
virtual void setSize(int ns, int na);
virtual void resize(int newNumberRows, int newNumberColumns);
virtual void compressRows(int tgtCnt, const int *tgts);
virtual void deleteRows(int rawTgtCnt, const int *rawTgts);
virtual void deleteColumns(int number, const int *which);
inline void setModel(AbcSimplex *model)
{
model_ = model;
}
inline AbcSimplex *model() const
{
return model_;
}
void createBasis0(const AbcSimplex *model);
void createBasis12(const AbcSimplex *model);
void createBasis34(const AbcSimplex *model);
AbcWarmStart();
AbcWarmStart(AbcSimplex *model, int type);
AbcWarmStart(const AbcWarmStart &ws);
virtual CoinWarmStart *clone() const
{
return new AbcWarmStart(*this);
}
virtual ~AbcWarmStart();
virtual AbcWarmStart &operator=(const AbcWarmStart &rhs);
virtual void assignBasisStatus(int ns, int na, char *&sStat, char *&aStat);
protected:
int typeExtraInformation_;
int lengthExtraInformation_;
char *extraInformation_;
AbcSimplex *model_;
AbcWarmStartOrganizer *organizer_;
AbcWarmStart *previousBasis_;
AbcWarmStart *nextBasis_;
int stamp_;
int numberValidRows_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
AbcCommon.hpp
AbcSimplex.hpp
AbcSimplex
#define AbcSimplex
Definition AbcWarmStart.hpp:16
type
CbcOrClpParameterType type() const
type
Definition CbcOrClpParam.hpp:462
ClpSimplex.hpp
AbcWarmStartOrganizer
Definition AbcWarmStart.hpp:22
AbcWarmStartOrganizer::firstBasis_
AbcWarmStart * firstBasis_
Pointer to first basis.
Definition AbcWarmStart.hpp:59
AbcWarmStartOrganizer::lastBasis_
AbcWarmStart * lastBasis_
Pointer to last basis.
Definition AbcWarmStart.hpp:61
AbcWarmStartOrganizer::model_
AbcSimplex * model_
Pointer to AbcSimplex (can only be applied to that).
Definition AbcWarmStart.hpp:57
AbcWarmStartOrganizer::~AbcWarmStartOrganizer
virtual ~AbcWarmStartOrganizer()
Destructor.
AbcWarmStartOrganizer::createBasis0
void createBasis0()
Create Basis type 0.
AbcWarmStartOrganizer::createBasis12
void createBasis12()
Create Basis type 1,2.
AbcWarmStartOrganizer::numberBases_
int numberBases_
Number of bases.
Definition AbcWarmStart.hpp:63
AbcWarmStartOrganizer::AbcWarmStartOrganizer
AbcWarmStartOrganizer(AbcSimplex *model=NULL)
Default constructor.
AbcWarmStartOrganizer::deleteBasis
void deleteBasis(AbcWarmStart *basis)
delete basis
AbcWarmStartOrganizer::createBasis34
void createBasis34()
Create Basis type 3,4.
AbcWarmStartOrganizer::sizeBases_
int sizeBases_
Size of bases (extra).
Definition AbcWarmStart.hpp:65
AbcWarmStartOrganizer::operator=
virtual AbcWarmStartOrganizer & operator=(const AbcWarmStartOrganizer &rhs)
Assignment.
AbcWarmStartOrganizer::AbcWarmStartOrganizer
AbcWarmStartOrganizer(const AbcWarmStartOrganizer &ws)
Copy constructor.
AbcWarmStart
As CoinWarmStartBasis but with alternatives (Also uses Clp status meaning for slacks).
Definition AbcWarmStart.hpp:74
AbcWarmStart::createBasis12
void createBasis12(const AbcSimplex *model)
Create Basis type 12.
AbcWarmStart::nextBasis_
AbcWarmStart * nextBasis_
Pointer to next basis.
Definition AbcWarmStart.hpp:233
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
AbcWarmStart()
Default constructor.
AbcWarmStart::createBasis0
void createBasis0(const AbcSimplex *model)
Create Basis type 0.
AbcWarmStart::AbcWarmStart
AbcWarmStart(const AbcWarmStart &ws)
Copy constructor.
AbcWarmStart::deleteColumns
virtual void deleteColumns(int number, const int *which)
Delete a set of columns from the basis.
AbcWarmStart::extraInformation_
char * extraInformation_
The extra information.
Definition AbcWarmStart.hpp:225
AbcWarmStart::setModel
void setModel(AbcSimplex *model)
Set model.
Definition AbcWarmStart.hpp:139
AbcWarmStart::stamp_
int stamp_
Sequence stamp for deletion.
Definition AbcWarmStart.hpp:235
AbcWarmStart::~AbcWarmStart
virtual ~AbcWarmStart()
`Virtual constructor' */ virtual CoinWarmStart *clone() const { return new AbcWarmStart(*this); }
AbcWarmStart::lengthExtraInformation_
int lengthExtraInformation_
Length of extra information in bytes.
Definition AbcWarmStart.hpp:223
AbcWarmStart::deleteRows
virtual void deleteRows(int rawTgtCnt, const int *rawTgts)
Delete a set of rows from the basis.
AbcWarmStart::operator=
virtual AbcWarmStart & operator=(const AbcWarmStart &rhs)
Assignment.
AbcWarmStart::model_
AbcSimplex * model_
Pointer back to AbcSimplex (can only be applied to that).
Definition AbcWarmStart.hpp:227
AbcWarmStart::setSize
virtual void setSize(int ns, int na)
Set basis capacity; existing basis is discarded.
AbcWarmStart::compressRows
virtual void compressRows(int tgtCnt, const int *tgts)
Delete a set of rows 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:240
AbcWarmStart::resize
virtual void resize(int newNumberRows, int newNumberColumns)
Set basis capacity; existing basis is maintained.
AbcWarmStart::assignBasisStatus
virtual void assignBasisStatus(int ns, int na, char *&sStat, char *&aStat)
Assign the status vectors to be the warm start information.
AbcWarmStart::createBasis34
void createBasis34(const AbcSimplex *model)
Create Basis type 34.
AbcWarmStart::model
AbcSimplex * model() const
Get model.
Definition AbcWarmStart.hpp:144
AbcWarmStart::AbcWarmStart
AbcWarmStart(AbcSimplex *model, int type)
Constructs a warm start object with the specified status vectors.
AbcWarmStart::previousBasis_
AbcWarmStart * previousBasis_
Pointer to previous basis.
Definition AbcWarmStart.hpp:231
AbcWarmStart::organizer_
AbcWarmStartOrganizer * organizer_
Pointer back to AbcWarmStartOrganizer for organization.
Definition AbcWarmStart.hpp:229