Dip 0.95.0
Loading...
Searching...
No Matches
List of all members
DecompAlgoC Class Reference

Class for DECOMP algorithm Cutting Plane Method. More...

#include <DecompAlgoC.h>

+ Inheritance diagram for DecompAlgoC:
+ Collaboration diagram for DecompAlgoC:

Derived from virtual functions of DecompAlgo

virtual DecompSolverResultsolveDirect (const DecompSolution *startSol=NULL)
 

Constructors and destructor.

 DecompAlgoC (DecompApp *app, UtilParameters &utilParam)
 Default constructors.
 
 ~DecompAlgoC ()
 Destructor.
 

Additional Inherited Members

- Public Member Functions inherited from DecompAlgo
bool isGapTight ()
 
double getInfinity ()
 Return the value of infinity.
 
virtual bool isDone ()
 
std::vector< double * > getDualRays (int maxNumRays)
 
std::vector< double * > getDualRaysCpx (int maxNumRays)
 
std::vector< double * > getDualRaysOsi (int maxNumRays)
 
virtual int generateVars (DecompVarList &newVars, double &mostNegReducedCost)
 
virtual int generateCuts (double *xhat, DecompCutList &newCuts)
 
virtual void addVarsToPool (DecompVarList &newVars)
 
virtual void addVarsFromPool ()
 
virtual void addCutsToPool (const double *x, DecompCutList &newCuts, int &m_cutsThisCall)
 
virtual int addCutsFromPool ()
 
bool isIPFeasible (const double *x, const bool isXSparse=false, const double feasVarTol=1.0e-6, const double feasConTol=1.0e-5, const double intTol=1.0e-5)
 
bool isLPFeasible (const double *x, const bool isXSparse=false, const double feasVarTol=1.0e-6, const double feasConTol=1.0e-5)
 
DecompStatus solveRelaxed (const double *redCostX, const double *origCost, const double alpha, const int n_origCols, const bool isNested, DecompSubModel &subModel, DecompSolverResult *solveResult, std::list< DecompVar * > &vars, double timeLimit)
 
void appendVars (DecompVar *var)
 
void appendVars (DecompVarList &varList)
 
virtual bool chooseBranchSet (std::vector< std::pair< int, double > > &downBranchLb, std::vector< std::pair< int, double > > &downBranchUb, std::vector< std::pair< int, double > > &upBranchLb, std::vector< std::pair< int, double > > &upBranchUb)
 
void loadSIFromModel (OsiSolverInterface *si, bool doInt=false)
 
virtual DecompStatus processNode (const AlpsDecompTreeNode *node, const double globalLB, const double globalUB)
 The main DECOMP process loop for a node.
 
const AlpsDecompTreeNodegetCurrentNode () const
 Provide the current node the algorithm is solving.
 
virtual void postProcessNode (DecompStatus decompStatus)
 Do some information sending after the current node has been processed.
 
virtual void postProcessBranch (DecompStatus decompStatus)
 Do some information sending after the current node has been branched.
 
virtual DecompStatus solutionUpdate (const DecompPhase phase, const bool resolve=true, const int maxInnerIter=COIN_INT_MAX, const int maxOuterIter=COIN_INT_MAX)
 Update of the solution vectors (primal and/or dual).
 
virtual void solveMasterAsMIP ()
 
virtual int adjustColumnsEffCnt ()
 
virtual int compressColumns ()
 
void initSetup ()
 Initial setup of algorithm structures and solver interfaces.
 
void getModelsFromApp ()
 
void createOsiSubProblem (DecompSubModel &subModel)
 
OsiSolverInterfacegetOsiLpSolverInterface ()
 
OsiSolverInterfacegetOsiIpSolverInterface ()
 
void coreMatrixAppendColBounds ()
 Calculate gap: |(ub-lb)|/|lb|.
 
void checkMasterDualObj ()
 
bool checkPointFeasible (const DecompConstraintSet *modelCore, const double *x)
 
bool isDualRayInfProof (const double *dualRay, const CoinPackedMatrix *rowMatrix, const double *colLB, const double *colUB, const double *rowRhs, std::ostream *os)
 
bool isDualRayInfProofCpx (const double *dualRay, const CoinPackedMatrix *rowMatrix, const double *colLB, const double *colUB, const double *rowRhs, std::ostream *os)
 
void printBasisInfo (OsiSolverInterface *si, std::ostream *os)
 
void printCurrentProblemDual (OsiSolverInterface *si, const std::string baseName, const int nodeIndex, const int cutPass, const int pricePass)
 
void printCurrentProblem (const OsiSolverInterface *si, const std::string baseName, const int nodeIndex, const int cutPass, const int pricePass, const int blockId=-1, const bool printMps=true, const bool printLp=true)
 
void printCurrentProblem (const OsiSolverInterface *si, const std::string fileName, const bool printMps=true, const bool printLp=true)
 
void printVars (std::ostream *os)
 
void printCuts (std::ostream *os)
 
void checkDuals ()
 
void checkReducedCost (const double *u, const double *u_adjusted)
 
void createFullMps (const std::string fileName)
 
void masterMatrixAddMOCols (CoinPackedMatrix *masterM, double *colLB, double *colUB, double *objCoeff, std::vector< std::string > &colNames)
 
void masterMatrixAddArtCol (std::vector< CoinBigIndex > &colBeg, std::vector< int > &colInd, std::vector< double > &colVal, char LorG, int rowIndex, int colIndex, DecompColType colType, double &colLB, double &colUB, double &objCoeff)
 
virtual void masterMatrixAddArtCols (CoinPackedMatrix *masterM, double *colLB, double *colUB, double *objCoeff, std::vector< std::string > &colNames, int startRow, int endRow, DecompRowType rowType)
 
void masterPhaseItoII ()
 
void masterPhaseIItoI ()
 
bool isMasterColMasterOnly (const int index) const
 
bool isMasterColStructural (const int index) const
 
bool isMasterColArtificial (const int index) const
 
void breakOutPartial (const double *xHat, DecompVarList &newVars, const double intTol=1.0e-5)
 
void generateVarsAdjustDuals (const double *uOld, double *uNew)
 Create an adjusted dual vector with the duals from the convexity constraints removed.
 
void generateVarsCalcRedCost (const double *u, double *redCostX)
 Calculated reduced cost vector (over vars in compact space) for a given dual vector.
 
const double * getColLBNode () const
 
const double * getColUBNode () const
 
DecompStatsgetStats ()
 
const double * getOrigObjective () const
 
const DecompSubModelgetModelCore () const
 
const int getAlgo () const
 
const DecompParamgetParam () const
 
DecompParamgetMutableParam ()
 
OsiSolverInterfacegetMasterOSI ()
 
DecompSubModelgetModelRelax (const int blockId)
 
const double * getXhat () const
 Get a ptr to the current solution (in x-space).
 
void setCutoffUB (const double thisBound)
 
const DecompSolutiongetXhatIPBest () const
 
const std::vector< DecompSolution * > & getXhatIPFeas () const
 
const double getCutoffUB () const
 
DecompStatsgetDecompStats ()
 
const DecompParamgetDecompParam () const
 
const DecompAppgetDecompApp () const
 
DecompAppgetDecompAppMutable ()
 
const int getNodeIndex () const
 
const int getCutCallsTotal () const
 
const int getPriceCallsTotal () const
 
const double * getMasterPrimalSolution () const
 Get current primal solution for master problem.
 
const double * getMasterColReducedCost () const
 
virtual const double * getMasterDualSolution () const
 Get current dual solution for master problem.
 
virtual void adjustMasterDualSolution ()
 Adjust the current dual solution for master problem.
 
double getMasterObjValue () const
 
const int getStopCriteria () const
 
const double getGlobalGap () const
 Get the current global (integrality) gap.
 
const double getNodeIPGap () const
 Get the current node (integrality) gap.
 
const double getNodeLPGap () const
 Get the current node (continuous) gap.
 
const double getObjBestBoundLB () const
 Get the current best LB.
 
const void setStrongBranchIter (bool isStrongBranch=true)
 Set the object to be in strong branching mode.
 
const double getObjBestBoundUB () const
 Get the current best UB.
 
const double getMasterRowType (int row) const
 Get a specific row type.
 
virtual void setObjBound (const double thisBound, const double thisBoundUB)
 Set the current continuous bounds and update best/history.
 
virtual void setObjBoundIP (const double thisBound)
 Set the current integer bound and update best/history.
 
bool isTailoffLB (const int changeLen=10, const double changePerLimit=0.1)
 
int getNumRowType (DecompRowType rowType)
 
void checkBlocksColumns ()
 
 DecompAlgo (const DecompAlgoType algo, DecompApp *app, UtilParameters &utilParam, bool doSetup=true)
 Default constructors.
 
virtual ~DecompAlgo ()
 Destructor.
 
- Protected Attributes inherited from DecompAlgo
std::string m_classTag
 Store the name of the class (for logging/debugging) - "who am I?".
 
DecompParam m_param
 Parameters.
 
UtilParametersm_utilParam
 
DecompAlgoType m_algo
 Type of algorithm for this instance.
 
DecompStatus m_status
 The current algorithm status.
 
double m_infinity
 The value of "infinity".
 
DecompPhase m_phase
 The current algorithm phase.
 
DecompPhase m_phaseLast
 
DecompPhase m_phaseForce
 
DecompAppm_app
 Pointer to current active DECOMP application.
 
DecompStats m_stats
 Storage of statistics for run and node.
 
DecompNodeStats m_nodeStats
 
DecompMemPool m_memPool
 Memory pool used to reduce the number of allocations needed.
 
std::ostream * m_osLog
 Stream for log file (default to stdout).
 
DecompAlgoCGLm_cgl
 
std::vector< double > m_origColLB
 Pointer (and label) to current active model core/relax.
 
std::vector< double > m_origColUB
 
OsiSolverInterfacem_masterSI
 Solver interface(s) for subproblems (P').
 
OsiClpSolverInterfacem_cutgenSI
 Solver interface(s) for entire problem (Q'').
 
int m_cutgenObjCutInd
 
OsiSolverInterfacem_auxSI
 
const double * m_objective
 
DecompSubModel m_modelCore
 
std::map< int, DecompSubModelm_modelRelax
 
std::map< int, std::vector< DecompSubModel > > m_modelRelaxNest
 
DecompVarList m_vars
 Containers for variables (current and pool).
 
DecompVarPool m_varpool
 
DecompCutList m_cuts
 Containers for cuts (current and pool).
 
DecompCutPool m_cutpool
 
double * m_xhat
 Storage for current solution (in x-space).
 
double m_cutoffUB
 User-defined cutoff (global UB) for B&B fathoming and LR.
 
std::vector< DecompSolution * > m_xhatIPFeas
 
DecompSolutionm_xhatIPBest
 
std::vector< double > m_primSolution
 
std::vector< double > m_dualSolution
 
std::vector< double > m_reducedCost
 
int m_numCols
 
bool m_isColGenExact
 
int m_numConvexCon
 
int m_rrLastBlock
 
int m_rrIterSinceAll
 
int m_nArtCols
 
int m_nRowsOrig
 
int m_nRowsBranch
 
int m_nRowsConvex
 
int m_nRowsCuts
 
std::vector< DecompRowTypem_masterRowType
 
std::vector< DecompColTypem_masterColType
 
std::vector< int > m_masterArtCols
 
double * m_colLBNode
 
double * m_colUBNode
 
int m_compressColsLastPrice
 
int m_compressColsLastNumCols
 
double m_relGap
 Current node gap (bestUB-bestLB)/bestLB.
 
DecompAlgoStop m_stopCriteria
 
int m_colIndexUnique
 
double m_masterObjLast
 
bool m_objNoChange
 
double m_stabEpsilon
 
bool m_useInitLpDuals
 
std::map< int, int > m_artColIndToRowInd
 
double m_globalLB
 
double m_globalUB
 
std::vector< double > m_phaseIObj
 
int m_function
 
bool m_firstPhase2Call
 
bool m_isStrongBranch
 
const AlpsDecompTreeNodem_curNode
 
std::vector< int > m_masterOnlyCols
 
std::map< int, int > m_masterOnlyColsMap
 Map from original index to master index for master-only vars.
 
DecompBranchingImplementation m_branchingImplementation
 

Detailed Description

Class for DECOMP algorithm Cutting Plane Method.

Definition at line 33 of file DecompAlgoC.h.

Constructor & Destructor Documentation

◆ DecompAlgoC()

DecompAlgoC::DecompAlgoC ( DecompApp * app,
UtilParameters & utilParam )
inline

Default constructors.

Definition at line 138 of file DecompAlgoC.h.

◆ ~DecompAlgoC()

DecompAlgoC::~DecompAlgoC ( )
inline

Destructor.

Definition at line 149 of file DecompAlgoC.h.

Member Function Documentation

◆ solveDirect()

virtual DecompSolverResult * DecompAlgoC::solveDirect ( const DecompSolution * startSol = NULL)
virtual

Reimplemented from DecompAlgo.


The documentation for this class was generated from the following file: