Loading...
Searching...
No Matches
ClpDualRowPivot.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 ClpDualRowPivot_H
#define ClpDualRowPivot_H
class ClpSimplex;
class CoinIndexedVector;
//#############################################################################
class ClpDualRowPivot {
public:
virtual int pivotRow() = 0;
virtual double updateWeights(CoinIndexedVector *input,
CoinIndexedVector *spare,
CoinIndexedVector *spare2,
CoinIndexedVector *updatedColumn)
= 0;
/* FIXME: this was pure virtul (=0). Why? */
virtual void updatePrimalSolution(CoinIndexedVector *input,
double theta,
double &changeInObjective)
= 0;
virtual void saveWeights(ClpSimplex *model, int mode);
virtual void checkAccuracy();
virtual void unrollWeights();
virtual void clearArrays();
virtual bool looksOptimal() const
{
return false;
}
virtual void maximumPivotsChanged() {}
ClpDualRowPivot();
ClpDualRowPivot(const ClpDualRowPivot &);
ClpDualRowPivot &operator=(const ClpDualRowPivot &rhs);
virtual ~ClpDualRowPivot();
virtual ClpDualRowPivot *clone(bool copyData = true) const = 0;
inline ClpSimplex *model()
{
return model_;
}
inline void setModel(ClpSimplex *newmodel)
{
model_ = newmodel;
}
inline int type()
{
return type_;
}
//---------------------------------------------------------------------------
protected:
ClpSimplex *model_;
int type_;
};
#ifndef CLP_DUAL_COLUMN_MULTIPLIER
//#define CLP_DUAL_COLUMN_MULTIPLIER 0.99999
#endif
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
ClpDualRowPivot::ClpDualRowPivot
ClpDualRowPivot(const ClpDualRowPivot &)
Copy constructor.
ClpDualRowPivot::clone
virtual ClpDualRowPivot * clone(bool copyData=true) const =0
Clone.
ClpDualRowPivot::setModel
void setModel(ClpSimplex *newmodel)
Sets model (normally to NULL).
Definition ClpDualRowPivot.hpp:106
ClpDualRowPivot::type
int type()
Returns type (above 63 is extra information).
Definition ClpDualRowPivot.hpp:112
ClpDualRowPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition ClpDualRowPivot.hpp:75
ClpDualRowPivot::model
ClpSimplex * model()
Returns model.
Definition ClpDualRowPivot.hpp:100
ClpDualRowPivot::type_
int type_
Type of row pivot algorithm.
Definition ClpDualRowPivot.hpp:127
ClpDualRowPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any row.
Definition ClpDualRowPivot.hpp:70
ClpDualRowPivot::model_
ClpSimplex * model_
Pointer to model.
Definition ClpDualRowPivot.hpp:125
ClpDualRowPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty).
ClpDualRowPivot::operator=
ClpDualRowPivot & operator=(const ClpDualRowPivot &rhs)
Assignment operator.
ClpDualRowPivot::ClpDualRowPivot
ClpDualRowPivot()
Default Constructor.
ClpDualRowPivot::unrollWeights
virtual void unrollWeights()
Gets rid of last update (may be empty).
ClpDualRowPivot::updatePrimalSolution
virtual void updatePrimalSolution(CoinIndexedVector *input, double theta, double &changeInObjective)=0
Updates primal solution (and maybe list of candidates) Uses input vector which it deletes Computes ch...
ClpDualRowPivot::checkAccuracy
virtual void checkAccuracy()
checks accuracy and may re-initialize (may be empty)
ClpDualRowPivot::updateWeights
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)=0
Updates weights and returns pivot alpha.
ClpDualRowPivot::pivotRow
virtual int pivotRow()=0
Returns pivot row, -1 if none.
ClpDualRowPivot::~ClpDualRowPivot
virtual ~ClpDualRowPivot()
Destructor.
ClpDualRowPivot::saveWeights
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106