/home/coin/SVN-release/CoinAll-1.1.0/Alps/examples/Abc/AbcBranchActual.h

Go to the documentation of this file.
00001 /*===========================================================================*
00002  * This file is part of the Abstract Library for Parallel Search (ALPS).     *
00003  *                                                                           *
00004  * ALPS 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-2007, Lehigh University, Yan Xu, and Ted Ralphs.       *
00021  *===========================================================================*/
00022 
00023 #ifndef AbcBranchActual_h_
00024 #define AbcBranchActual_h_
00025 
00026 //#############################################################################
00027 // This file is modified from SbbBranchActual.hpp
00028 //#############################################################################
00029 
00030 #include "AbcBranchBase.h"
00031 
00032 //#############################################################################
00038 class AbcBranchDefaultDecision : public AbcBranchDecision {
00039 
00040  public:
00041     // Default Constructor 
00042     AbcBranchDefaultDecision();
00043 
00044     // Copy constructor 
00045     AbcBranchDefaultDecision(const AbcBranchDefaultDecision &);
00046     
00047     virtual ~AbcBranchDefaultDecision();
00048 
00050     virtual AbcBranchDecision * clone() const;
00051 
00053     virtual void initialize(AbcModel * model);
00054 
00077     virtual int betterBranch(int thisOne,
00078                              int bestSoFar,
00079                              double changeUp, int numInfUp,
00080                              double changeDn, int numInfDn);
00081 
00082  private:
00083   
00085     AbcBranchDefaultDecision & operator=(const AbcBranchDefaultDecision& rhs);
00086 
00089     AbcModel * model_;
00090 
00092     double bestCriterion_;
00093 
00095     double bestChangeUp_;
00096 
00098     int bestNumberUp_;
00099 
00101     double bestChangeDown_;
00102 
00104     int bestNumberDown_;
00105 
00107     int bestObject_;
00108 };
00109 
00110 
00111 class AbcPseudocost 
00112 {
00113  public:
00114     int colInd_;
00115     double upCost_;
00116     int upNum_;
00117     double downCost_;
00118     int downNum_;
00119 
00120  public:
00121     AbcPseudocost() 
00122         : 
00123         colInd_(-1), 
00124         upCost_(0.0), upNum_(0), 
00125         downCost_(0.0), downNum_(0) {}
00126 
00127     AbcPseudocost(const int ind, 
00128                   const double uc, 
00129                   const int un,
00130                   const double dc, 
00131                   const int dn)
00132         :
00133         colInd_(ind), 
00134         upCost_(uc), upNum_(un),
00135         downCost_(dc), downNum_(dn) {}
00136     
00137     void update(const int dir,
00138                 const double parentObjValue,
00139                 const double objValue,
00140                 const double solValue);
00141     
00142 };
00143 
00144 #endif

Generated on Sun Nov 14 14:06:28 2010 for Coin-All by  doxygen 1.4.7