- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Blis-0.91.0/Bcps/examples/Blis/BlisTreeNode.h

Go to the documentation of this file.

    00001 /*===========================================================================*
    00002  * This file is part of the Bcps Linear Solver (BLIS).                       *
    00003  *                                                                           *
    00004  * BLIS is distributed under the Common Public License as part of the        *
    00005  * COIN-OR repository (http://www.coin-or.org).                              *
    00006  *                                                                           *
    00007  * Authors:                                                                  *
    00008  *                                                                           *
    00009  *          Yan Xu, Lehigh University                                        *
    00010  *          Ted Ralphs, Lehigh University                                    *
    00011  *                                                                           *
    00012  * Conceptual Design:                                                        *
    00013  *                                                                           *
    00014  *          Yan Xu, Lehigh University                                        *
    00015  *          Ted Ralphs, Lehigh University                                    *
    00016  *          Laszlo Ladanyi, IBM T.J. Watson Research Center                  *
    00017  *          Matthew Saltzman, Clemson University                             *
    00018  *                                                                           *
    00019  *                                                                           *
    00020  * Copyright (C) 2001-2005, International Business Machines                  *
    00021  * Corporation, Lehigh University, Yan Xu, Ted Ralphs, Matthew Salzman and   *
    00022  * others. All Rights Reserved.                                              *
    00023  *===========================================================================*/
    00024
    00025 #ifndef BlisTreeNode_h_
    00026 #define BlisTreeNode_h_
    00027
    00028 //#############################################################################
    00029
    00030 #include "AlpsNodeDesc.h"
    00031
    00032 #include "BcpsObjectPool.h"
    00033 #include "BcpsTreeNode.h"
    00034
    00035 #include "BcpsNodeDesc.h"
    00036 #include "BlisNodeDesc.h"
    00037
    00038 class BcpsModel;
    00039 class BlisModel;
    00040
    00041
    00042 //#############################################################################
    00046 //#############################################################################
    00047
    00048
    00049 class BlisTreeNode : public BcpsTreeNode {
    00050
    00051  private:
    00052
    00054     BlisTreeNode(const BlisTreeNode&);
    00055
    00056     BlisTreeNode& operator=(const BlisTreeNode&);
    00057
    00059     //BcpsConstraintPool *constraintPool_;
    00060
    00062     //BcpsVariablePool *variablePool_;
    00063
    00065     //void saveExplicit();
    00066
    00067     bool parallel(BlisModel *model,
    00068                   OsiCuts *newCutSet,
    00069                   int lastNew,
    00070                   OsiRowCut *rowCut);
    00071
    00072  public:
    00073
    00075     BlisTreeNode()
    00076         :
    00077         BcpsTreeNode()
    00078         { init(); }
    00079
    00081     BlisTreeNode(BlisModel* m) {
    00082         init();
    00083         desc_ = new BlisNodeDesc(m);
    00084     }
    00085
    00087     BlisTreeNode(AlpsNodeDesc *&desc) {
    00088         init();
    00089         desc_ = desc;
    00090         desc = NULL;
    00091     }
    00092
    00094     virtual ~BlisTreeNode() {
    00095         //delete constraintPool_;
    00096         //delete variablePool_;
    00097     }
    00098
    00100     void init() {
    00101         //constraintPool_ = new BcpsConstraintPool;
    00102         //variablePool_ = new BcpsVariablePool;
    00103     }
    00104
    00106     AlpsTreeNode* createNewTreeNode(AlpsNodeDesc *&desc) const;
    00107
    00109
    00110     virtual void convertToExplicit();
    00111     virtual void convertToRelative();
    00113
    00115     virtual int installSubProblem(BcpsModel *mode);
    00116
    00118     virtual int process(bool isRoot = false, bool rampUp = false);
    00119
    00121     virtual int bound(BcpsModel *model);
    00122
    00127     virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> >
    00128         branch();
    00129
    00131     int selectBranchObject(BlisModel *model,
    00132                            bool& foundSol,
    00133                            int numPassesLeft);
    00134
    00136     virtual int chooseBranchingObject(BcpsModel*) { return AlpsReturnStatusOk;}
    00137
    00139     int generateConstraints(BlisModel *model, OsiCuts & cutPool);
    00140
    00142     int applyConstraints(BlisModel *model,
    00143                          OsiCuts & cutPool,
    00144                          const double *solution);
    00145
    00147     int reducedCostFix(BlisModel *model);
    00148
    00150     //BcpsConstraintPool * constraintPool() { return constraintPool_; }
    00151
    00153     //BcpsVariablePool * variablePool() { return variablePool_; }
    00154
    00156     virtual AlpsEncoded* encode() const;
    00157
    00159     virtual AlpsKnowledge* decode(AlpsEncoded&) const;
    00160 };
    00161
    00162 #endif