Loading...
Searching...
No Matches
ClpSimplexDual.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).
/*
Authors
John Forrest
*/
#ifndef ClpSimplexDual_H
#define ClpSimplexDual_H
#include "ClpSimplex.hpp"
class ClpSimplexDual : public ClpSimplex {
public:
int dual(int ifValuesPass, int startFinishOptions = 0);
int strongBranching(int numberVariables, const int *variables,
double *newLower, double *newUpper,
double **outputSolution,
int *outputStatus, int *outputIterations,
bool stopOnFirstInfeasible = true,
bool alwaysFinish = false,
int startFinishOptions = 0);
ClpFactorization *setupForStrongBranching(char *arrays, int numberRows,
int numberColumns, bool solveLp = false);
void cleanupAfterStrongBranching(ClpFactorization *factorization);
int whileIterating(double *&givenPi, int ifValuesPass);
int updateDualsInDual(CoinIndexedVector *rowArray,
CoinIndexedVector *columnArray,
CoinIndexedVector *outputArray,
double theta,
double &objectiveChange,
bool fullRecompute);
void updateDualsInValuesPass(CoinIndexedVector *rowArray,
CoinIndexedVector *columnArray,
double theta);
void flipBounds(CoinIndexedVector *rowArray,
CoinIndexedVector *columnArray);
double dualColumn(CoinIndexedVector *rowArray,
CoinIndexedVector *columnArray,
CoinIndexedVector *spareArray,
CoinIndexedVector *spareArray2,
double accpetablePivot,
CoinBigIndex *dubiousWeights);
int dualColumn0(const CoinIndexedVector *rowArray,
const CoinIndexedVector *columnArray,
CoinIndexedVector *spareArray,
double acceptablePivot,
double &upperReturn, double &badFree);
void checkPossibleValuesMove(CoinIndexedVector *rowArray,
CoinIndexedVector *columnArray,
double acceptablePivot);
void checkPossibleCleanup(CoinIndexedVector *rowArray,
CoinIndexedVector *columnArray,
double acceptablePivot);
void doEasyOnesInValuesPass(double *givenReducedCosts);
void dualRow(int alreadyChosen);
int changeBounds(int initialize, CoinIndexedVector *outputArray,
double &changeCost);
int checkFakeBounds() const;
bool changeBound(int iSequence);
void originalBound(int iSequence);
int checkUnbounded(CoinIndexedVector *ray, CoinIndexedVector *spare,
double changeCost);
void statusOfProblemInDual(int &lastCleaned, int type,
double *givenDjs, ClpDataSave &saveData,
int ifValuesPass);
int perturb();
int fastDual(bool alwaysFinish = false);
int numberAtFakeBound();
int pivotResultPart1();
int nextSuperBasic();
int startupSolve(int ifValuesPass, double *saveDuals, int startFinishOptions);
void finishSolve(int startFinishOptions);
void gutsOfDual(int ifValuesPass, double *&saveDuals, int initialStatus,
ClpDataSave &saveData);
//int dual2(int ifValuesPass,int startFinishOptions=0);
void resetFakeBounds(int type);
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
type
CbcOrClpParameterType type() const
type
Definition CbcOrClpParam.hpp:462
ClpSimplex.hpp
ClpDataSave
This is a tiny class where data can be saved round calls.
Definition ClpModel.hpp:1402
ClpFactorization
This just implements CoinFactorization when an ClpMatrixBase object is passed.
Definition ClpFactorization.hpp:38
ClpModel::ray
double * ray() const
For advanced users - no need to delete - sign not changed.
Definition ClpModel.hpp:864
ClpModel::numberColumns
int numberColumns() const
Definition ClpModel.hpp:332
ClpModel::numberRows
int numberRows() const
Number of rows.
Definition ClpModel.hpp:319
ClpSimplexDual
This solves LPs using the dual simplex method.
Definition ClpSimplexDual.hpp:23
ClpSimplexDual::startupSolve
int startupSolve(int ifValuesPass, double *saveDuals, int startFinishOptions)
Startup part of dual (may be extended to other algorithms) returns 0 if good, 1 if bad.
ClpSimplexDual::dualRow
void dualRow(int alreadyChosen)
Chooses dual pivot row Would be faster with separate region to scan and will have this (with square o...
ClpSimplexDual::originalBound
void originalBound(int iSequence)
Restores bound to original bound.
ClpSimplexDual::doEasyOnesInValuesPass
void doEasyOnesInValuesPass(double *givenReducedCosts)
This sees if we can move duals in dual values pass.
ClpSimplexDual::checkUnbounded
int checkUnbounded(CoinIndexedVector *ray, CoinIndexedVector *spare, double changeCost)
Checks if tentative optimal actually means unbounded in dual Returns -3 if not, 2 if is unbounded.
ClpSimplexDual::finishSolve
void finishSolve(int startFinishOptions)
ClpSimplexDual::flipBounds
void flipBounds(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray)
While updateDualsInDual sees what effect is of flip this does actual flipping.
ClpSimplexDual::pivotResultPart1
int pivotResultPart1()
Pivot in a variable and choose an outgoing one.
ClpSimplexDual::cleanupAfterStrongBranching
void cleanupAfterStrongBranching(ClpFactorization *factorization)
This cleans up after strong branching.
ClpSimplexDual::whileIterating
int whileIterating(double *&givenPi, int ifValuesPass)
This has the flow between re-factorizations Broken out for clarity and will be used by strong branchi...
ClpSimplexDual::perturb
int perturb()
Perturbs problem (method depends on perturbation()) returns nonzero if should go to dual.
ClpSimplexDual::strongBranching
int strongBranching(int numberVariables, const int *variables, double *newLower, double *newUpper, double **outputSolution, int *outputStatus, int *outputIterations, bool stopOnFirstInfeasible=true, bool alwaysFinish=false, int startFinishOptions=0)
For strong branching.
ClpSimplexDual::gutsOfDual
void gutsOfDual(int ifValuesPass, double *&saveDuals, int initialStatus, ClpDataSave &saveData)
ClpSimplexDual::resetFakeBounds
void resetFakeBounds(int type)
ClpSimplexDual::dualColumn
double dualColumn(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, CoinIndexedVector *spareArray, CoinIndexedVector *spareArray2, double accpetablePivot, CoinBigIndex *dubiousWeights)
Row array has row part of pivot row Column array has column part.
ClpSimplexDual::checkPossibleCleanup
void checkPossibleCleanup(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double acceptablePivot)
Row array has row part of pivot row Column array has column part.
ClpSimplexDual::setupForStrongBranching
ClpFactorization * setupForStrongBranching(char *arrays, int numberRows, int numberColumns, bool solveLp=false)
This does first part of StrongBranching.
ClpSimplexDual::changeBounds
int changeBounds(int initialize, CoinIndexedVector *outputArray, double &changeCost)
Checks if any fake bounds active - if so returns number and modifies updatedDualBound_ and everything...
ClpSimplexDual::dual
int dual(int ifValuesPass, int startFinishOptions=0)
Dual algorithm.
ClpSimplexDual::checkPossibleValuesMove
void checkPossibleValuesMove(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double acceptablePivot)
Row array has row part of pivot row Column array has column part.
ClpSimplexDual::updateDualsInDual
int updateDualsInDual(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, CoinIndexedVector *outputArray, double theta, double &objectiveChange, bool fullRecompute)
The duals are updated by the given arrays.
ClpSimplexDual::statusOfProblemInDual
void statusOfProblemInDual(int &lastCleaned, int type, double *givenDjs, ClpDataSave &saveData, int ifValuesPass)
Refactorizes if necessary Checks if finished.
ClpSimplexDual::dualColumn0
int dualColumn0(const CoinIndexedVector *rowArray, const CoinIndexedVector *columnArray, CoinIndexedVector *spareArray, double acceptablePivot, double &upperReturn, double &badFree)
Does first bit of dualColumn.
ClpSimplexDual::changeBound
bool changeBound(int iSequence)
As changeBounds but just changes new bounds for a single variable.
ClpSimplexDual::fastDual
int fastDual(bool alwaysFinish=false)
Fast iterations.
ClpSimplexDual::numberAtFakeBound
int numberAtFakeBound()
Checks number of variables at fake bounds.
ClpSimplexDual::nextSuperBasic
int nextSuperBasic()
Get next free , -1 if none.
ClpSimplexDual::checkFakeBounds
int checkFakeBounds() const
Just checks if any fake bounds active - if so returns number.
ClpSimplexDual::updateDualsInValuesPass
void updateDualsInValuesPass(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double theta)
The duals are updated by the given arrays.
ClpSimplex::theta
double theta() const
Theta (pivot change).
Definition ClpSimplex.hpp:1365
ClpSimplex::saveData
ClpDataSave saveData()
Save data.
ClpSimplex::factorization
ClpFactorization * factorization() const
factorization
Definition ClpSimplex.hpp:676
ClpSimplex::rowArray
CoinIndexedVector * rowArray(int index) const
Useful row length arrays (0,1,2,3,4,5).
Definition ClpSimplex.hpp:815
ClpSimplex::ClpSimplex
ClpSimplex(bool emptyMessages=false)
Default constructor.
ClpSimplex::columnArray
CoinIndexedVector * columnArray(int index) const
Useful column length arrays (0,1,2,3,4,5).
Definition ClpSimplex.hpp:820