Loading...
Searching...
No Matches
AbcPrimalColumnPivot.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2002, International Business Machines
// Corporation and others, Copyright (C) 2012, FasterCoin. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef AbcPrimalColumnPivot_H
#define AbcPrimalColumnPivot_H
#include "AbcCommon.hpp"
class AbcSimplex;
class CoinIndexedVector;
//#############################################################################
class AbcPrimalColumnPivot {
public:
virtual int pivotColumn(CoinPartitionedVector *updates,
CoinPartitionedVector *spareRow2,
CoinPartitionedVector *spareColumn1)
= 0;
virtual void updateWeights(CoinIndexedVector *input);
virtual void saveWeights(AbcSimplex *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;
}
AbcPrimalColumnPivot();
AbcPrimalColumnPivot(const AbcPrimalColumnPivot &);
AbcPrimalColumnPivot &operator=(const AbcPrimalColumnPivot &rhs);
virtual ~AbcPrimalColumnPivot();
virtual AbcPrimalColumnPivot *clone(bool copyData = true) const = 0;
inline AbcSimplex *model()
{
return model_;
}
inline void setModel(AbcSimplex *newmodel)
{
model_ = newmodel;
}
inline int type()
{
return type_;
}
virtual int numberSprintColumns(int &numberIterations) const;
virtual void switchOffSprint();
virtual void maximumPivotsChanged() {}
//---------------------------------------------------------------------------
protected:
AbcSimplex *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
*/
AbcCommon.hpp
AbcSimplex
#define AbcSimplex
Definition AbcWarmStart.hpp:16
AbcPrimalColumnPivot::type_
int type_
Type of column pivot algorithm.
Definition AbcPrimalColumnPivot.hpp:151
AbcPrimalColumnPivot::setLooksOptimal
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use).
Definition AbcPrimalColumnPivot.hpp:88
AbcPrimalColumnPivot::switchOffSprint
virtual void switchOffSprint()
Switch off sprint idea.
AbcPrimalColumnPivot::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 AbcPrimalColumnPivot.hpp:75
AbcPrimalColumnPivot::clone
virtual AbcPrimalColumnPivot * clone(bool copyData=true) const =0
Clone.
AbcPrimalColumnPivot::saveWeights
virtual void saveWeights(AbcSimplex *model, int mode)=0
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
AbcPrimalColumnPivot::looksOptimal_
bool looksOptimal_
Says if looks optimal (normally computed).
Definition AbcPrimalColumnPivot.hpp:153
AbcPrimalColumnPivot::numberSprintColumns
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
AbcPrimalColumnPivot::operator=
AbcPrimalColumnPivot & operator=(const AbcPrimalColumnPivot &rhs)
Assignment operator.
AbcPrimalColumnPivot::setModel
void setModel(AbcSimplex *newmodel)
Sets model.
Definition AbcPrimalColumnPivot.hpp:121
AbcPrimalColumnPivot::updateWeights
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 (may be empty).
AbcPrimalColumnPivot::model
AbcSimplex * model()
Returns model.
Definition AbcPrimalColumnPivot.hpp:116
AbcPrimalColumnPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition AbcPrimalColumnPivot.hpp:139
AbcPrimalColumnPivot::AbcPrimalColumnPivot
AbcPrimalColumnPivot()
Default Constructor.
AbcPrimalColumnPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any column.
Definition AbcPrimalColumnPivot.hpp:83
AbcPrimalColumnPivot::model_
AbcSimplex * model_
Pointer to model.
Definition AbcPrimalColumnPivot.hpp:149
AbcPrimalColumnPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty).
AbcPrimalColumnPivot::type
int type()
Returns type (above 63 is extra information).
Definition AbcPrimalColumnPivot.hpp:127
AbcPrimalColumnPivot::AbcPrimalColumnPivot
AbcPrimalColumnPivot(const AbcPrimalColumnPivot &)
Copy constructor.
AbcPrimalColumnPivot::~AbcPrimalColumnPivot
virtual ~AbcPrimalColumnPivot()
Destructor.
AbcPrimalColumnPivot::pivotColumn
virtual int pivotColumn(CoinPartitionedVector *updates, CoinPartitionedVector *spareRow2, CoinPartitionedVector *spareColumn1)=0
Returns pivot column, -1 if none.