Loading...
Searching...
No Matches
ClpPrimalColumnPivot.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2002, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef ClpPrimalcolumnPivot_H
#define ClpPrimalcolumnPivot_H
class ClpSimplex;
class CoinIndexedVector;
//#############################################################################
class ClpPrimalColumnPivot {
public:
virtual int pivotColumn(CoinIndexedVector *updates,
CoinIndexedVector *spareRow1,
CoinIndexedVector *spareRow2,
CoinIndexedVector *spareColumn1,
CoinIndexedVector *spareColumn2)
= 0;
virtual void updateWeights(CoinIndexedVector *input);
virtual void saveWeights(ClpSimplex *model, int mode) = 0;
virtual int pivotRow(double &way)
{
way = 0;
return -2;
}
virtual void clearArrays();
virtual bool looksOptimal() const
{
return looksOptimal_;
}
virtual void setLooksOptimal(bool flag)
{
looksOptimal_ = flag;
}
ClpPrimalColumnPivot();
ClpPrimalColumnPivot(const ClpPrimalColumnPivot &);
ClpPrimalColumnPivot &operator=(const ClpPrimalColumnPivot &rhs);
virtual ~ClpPrimalColumnPivot();
virtual ClpPrimalColumnPivot *clone(bool copyData = true) const = 0;
inline ClpSimplex *model()
{
return model_;
}
inline void setModel(ClpSimplex *newmodel)
{
model_ = newmodel;
}
inline int type()
{
return type_;
}
virtual int numberSprintColumns(int &numberIterations) const;
virtual void switchOffSprint();
virtual void maximumPivotsChanged() {}
//---------------------------------------------------------------------------
protected:
ClpSimplex *model_;
int type_;
bool looksOptimal_;
};
#ifndef CLP_PRIMAL_SLACK_MULTIPLIER
#define CLP_PRIMAL_SLACK_MULTIPLIER 1.01
#endif
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
ClpPrimalColumnPivot::model
ClpSimplex * model()
Returns model.
Definition ClpPrimalColumnPivot.hpp:117
ClpPrimalColumnPivot::pivotRow
virtual int pivotRow(double &way)
Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (w...
Definition ClpPrimalColumnPivot.hpp:76
ClpPrimalColumnPivot::saveWeights
virtual void saveWeights(ClpSimplex *model, int mode)=0
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
ClpPrimalColumnPivot::ClpPrimalColumnPivot
ClpPrimalColumnPivot(const ClpPrimalColumnPivot &)
Copy constructor.
ClpPrimalColumnPivot::operator=
ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot &rhs)
Assignment operator.
ClpPrimalColumnPivot::~ClpPrimalColumnPivot
virtual ~ClpPrimalColumnPivot()
Destructor.
ClpPrimalColumnPivot::switchOffSprint
virtual void switchOffSprint()
Switch off sprint idea.
ClpPrimalColumnPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any column.
Definition ClpPrimalColumnPivot.hpp:84
ClpPrimalColumnPivot::updateWeights
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 (may be empty).
ClpPrimalColumnPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition ClpPrimalColumnPivot.hpp:140
ClpPrimalColumnPivot::numberSprintColumns
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
ClpPrimalColumnPivot::ClpPrimalColumnPivot
ClpPrimalColumnPivot()
Default Constructor.
ClpPrimalColumnPivot::clone
virtual ClpPrimalColumnPivot * clone(bool copyData=true) const =0
Clone.
ClpPrimalColumnPivot::type
int type()
Returns type (above 63 is extra information).
Definition ClpPrimalColumnPivot.hpp:128
ClpPrimalColumnPivot::model_
ClpSimplex * model_
Pointer to model.
Definition ClpPrimalColumnPivot.hpp:150
ClpPrimalColumnPivot::pivotColumn
virtual int pivotColumn(CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)=0
Returns pivot column, -1 if none.
ClpPrimalColumnPivot::type_
int type_
Type of column pivot algorithm.
Definition ClpPrimalColumnPivot.hpp:152
ClpPrimalColumnPivot::setModel
void setModel(ClpSimplex *newmodel)
Sets model.
Definition ClpPrimalColumnPivot.hpp:122
ClpPrimalColumnPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty).
ClpPrimalColumnPivot::setLooksOptimal
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use).
Definition ClpPrimalColumnPivot.hpp:89
ClpPrimalColumnPivot::looksOptimal_
bool looksOptimal_
Says if looks optimal (normally computed).
Definition ClpPrimalColumnPivot.hpp:154
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106