Ignore:
Timestamp:
Nov 5, 2009 10:57:25 AM (10 years ago)
Author:
forrest
Message:

Creating new stable branch 2.4 from trunk (rev 1270)

Location:
stable/2.4
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable/2.4

    • Property svn:externals
      •  

        old new  
        77CoinUtils         https://projects.coin-or.org/svn/CoinUtils/stable/2.5/CoinUtils
        88Cgl               https://projects.coin-or.org/svn/Cgl/stable/0.54/Cgl
        9 Clp               https://projects.coin-or.org/svn/Clp/stable/1.10/Clp
         9Clp               https://projects.coin-or.org/svn/Clp/stable/1.11/Clp
        1010Osi               https://projects.coin-or.org/svn/Osi/stable/0.100/Osi
        1111Vol               https://projects.coin-or.org/svn/Vol/stable/1.1/Vol
  • stable/2.4/Cbc/src/CbcBranchBase.cpp

    r1121 r1271  
     1/* $Id$ */
    12// Copyright (C) 2002, International Business Machines
    23// Corporation and others.  All Rights Reserved.
     
    8182  ceilingValue = floorValue+1.0;
    8283}
    83 /* Infeasibility of the object
    84      
    85     This is some measure of the infeasibility of the object. 0.0
    86     indicates that the object is satisfied.
    87  
    88     The preferred branching direction is returned in way,
    89  
    90     This is used to prepare for strong branching but should also think of
    91     case when no strong branching
    92  
    93     The object may also compute an estimate of cost of going "up" or "down".
    94     This will probably be based on pseudo-cost ideas
    95 
    96     This should also set mutable infeasibility_ and whichWay_
    97     This is for instant re-use for speed
     84/* For the variable(s) referenced by the object,
     85      look at the current solution and set bounds to match the solution.
     86      Returns measure of how much it had to move solution to make feasible
    9887*/
    9988double
    100 CbcObject::infeasibility(const OsiSolverInterface * solver,int &preferredWay) const
    101 {
    102   assert (solver==model_->solver());
    103   return infeasibility(preferredWay);
     89CbcObject::feasibleRegion(OsiSolverInterface * /*solver*/) const
     90{
     91  //assert (solver==model_->solver());
     92  CbcObject * fudge = const_cast<CbcObject *>(this);
     93  fudge->feasibleRegion();
     94  return 0.0;
    10495}
    10596 
     
    109100*/
    110101double
    111 CbcObject::feasibleRegion(OsiSolverInterface * solver) const
    112 {
    113   assert (solver==model_->solver());
     102CbcObject::feasibleRegion(OsiSolverInterface * /*solver*/,
     103                          const OsiBranchingInformation * /*info*/) const
     104{
     105  //assert (solver==model_->solver());
    114106  CbcObject * fudge = const_cast<CbcObject *>(this);
    115107  fudge->feasibleRegion();
    116108  return 0.0;
    117109}
    118 /* Infeasibility of the object
    119      
    120     This is some measure of the infeasibility of the object. 0.0
    121     indicates that the object is satisfied.
    122  
    123     The preferred branching direction is returned in way,
    124  
    125     This is used to prepare for strong branching but should also think of
    126     case when no strong branching
    127  
    128     The object may also compute an estimate of cost of going "up" or "down".
    129     This will probably be based on pseudo-cost ideas
    130 
    131     This should also set mutable infeasibility_ and whichWay_
    132     This is for instant re-use for speed
    133 */
    134 double
    135 CbcObject::infeasibility(const OsiBranchingInformation * info,
    136                          int &preferredWay) const
    137 {
    138   return infeasibility(preferredWay);
    139 }
    140  
    141 /* For the variable(s) referenced by the object,
    142       look at the current solution and set bounds to match the solution.
    143       Returns measure of how much it had to move solution to make feasible
    144 */
    145 double
    146 CbcObject::feasibleRegion(OsiSolverInterface * solver,const OsiBranchingInformation * info) const
    147 {
    148   assert (solver==model_->solver());
    149   CbcObject * fudge = const_cast<CbcObject *>(this);
    150   fudge->feasibleRegion();
    151   return 0.0;
    152 }
    153  
    154110/* Create a branching object and indicate which way to branch first.
    155111     
     
    158114*/
    159115OsiBranchingObject *
    160 CbcObject::createBranch(OsiSolverInterface * solver, int way) const
    161 {
    162   assert (solver==model_->solver());
     116CbcObject::createOsiBranch(OsiSolverInterface * solver,
     117                        const OsiBranchingInformation * info,
     118                        int way) const
     119{
     120  //assert (solver==model_->solver());
    163121  CbcObject * fudge = const_cast<CbcObject *>(this);
    164   return fudge->createBranch(way);
    165 }
    166 /* Create a branching object and indicate which way to branch first.
    167      
    168       The branching object has to know how to create branches (fix
    169       variables, etc.)
    170 */
    171 OsiBranchingObject *
    172 CbcObject::createBranch(OsiSolverInterface * solver,const OsiBranchingInformation * info, int way) const
    173 {
    174   assert (solver==model_->solver());
    175   CbcObject * fudge = const_cast<CbcObject *>(this);
    176   return fudge->createBranch(way);
     122  return fudge->createBranch(solver,info,way);
    177123}
    178124/* Create an OsiSolverBranch object
     
    189135   Assumes can get information from solver */
    190136CbcObjectUpdateData
    191 CbcObject::createUpdateInformation(const OsiSolverInterface * solver,
    192                                                         const CbcNode * node,
    193                                                         const CbcBranchingObject * branchingObject)
     137CbcObject::createUpdateInformation(const OsiSolverInterface * /*solver*/,
     138                                   const CbcNode * /*node*/,
     139                                   const CbcBranchingObject * /*branchingObject*/)
    194140{
    195141  return CbcObjectUpdateData();
     
    273219int
    274220CbcBranchDecision::bestBranch (CbcBranchingObject ** objects, int numberObjects,
    275                                int numberUnsatisfied,
     221                               int /*numberUnsatisfied*/,
    276222                               double * changeUp, int * numberInfeasibilitiesUp,
    277223                               double * changeDown, int * numberInfeasibilitiesDown,
    278                                double objectiveValue)
     224                               double /*objectiveValue*/)
    279225{
    280226  int bestWay=0;
     
    321267
    322268// Copy constructor
    323 CbcConsequence::CbcConsequence ( const CbcConsequence & rhs)
     269CbcConsequence::CbcConsequence ( const CbcConsequence & /*rhs*/)
    324270{
    325271}
Note: See TracChangeset for help on using the changeset viewer.