Dip
0.92.4
|
Python-enabled DecompAlgoC. More...
#include <DippyDecompAlgo.h>
Public Member Functions | |
DippyAlgoC (DecompApp *app, UtilParameters &utilParam, PyObject *pProb) | |
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) |
virtual void | postProcessBranch (DecompStatus decompStatus) |
Do some information sending after the current node has been branched. More... | |
virtual void | postProcessNode (DecompStatus decompStatus) |
Do some information sending after the current node has been processed. More... | |
![]() | |
void | createMasterProblem (DecompVarList &initVars) |
Create the master problem (all algorithms must define this function). More... | |
void | recomposeSolution (const double *solution, double *rsolution) |
Compose solution in x-space from current space. More... | |
int | generateInitVars (DecompVarList &initVars) |
Generate initial variables for master problem (PC/DC/RC). More... | |
int | generateVars (const decompStat stat, DecompVarList &newVars, double &mostNegReducedCost) |
decompPhase | phaseUpdate (const decompPhase phase, const decompStat stat) |
int | branch (int branchedOnIndex, double branchedOnValue) |
DecompAlgoC (DecompApp *app) | |
~DecompAlgoC () | |
virtual DecompSolverResult * | solveDirect (const DecompSolution *startSol=NULL) |
DecompAlgoC (DecompApp *app, UtilParameters &utilParam) | |
Default constructors. More... | |
~DecompAlgoC () | |
Destructor. More... | |
![]() | |
bool | isGapTight () |
double | getInfinity () |
Return the value of infinity. More... | |
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) |
OsiSolverInterface * | initSolverInterface () |
void | startupLog () |
void | initSetup (int whichModel=1) |
void | tighten (int whichModel) |
void | solve (int whichModel=1) |
double | getTrueLowerBound () |
double | getTrueUpperBound () |
void | setTrueLowerBound (const double mostNegReducedCost) |
void | setTrueUpperBound (const double ub) |
double | calcConstant (const int m, const double *u) |
bool | isDualRayInfProof (const double *dualRay, const CoinPackedMatrix *rowMatrix, const double *colLB, const double *colUB, const double *rowRhs, ostream *os=0) |
void | printBasisInfo (OsiSolverInterface *si, ostream *os) |
void | printCurrentProblem (const OsiSolverInterface *si, const string baseName, const int nodeIndex, const int cutPass, const int pricePass, const bool printMps=true, const bool printLp=true) |
void | printCurrentProblem (const OsiSolverInterface *si, const string fileName, const bool printMps=true, const bool printLp=true) |
void | printVars (ostream *os=&cout) |
void | printCuts (ostream *os=&cout) |
void | solveBruteForce () |
void | createFullMps (const string filename) |
vector< double * > | getDualRays (int maxNumRays) |
void | setApp (DecompApp *app) |
void | setBestUpperBound (const double bestUpperBound) |
decompStat | solveRelaxed (const int whichModel, const double *redCostX, const double *origCost, const double alpha, const int n_origCols, const bool checkRC, const bool checkDup, OsiSolverInterface *m_subprobSI, list< DecompVar * > &vars) |
virtual decompStat | solutionUpdate (const decompPhase phase, const int maxInnerIter, const int maxOuterIter) |
OsiSolverInterface * | getMasterSolverInterface () |
virtual const double * | getRowPrice () const |
const double * | getX () |
DecompApp * | getApp () |
const DecompSolution * | getXhatIPBest () |
virtual const double * | getRightHandSide () const |
virtual const char * | getRowSense () const |
int | heuristics (const double *xhat, vector< DecompSolution * > &xhatIPFeas) |
virtual int | generateCuts (DecompCutList &newCuts) |
virtual bool | isDone () |
void | addVarsToPool (DecompVarList &newVars) |
void | addVarsFromPool () |
bool | isIPFeasible (const double *x, const double feasTol=1.0e-4, const double intTol=1.0e-4) |
bool | isLPFeasible (const double *x, const double feasTol=1.0e-4) |
virtual void | addCutsToPool (const double *x, DecompCutList &newCuts, int &n_newCuts) |
virtual int | addCutsFromPool () |
int | chooseBranchVar (int &branchedOnIndex, double &branchedOnValue) |
decompStat | processNode (const int nodeIndex=0) |
void | appendVars (DecompVar *var) |
void | appendVars (DecompVarList &varList) |
DecompAlgo (const decompAlgoType algo, DecompApp *app) | |
virtual | ~DecompAlgo () |
OsiSolverInterface * | initSolverInterface () |
void | startupLog () |
void | initSetup (int whichModel=1) |
void | tighten (int whichModel) |
double | getTrueLowerBound () |
double | getTrueUpperBound () |
void | setTrueLowerBound (const double mostNegReducedCost) |
void | setTrueUpperBound (const double ub) |
double | calcConstant (const int m, const double *u) |
bool | isDualRayInfProof (const double *dualRay, const CoinPackedMatrix *rowMatrix, const double *colLB, const double *colUB, const double *rowRhs, ostream *os=0) |
void | printBasisInfo (OsiSolverInterface *si, ostream *os) |
void | printCurrentProblem (const OsiSolverInterface *si, const string baseName, const int nodeIndex, const int cutPass, const int pricePass, const bool printMps=true, const bool printLp=true) |
void | printCurrentProblem (const OsiSolverInterface *si, const string fileName, const bool printMps=true, const bool printLp=true) |
void | printVars (ostream *os=&cout) |
void | printCuts (ostream *os=&cout) |
void | solveBruteForce () |
void | createFullMps (const string filename) |
vector< double * > | getDualRays (int maxNumRays) |
void | setApp (DecompApp *app) |
void | setBestUpperBound (const double bestUpperBound) |
DecompStat | solveRelaxed (const int whichModel, const double *redCostX, const double *origCost, const double alpha, const int n_origCols, const bool checkRC, const bool checkDup, OsiSolverInterface *m_subprobSI, list< DecompVar * > &vars) |
virtual DecompStat | solutionUpdate (const DecompPhase phase, const int maxInnerIter, const int maxOuterIter) |
virtual DecompPhase | phaseUpdate (const DecompPhase phase, const DecompStat stat) |
OsiSolverInterface * | getMasterSolverInterface () |
virtual const double * | getRowPrice () const |
const double * | getX () |
DecompApp * | getApp () |
const DecompSolution * | getXhatIPBest () |
virtual const double * | getRightHandSide () const |
virtual const char * | getRowSense () const |
int | heuristics (const double *xhat, vector< DecompSolution * > &xhatIPFeas) |
virtual int | generateVars (const DecompStat stat, DecompVarList &newVars, double &mostNegReducedCost) |
virtual int | generateCuts (DecompCutList &newCuts) |
virtual bool | isDone () |
void | addVarsToPool (DecompVarList &newVars) |
void | addVarsFromPool () |
bool | isIPFeasible (const double *x, const double feasTol=1.0e-4, const double intTol=1.0e-4) |
bool | isLPFeasible (const double *x, const double feasTol=1.0e-4) |
virtual void | addCutsToPool (const double *x, DecompCutList &newCuts, int &n_newCuts) |
virtual int | addCutsFromPool () |
int | chooseBranchVar (int &branchedOnIndex, double &branchedOnValue) |
DecompStat | processNode (const int nodeIndex=0, const double globalLB=-DecompInf, const double globalUB=DecompInf) |
void | appendVars (DecompVar *var) |
void | appendVars (DecompVarList &varList) |
DecompAlgo (const DecompAlgoType algo, DecompApp *app) | |
virtual | ~DecompAlgo () |
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. More... | |
const AlpsDecompTreeNode * | getCurrentNode () const |
Provide the current node the algorithm is solving. More... | |
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). More... | |
virtual void | solveMasterAsMIP () |
virtual int | adjustColumnsEffCnt () |
virtual int | compressColumns () |
void | initSetup () |
Initial setup of algorithm structures and solver interfaces. More... | |
void | getModelsFromApp () |
void | createOsiSubProblem (DecompSubModel &subModel) |
OsiSolverInterface * | getOsiLpSolverInterface () |
OsiSolverInterface * | getOsiIpSolverInterface () |
void | coreMatrixAppendColBounds () |
Calculate gap: |(ub-lb)|/|lb|. More... | |
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. More... | |
void | generateVarsCalcRedCost (const double *u, double *redCostX) |
Calculated reduced cost vector (over vars in compact space) for a given dual vector. More... | |
const double * | getColLBNode () const |
const double * | getColUBNode () const |
DecompStats & | getStats () |
const double * | getOrigObjective () const |
const DecompSubModel & | getModelCore () const |
const int | getAlgo () const |
const DecompParam & | getParam () const |
DecompParam & | getMutableParam () |
OsiSolverInterface * | getMasterOSI () |
DecompSubModel & | getModelRelax (const int blockId) |
const double * | getXhat () const |
Get a ptr to the current solution (in x-space). More... | |
void | setCutoffUB (const double thisBound) |
const DecompSolution * | getXhatIPBest () const |
const std::vector< DecompSolution * > & | getXhatIPFeas () const |
const double | getCutoffUB () const |
DecompStats & | getDecompStats () |
const DecompParam & | getDecompParam () const |
const DecompApp * | getDecompApp () const |
DecompApp * | getDecompAppMutable () |
const int | getNodeIndex () const |
const int | getCutCallsTotal () const |
const int | getPriceCallsTotal () const |
const double * | getMasterPrimalSolution () const |
Get current primal solution for master problem. More... | |
const double * | getMasterColReducedCost () const |
virtual const double * | getMasterDualSolution () const |
Get current dual solution for master problem. More... | |
virtual void | adjustMasterDualSolution () |
Adjust the current dual solution for master problem. More... | |
double | getMasterObjValue () const |
const int | getStopCriteria () const |
const double | getGlobalGap () const |
Get the current global (integrality) gap. More... | |
const double | getNodeIPGap () const |
Get the current node (integrality) gap. More... | |
const double | getNodeLPGap () const |
Get the current node (continuous) gap. More... | |
const double | getObjBestBoundLB () const |
Get the current best LB. More... | |
const void | setStrongBranchIter (bool isStrongBranch=true) |
Set the object to be in strong branching mode. More... | |
const double | getObjBestBoundUB () const |
Get the current best UB. More... | |
const double | getMasterRowType (int row) const |
Get a specific row type. More... | |
virtual void | setObjBound (const double thisBound, const double thisBoundUB) |
Set the current continuous bounds and update best/history. More... | |
virtual void | setObjBoundIP (const double thisBound) |
Set the current integer bound and update best/history. More... | |
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. More... | |
virtual | ~DecompAlgo () |
Destructor. More... | |
Python-enabled DecompAlgoC.
Definition at line 73 of file DippyDecompAlgo.h.
|
inline |
Definition at line 75 of file DippyDecompAlgo.h.
|
inlinevirtual |
Reimplemented from DecompAlgo.
Definition at line 79 of file DippyDecompAlgo.h.
|
inlinevirtual |
Do some information sending after the current node has been branched.
Does nothing by default.
Reimplemented from DecompAlgo.
Definition at line 89 of file DippyDecompAlgo.h.
|
inlinevirtual |
Do some information sending after the current node has been processed.
Does nothing by default.
Reimplemented from DecompAlgo.
Definition at line 93 of file DippyDecompAlgo.h.