Loading...
Searching...
No Matches
ClpDualRowSteepest.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 ClpDualRowSteepest_H
#define ClpDualRowSteepest_H
#include "ClpDualRowPivot.hpp"
class CoinIndexedVector;
//#############################################################################
class ClpDualRowSteepest : public ClpDualRowPivot {
public:
virtual int pivotRow();
virtual double updateWeights(CoinIndexedVector *input,
CoinIndexedVector *spare,
CoinIndexedVector *spare2,
CoinIndexedVector *updatedColumn);
virtual void updatePrimalSolution(CoinIndexedVector *input,
double theta,
double &changeInObjective);
virtual void saveWeights(ClpSimplex *model, int mode);
void passInSavedWeights(const CoinIndexedVector *saved);
inline CoinIndexedVector *savedWeights()
{
return savedWeights_;
}
virtual void unrollWeights();
virtual void clearArrays();
virtual bool looksOptimal() const;
virtual void maximumPivotsChanged();
enum Persistence {
normal = 0x00, // create (if necessary) and destroy
keep = 0x01 // create (if necessary) and leave
};
ClpDualRowSteepest(int mode = 3);
ClpDualRowSteepest(const ClpDualRowSteepest &);
ClpDualRowSteepest &operator=(const ClpDualRowSteepest &rhs);
void fill(const ClpDualRowSteepest &rhs);
virtual ~ClpDualRowSteepest();
virtual ClpDualRowPivot *clone(bool copyData = true) const;
inline int mode() const
{
return mode_;
}
inline void setMode(int mode)
{
mode_ = mode;
}
inline void setPersistence(Persistence life)
{
persistence_ = life;
}
inline Persistence persistence() const
{
return persistence_;
}
//---------------------------------------------------------------------------
protected:
int state_;
int mode_;
Persistence persistence_;
double *weights_;
CoinIndexedVector *infeasible_;
CoinIndexedVector *alternateWeights_;
CoinIndexedVector *savedWeights_;
int *dubiousWeights_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
ClpDualRowPivot.hpp
ClpDualRowPivot::model
ClpSimplex * model()
Returns model.
Definition ClpDualRowPivot.hpp:100
ClpDualRowPivot::ClpDualRowPivot
ClpDualRowPivot()
Default Constructor.
ClpDualRowSteepest::operator=
ClpDualRowSteepest & operator=(const ClpDualRowSteepest &rhs)
Assignment operator.
ClpDualRowSteepest::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
ClpDualRowSteepest::Persistence
Persistence
enums for persistence
Definition ClpDualRowSteepest.hpp:74
ClpDualRowSteepest::normal
@ normal
Definition ClpDualRowSteepest.hpp:75
ClpDualRowSteepest::keep
@ keep
Definition ClpDualRowSteepest.hpp:76
ClpDualRowSteepest::updateWeights
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)
Updates weights and returns pivot alpha.
ClpDualRowSteepest::fill
void fill(const ClpDualRowSteepest &rhs)
Fill most values.
ClpDualRowSteepest::savedWeights
CoinIndexedVector * savedWeights()
Get saved weights.
Definition ClpDualRowSteepest.hpp:58
ClpDualRowSteepest::setPersistence
void setPersistence(Persistence life)
Set/ get persistence.
Definition ClpDualRowSteepest.hpp:119
ClpDualRowSteepest::ClpDualRowSteepest
ClpDualRowSteepest(const ClpDualRowSteepest &)
Copy constructor.
ClpDualRowSteepest::pivotRow
virtual int pivotRow()
Returns pivot row, -1 if none.
ClpDualRowSteepest::infeasible_
CoinIndexedVector * infeasible_
square of infeasibility array (just for infeasible rows)
Definition ClpDualRowSteepest.hpp:147
ClpDualRowSteepest::persistence
Persistence persistence() const
Definition ClpDualRowSteepest.hpp:123
ClpDualRowSteepest::updatePrimalSolution
virtual void updatePrimalSolution(CoinIndexedVector *input, double theta, double &changeInObjective)
Updates primal solution (and maybe list of candidates) Uses input vector which it deletes Computes ch...
ClpDualRowSteepest::dubiousWeights_
int * dubiousWeights_
Dubious weights.
Definition ClpDualRowSteepest.hpp:153
ClpDualRowSteepest::savedWeights_
CoinIndexedVector * savedWeights_
save weight array (so we can use checkpoint)
Definition ClpDualRowSteepest.hpp:151
ClpDualRowSteepest::persistence_
Persistence persistence_
Life of weights.
Definition ClpDualRowSteepest.hpp:143
ClpDualRowSteepest::weights_
double * weights_
weight array
Definition ClpDualRowSteepest.hpp:145
ClpDualRowSteepest::~ClpDualRowSteepest
virtual ~ClpDualRowSteepest()
Destructor.
ClpDualRowSteepest::passInSavedWeights
void passInSavedWeights(const CoinIndexedVector *saved)
Pass in saved weights.
ClpDualRowSteepest::ClpDualRowSteepest
ClpDualRowSteepest(int mode=3)
Default Constructor 0 is uninitialized, 1 full, 2 is partial uninitialized, 3 starts as 2 but may swi...
ClpDualRowSteepest::unrollWeights
virtual void unrollWeights()
Gets rid of last update.
ClpDualRowSteepest::clone
virtual ClpDualRowPivot * clone(bool copyData=true) const
Clone.
ClpDualRowSteepest::mode
int mode() const
Mode.
Definition ClpDualRowSteepest.hpp:109
ClpDualRowSteepest::mode_
int mode_
If 0 then we are using uninitialized weights, 1 then full, if 2 then uninitialized partial,...
Definition ClpDualRowSteepest.hpp:141
ClpDualRowSteepest::saveWeights
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Save model May also recompute infeasib...
ClpDualRowSteepest::setMode
void setMode(int mode)
Set mode.
Definition ClpDualRowSteepest.hpp:114
ClpDualRowSteepest::clearArrays
virtual void clearArrays()
Gets rid of all arrays.
ClpDualRowSteepest::state_
int state_
Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number.
Definition ClpDualRowSteepest.hpp:138
ClpDualRowSteepest::alternateWeights_
CoinIndexedVector * alternateWeights_
alternate weight array (so we can unroll)
Definition ClpDualRowSteepest.hpp:149
ClpDualRowSteepest::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any row.
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106