Changeset 4047


Ignore:
Timestamp:
06/19/06 22:54:40 (8 years ago)
Author:
wehart
Message:

Major rework of PICO-related packages, to rename pico-core to pebbl and
pico-milp to pico.

( Links to Acro-related mail archives at  http://software.sandia.gov/Acro/ )

Location:
pico/trunk/src
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • pico/trunk/src/exec/pico/setupMappedMILP.cpp

    r4046 r4047  
    3333try { 
    3434 
    35 signal(SIGFPE,pico_abort_handler); 
     35signal(SIGFPE,pebbl_abort_handler); 
    3636 
    3737int debug=0; 
  • pico/trunk/src/lp/pico/PicoLPInterface.cpp

    r4046 r4047  
    271271CMSparseMatrix<Ereal<double> > A; 
    272272CharString givenName; 
    273 int objsen = minimize; 
     273int objsen = pebbl::minimize; 
    274274BasicArray<Ereal<double> > objCoefs; 
    275275BasicArray<Ereal<double> > lowerBounds; 
     
    305305CMSparseMatrix<Ereal<double> > A; 
    306306CharString givenName; 
    307 int objsen = minimize; 
     307int objsen = pebbl::minimize; 
    308308BasicArray<Ereal<double> > objCoefs; 
    309309BasicArray<Ereal<double> > lowerBounds; 
  • pico/trunk/src/lp/pico/PicoLPInterface.h

    r4046 r4047  
    5555#include <utilib/LinkedList.h> 
    5656#include <pebbl/fundamentals.h> 
    57 #include <pebbl/picoBase.h> 
     57#include <pebbl/pebblBase.h> 
    5858#include <pico/BasisArray.h> 
    5959#include <pico/picoRowCut.h> 
     
    8787  virtual public CommonIO, 
    8888  virtual public utilib::ParameterSet, 
    89   public picoBase 
     89  public pebbl::pebblBase 
    9090{ 
    9191 
     
    923923    //------------------------------------------------------------------------- 
    924924        /// Set the optimize sense 
    925     virtual void setObjSense(optimizeSense minOrMax) 
     925    virtual void setObjSense(pebbl::optimizeSense minOrMax) 
    926926                {setObjSense((double)minOrMax); myState=unsolved;} 
    927927     
  • pico/trunk/src/lp/pico/PicoLPSubclass.h

    r4046 r4047  
    456456 
    457457     /// 
    458      void setObjSense(optimizeSense minOrMax) 
     458     void setObjSense(pebbl::optimizeSense minOrMax) 
    459459                {PicoLPInterface::setObjSense(minOrMax);} 
    460460     /// 
  • pico/trunk/src/lp/pico/ilp_read.cpp

    r4046 r4047  
    3131static HashedSet<pico::ILPRowItem>      row_ht; 
    3232static HashedSet<pico::ILPColItem>      col_ht; 
    33 static optimizeSense                    sense; 
     33static pebbl::optimizeSense             sense; 
    3434static CharString                       last_var; 
    3535static int                              var_flag=TRUE; 
     
    5555extern "C" void ILPread_set_sense(const int val) 
    5656{ 
    57 if (val)        sense = maximize; 
    58 else            sense = minimize; 
     57if (val)        sense = pebbl::maximize; 
     58else            sense = pebbl::minimize; 
    5959} 
    6060 
     
    491491row_ht.clear(); 
    492492col_ht.clear(); 
    493 sense = unknown; 
     493sense = pebbl::unknown; 
    494494} 
    495495 
  • pico/trunk/src/milp/pico/BCMip.cpp

    r4046 r4047  
    263263//--------------------------------------------- 
    264264 
    265 branchSub * BCMipNode::makeChild(int whichChild)  
     265pebbl::branchSub * BCMipNode::makeChild(int whichChild)  
    266266{ 
    267267MEMDEBUG_START_NEW("BCMipNode") 
  • pico/trunk/src/milp/pico/BCMip.h

    r4046 r4047  
    356356  void reset(bool resetVB = true); 
    357357 
    358   virtual branchSub* blankSub(); 
     358  virtual pebbl::branchSub* blankSub(); 
    359359 
    360360  int getCutSerial() 
     
    756756  virtual BCMip *bcGlobal() {return globalPtr;}; 
    757757  MILP *mGlobal() {return (MILP *)globalPtr;}; 
    758   branching *bGlobal() const {return (branching *)globalPtr;}; 
     758  pebbl::branching *bGlobal() const {return (pebbl::branching *)globalPtr;}; 
    759759 
    760760  void BCMipNodeFromBCMip(BCMip* master, bool initVB=true);  // For making the root 
     
    796796// class) pointer as an argument. 
    797797 
    798 inline branchSub* BCMip::blankSub() 
     798inline pebbl::branchSub* BCMip::blankSub() 
    799799{ 
    800800MEMDEBUG_START_NEW("BCMipNode") 
     
    806806tmp->BCMipNodeFromBCMip((BCMip *)this); 
    807807MEMDEBUG_END_NEW("BCMipNode") 
    808 return (branchSub *)tmp; 
     808return (pebbl::branchSub *)tmp; 
    809809}; 
    810810 
  • pico/trunk/src/milp/pico/BCMipBase.cpp

    r4046 r4047  
    1010// BCMipBase.cpp 
    1111// 
    12 // Serves a similar function as the picoBase class, but defines static 
     12// Serves a similar function as the pebblBase class, but defines static 
    1313// data, functions, enums, etc, used only for branch and cut.  All the 
    1414// branch-and-cut classes (cut, search, subproblem, problem) will 
  • pico/trunk/src/milp/pico/BCMipBase.h

    r4008 r4047  
    1010// BCMipBase.h 
    1111// 
    12 // Serves a similar function as the picoBase class, but defines static 
     12// Serves a similar function as the pebblBase class, but defines static 
    1313// data, functions, enums, parameters, etc, used only for branch and cut.  All the 
    1414// branch-and-cut classes (cut, search, subproblem, problem) will 
  • pico/trunk/src/milp/pico/MILPProblem.cpp

    r4046 r4047  
    944944  //Convert to a minimization problem if it isn't one already. 
    945945  //BDP - Is this necessary?  If so, it should be done before dual prices are set. 
    946   if ((int) lp()->getObjSense() != minimize) { 
     946  if ((int) lp()->getObjSense() != pebbl::minimize) { 
    947947    for (int j=0; j < get_ncols(); j++) { 
    948948      objx[j] = (Ereal<double>)-(double)objx[j]; 
  • pico/trunk/src/milp/pico/MILPProblem.h

    r4046 r4047  
    2323#include <utilib/DoubleVector.h> 
    2424#include <utilib/HashedSet.h> 
    25 #include <pebbl/picoBase.h> 
     25#include <pebbl/pebblBase.h> 
    2626#include <pico/serialMilpParams.h> 
    2727#include <pico/PicoLPSolver.h> 
     
    6666// 
    6767// 
    68 class MILPProblem : public picoBase, public CommonIO, public serialMilpParams 
     68class MILPProblem : public pebbl::pebblBase, public CommonIO, public serialMilpParams 
    6969{ 
    7070public: 
  • pico/trunk/src/milp/pico/bbhConfig.h

    r4046 r4047  
    1111 
    1212#include <acro_config.h> 
    13 #include <pebbl/picoParams.h>  
     13#include <pebbl/pebblParams.h>  
    1414 
    1515namespace pico { 
  • pico/trunk/src/milp/pico/milp.cpp

    r4046 r4047  
    457457       if (thisVType == initiallyFixed) 
    458458         { 
    459          if (!(picoBase::isInteger(objCoeff * lp->getColLower(i)))) 
     459         if (!(pebblBase::isInteger(objCoeff * lp->getColLower(i)))) 
    460460           { 
    461461           all_int = false; 
     
    466466       // Variable is integer.  If coefficient is *not* integer, then we 
    467467       // cannot guarantee an integer objective. 
    468        if (!picoBase::isInteger(objCoeff)) 
     468       if (!pebblBase::isInteger(objCoeff)) 
    469469         { 
    470470         all_int = false; 
     
    897897} 
    898898 
    899 void MILP::updateLastActivated(branchSubId& id) {lastActivatedId = id;} 
     899void MILP::updateLastActivated(pebbl::branchSubId& id) {lastActivatedId = id;} 
    900900 
    901901 
     
    929929{ 
    930930double deltaObj, pseudoGrad; 
    931 if (lround(lp->getObjSense()) == maximize) 
     931if (lround(lp->getObjSense()) == pebbl::maximize) 
    932932  deltaObj = previousBound - cutoff; 
    933933else deltaObj = cutoff - previousBound; 
  • pico/trunk/src/milp/pico/milp.h

    r4046 r4047  
    4747 
    4848/// Mixed-integer programming solver 
    49 class MILP : virtual public branching, public serialMilpParams, public mipBase 
     49class MILP : virtual public pebbl::branching, public serialMilpParams, public mipBase 
    5050{ 
    5151public: 
     
    141141 
    142142 
    143   BestIncumbentRepository<DoubleVector> cache; 
     143  pebbl::BestIncumbentRepository<DoubleVector> cache; 
    144144 
    145145  // LP was last set up for this problem.  Used for warm starting. 
    146   branchSubId lastActivatedId; 
     146  pebbl::branchSubId lastActivatedId; 
    147147 
    148148  bool ForceColdStart; 
     
    190190  void printAllStatistics(std::ostream& stream = std::cout) 
    191191        { 
    192         pico::branching::printAllStatistics(ucout); 
     192        pebbl::branching::printAllStatistics(ucout); 
    193193        if (cache.size() > 1) { 
    194194           ucout << std::endl; 
     
    262262 
    263263  virtual void preprocess(); 
    264   virtual branchSub* blankSub(); 
     264  virtual pebbl::branchSub* blankSub(); 
    265265  void readIn(int argc, char** argv); 
    266266  // WEH - I don't see how this is ever used or defined 
     
    341341// The LP solver should have state from this computation 
    342342 
    343   virtual void updateLastActivated(branchSubId& id); 
    344   branchSubId& lastActivated() { return lastActivatedId; } 
     343  virtual void updateLastActivated(pebbl::branchSubId& id); 
     344  pebbl::branchSubId& lastActivated() { return lastActivatedId; } 
    345345 
    346346  // This used to set the lastActivatedId to empty, but that had bad side effects 
  • pico/trunk/src/milp/pico/milpNode.cpp

    r4046 r4047  
    162162//--------------------------------------------- 
    163163 
    164 branchSub * MILPNode::makeChild(int whichChild)  
     164pebbl::branchSub * MILPNode::makeChild(int whichChild)  
    165165{ 
    166166  MEMDEBUG_START_NEW("MILPNode") 
     
    623623    } 
    624624    // LP value could improve the bound 
    625   if (lround(lp->getObjSense()) == minimize) 
     625  if (lround(lp->getObjSense()) == pebbl::minimize) 
    626626    bound = max(bound, lpBound); 
    627627  else bound = min(bound, lpBound); 
     
    812812      } 
    813813    //  ucout << "upBound = " << upBound << ", downBound = " << downBound << ", bound = " << bound; 
    814     if (lround(lp->getObjSense()) == minimize) 
     814    if (lround(lp->getObjSense()) == pebbl::minimize) 
    815815      { 
    816816        bestBound = min(upBound, downBound); // valid bound for the subproblem 
     
    13691369 ucout << "UPC: parent bound = " << parent_bound << ", new bound = " << newBound << ", variable: " << branchingVar << ", branchingVal: " << branchingVal << "\n";*/ 
    13701370double pCostDatum; 
    1371 if (lround(lp->getObjSense()) == minimize) 
     1371if (lround(lp->getObjSense()) == pebbl::minimize) 
    13721372   pCostDatum = (newBound - parent_bound); 
    13731373else  
     
    18271827int MILPNode::urandomIncumbentHeuristic(DoubleVector& vec, double& value) 
    18281828{ 
    1829 RNG* rng = gRandomRNG(); 
     1829RNG* rng = pebbl::gRandomRNG(); 
    18301830DUniform dunif(rng); 
    18311831 
  • pico/trunk/src/milp/pico/milpNode.h

    r4046 r4047  
    2929namespace pico { 
    3030 
    31   class MILPNode : virtual public branchSub, public mipBase 
     31  class MILPNode : virtual public pebbl::branchSub, public mipBase 
    3232{ 
    3333 
     
    149149// We'll use this to determine whether we have a warm start. 
    150150 
    151   branchSubId parentId; 
     151  pebbl::branchSubId parentId; 
    152152 
    153153  virtual bool isWarmStart()  
     
    175175 
    176176  MILP* mGlobal()            { return globalPtr; }; 
    177   branching* bGlobal() const { return globalPtr; }; 
     177  pebbl::branching* bGlobal() const { return globalPtr; }; 
    178178  MILPProblem* mip()         { return mGlobal()->MIP; } 
    179179 
     
    230230// Turn a node into the root 
    231231  virtual void setRootComputation(); 
    232   virtual branchSub* makeChild(int whichChild = anyChild); 
     232  virtual pebbl::branchSub* makeChild(int whichChild = anyChild); 
    233233// The state variable is inherited from branchSub 
    234234  virtual bool        candidateSolution() 
     
    394394 // Give more output for creating visual output of the tree 
    395395  void valLogSplitExtra(); 
    396   void valLogCreateExtra(branchSub *parent); 
     396  void valLogCreateExtra(pebbl::branchSub *parent); 
    397397 
    398398// Compute the number and location of fractional variables which should be ints 
     
    430430// class) pointer as an argument. 
    431431 
    432 inline branchSub* MILP::blankSub() 
     432inline pebbl::branchSub* MILP::blankSub() 
    433433{ 
    434434 
     
    441441tmp->MILPNodeFromMILP((MILP *)this); 
    442442MEMDEBUG_END_NEW("MILPNode") 
    443 return (branchSub *) tmp; 
     443return (pebbl::branchSub *) tmp; 
    444444}; 
    445445 
  • pico/trunk/src/milp/pico/mipHeuristic.cpp

    r4046 r4047  
    222222     
    223223    sol->setSolving();          // Most of the time, we're not cutting 
    224     sol->setObjSense(minimize); // Always minimize 
     224    sol->setObjSense(pebbl::minimize); // Always minimize 
    225225 
    226226    // Code below should be extraneous now; check with Bill/Cindy %%%%%%%% 
     
    923923            DEBUGPR( 1, ucout << "***** MIPHeuristic found a solution: " 
    924924                     << "value = "  << newValue << " {bound-count="  
    925                      << sp->bGlobal()->subCount[picoBase::beingBounded]  
     925                     << sp->bGlobal()->subCount[pebbl::pebblBase::beingBounded]  
    926926                     << "} ***** " << endl); 
    927927            DEBUGPR( 4, ucout << "solution = "<< newSol << endl ); 
  • pico/trunk/src/milp/pico/picoRowCut.cpp

    r4046 r4047  
    180180double scale_factor = getAlignedScaleFactor(other); 
    181181double scaled_rhs = cut->ub() * scale_factor; 
    182 if (scaled_rhs - other.cut->ub() <= picoBase::integerTolerance) 
     182if (scaled_rhs - other.cut->ub() <= pebbl::pebblBase::integerTolerance) 
    183183  return(0); 
    184184if (scaled_rhs < other.cut->ub()) 
     
    208208double scaled_rhs = cut->ub() * scale_factor; 
    209209// Nothing to do if equal. 
    210 if (scaled_rhs - other.cut->ub() <= picoBase::integerTolerance) 
     210if (scaled_rhs - other.cut->ub() <= pebblBase::integerTolerance) 
    211211  return; 
    212212if (scaled_rhs < other.cut->ub()) 
  • pico/trunk/src/milp/pico/picoRowCut.h

    r4046 r4047  
    2424#include <utilib/hash_fn.h> 
    2525#include <utilib/exception_mngr.h> 
    26 #include <pebbl/BCMipBase.h> 
     26#include <pico/BCMipBase.h> 
    2727#include <utilib/mpiUtil.h> 
    2828 
Note: See TracChangeset for help on using the changeset viewer.