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

- File List
- File Members

# /home/coin/svn-release/Bcps-0.93.10/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 Eclipse 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-2013, Lehigh University, Yan Xu, and Ted Ralphs.       *
    00021  * All Rights Reserved.                                                      *
    00022  *===========================================================================*/
    00023
    00024 #ifndef BlisTreeNode_h_
    00025 #define BlisTreeNode_h_
    00026
    00027 //#############################################################################
    00028
    00029 #include "AlpsNodeDesc.h"
    00030
    00031 #include "BcpsObjectPool.h"
    00032 #include "BcpsTreeNode.h"
    00033
    00034 #include "BcpsNodeDesc.h"
    00035 #include "BlisNodeDesc.h"
    00036
    00037 class BcpsModel;
    00038 class BlisModel;
    00039
    00040
    00041 //#############################################################################
    00045 //#############################################################################
    00046
    00047
    00048 class BlisTreeNode : public BcpsTreeNode {
    00049
    00050  private:
    00051
    00053     BlisTreeNode(const BlisTreeNode&);
    00054
    00055     BlisTreeNode& operator=(const BlisTreeNode&);
    00056
    00058     //BcpsConstraintPool *constraintPool_;
    00059
    00061     //BcpsVariablePool *variablePool_;
    00062
    00064     //void saveExplicit();
    00065
    00066     bool parallel(BlisModel *model,
    00067                   OsiCuts *newCutSet,
    00068                   int lastNew,
    00069                   OsiRowCut *rowCut);
    00070
    00071  public:
    00072
    00074     BlisTreeNode()
    00075         :
    00076         BcpsTreeNode()
    00077         { init(); }
    00078
    00080     BlisTreeNode(BlisModel* m) {
    00081         init();
    00082         desc_ = new BlisNodeDesc(m);
    00083     }
    00084
    00086     BlisTreeNode(AlpsNodeDesc *&desc) {
    00087         init();
    00088         desc_ = desc;
    00089         desc = NULL;
    00090     }
    00091
    00093     virtual ~BlisTreeNode() {
    00094         //delete constraintPool_;
    00095         //delete variablePool_;
    00096     }
    00097
    00099     void init() {
    00100         //constraintPool_ = new BcpsConstraintPool;
    00101         //variablePool_ = new BcpsVariablePool;
    00102     }
    00103
    00105     AlpsTreeNode* createNewTreeNode(AlpsNodeDesc *&desc) const;
    00106
    00108
    00109     virtual void convertToExplicit();
    00110     virtual void convertToRelative();
    00112
    00114     virtual int installSubProblem(BcpsModel *mode);
    00115
    00117     virtual int process(bool isRoot = false, bool rampUp = false);
    00118
    00120     virtual int bound(BcpsModel *model);
    00121
    00126     virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> >
    00127         branch();
    00128
    00130     int selectBranchObject(BlisModel *model,
    00131                            bool& foundSol,
    00132                            int numPassesLeft);
    00133
    00135     virtual int chooseBranchingObject(BcpsModel*) { return AlpsReturnStatusOk;}
    00136
    00138     int generateConstraints(BlisModel *model, OsiCuts & cutPool);
    00139
    00141     int applyConstraints(BlisModel *model,
    00142                          OsiCuts & cutPool,
    00143                          const double *solution);
    00144
    00146     int reducedCostFix(BlisModel *model);
    00147
    00149     //BcpsConstraintPool * constraintPool() { return constraintPool_; }
    00150
    00152     //BcpsVariablePool * variablePool() { return variablePool_; }
    00153
    00155     virtual AlpsEncoded* encode() const;
    00156
    00158     virtual AlpsKnowledge* decode(AlpsEncoded&) const;
    00159 };
    00160
    00161 #endif