Changeset 1271 for stable/2.4/Cbc/src/CbcBranchBase.cpp
 Timestamp:
 Nov 5, 2009 10:57:25 AM (10 years ago)
 Location:
 stable/2.4
 Files:

 1 edited
 1 copied
Legend:
 Unmodified
 Added
 Removed

stable/2.4
 Property svn:externals

old new 7 7 CoinUtils https://projects.coinor.org/svn/CoinUtils/stable/2.5/CoinUtils 8 8 Cgl https://projects.coinor.org/svn/Cgl/stable/0.54/Cgl 9 Clp https://projects.coinor.org/svn/Clp/stable/1.1 0/Clp9 Clp https://projects.coinor.org/svn/Clp/stable/1.11/Clp 10 10 Osi https://projects.coinor.org/svn/Osi/stable/0.100/Osi 11 11 Vol https://projects.coinor.org/svn/Vol/stable/1.1/Vol

 Property svn:externals

stable/2.4/Cbc/src/CbcBranchBase.cpp
r1121 r1271 1 /* $Id$ */ 1 2 // Copyright (C) 2002, International Business Machines 2 3 // Corporation and others. All Rights Reserved. … … 81 82 ceilingValue = floorValue+1.0; 82 83 } 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 pseudocost ideas 95 96 This should also set mutable infeasibility_ and whichWay_ 97 This is for instant reuse 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 98 87 */ 99 88 double 100 CbcObject::infeasibility(const OsiSolverInterface * solver,int &preferredWay) const 101 { 102 assert (solver==model_>solver()); 103 return infeasibility(preferredWay); 89 CbcObject::feasibleRegion(OsiSolverInterface * /*solver*/) const 90 { 91 //assert (solver==model_>solver()); 92 CbcObject * fudge = const_cast<CbcObject *>(this); 93 fudge>feasibleRegion(); 94 return 0.0; 104 95 } 105 96 … … 109 100 */ 110 101 double 111 CbcObject::feasibleRegion(OsiSolverInterface * solver) const 112 { 113 assert (solver==model_>solver()); 102 CbcObject::feasibleRegion(OsiSolverInterface * /*solver*/, 103 const OsiBranchingInformation * /*info*/) const 104 { 105 //assert (solver==model_>solver()); 114 106 CbcObject * fudge = const_cast<CbcObject *>(this); 115 107 fudge>feasibleRegion(); 116 108 return 0.0; 117 109 } 118 /* Infeasibility of the object119 120 This is some measure of the infeasibility of the object. 0.0121 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 of126 case when no strong branching127 128 The object may also compute an estimate of cost of going "up" or "down".129 This will probably be based on pseudocost ideas130 131 This should also set mutable infeasibility_ and whichWay_132 This is for instant reuse for speed133 */134 double135 CbcObject::infeasibility(const OsiBranchingInformation * info,136 int &preferredWay) const137 {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 feasible144 */145 double146 CbcObject::feasibleRegion(OsiSolverInterface * solver,const OsiBranchingInformation * info) const147 {148 assert (solver==model_>solver());149 CbcObject * fudge = const_cast<CbcObject *>(this);150 fudge>feasibleRegion();151 return 0.0;152 }153 154 110 /* Create a branching object and indicate which way to branch first. 155 111 … … 158 114 */ 159 115 OsiBranchingObject * 160 CbcObject::createBranch(OsiSolverInterface * solver, int way) const 161 { 162 assert (solver==model_>solver()); 116 CbcObject::createOsiBranch(OsiSolverInterface * solver, 117 const OsiBranchingInformation * info, 118 int way) const 119 { 120 //assert (solver==model_>solver()); 163 121 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); 177 123 } 178 124 /* Create an OsiSolverBranch object … … 189 135 Assumes can get information from solver */ 190 136 CbcObjectUpdateData 191 CbcObject::createUpdateInformation(const OsiSolverInterface * solver,192 const CbcNode * node,193 const CbcBranchingObject * branchingObject)137 CbcObject::createUpdateInformation(const OsiSolverInterface * /*solver*/, 138 const CbcNode * /*node*/, 139 const CbcBranchingObject * /*branchingObject*/) 194 140 { 195 141 return CbcObjectUpdateData(); … … 273 219 int 274 220 CbcBranchDecision::bestBranch (CbcBranchingObject ** objects, int numberObjects, 275 int numberUnsatisfied,221 int /*numberUnsatisfied*/, 276 222 double * changeUp, int * numberInfeasibilitiesUp, 277 223 double * changeDown, int * numberInfeasibilitiesDown, 278 double objectiveValue)224 double /*objectiveValue*/) 279 225 { 280 226 int bestWay=0; … … 321 267 322 268 // Copy constructor 323 CbcConsequence::CbcConsequence ( const CbcConsequence & rhs)269 CbcConsequence::CbcConsequence ( const CbcConsequence & /*rhs*/) 324 270 { 325 271 }
Note: See TracChangeset
for help on using the changeset viewer.