Changeset 970


Ignore:
Timestamp:
Jun 9, 2008 3:18:33 PM (11 years ago)
Author:
jpgoncal
Message:

Added function to do move.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dynamicbranching/dynamicbranching.cpp

    r969 r970  
    665665#endif
    666666
    667 void moveNodes(OsiSolverInterface & model,
     667bool moveNodes(OsiSolverInterface & model,
    668668               DBVectorNode & branchingTree,
    669                DBNodeSimple & node)
    670 {
    671 
    672 
     669               int kNode)
     670{
     671
     672  DBNodeSimple & node = branchingTree[kNode];
     673  DBNodeSimple & grandParent = branchingTree[node.parent_];
     674  int grandParentVariable = grandParent.variable_;
     675  // check if branching constraint of grandparent is tight
     676  bool canMoveNodes = checkGrandparent();
     677
     678  if(!canMoveNodes)
     679    return false;
     680
     681  node.parent_ = grandParent.parent_;
     682  grandParent.parent_ = kNode;
     683  // change bounds of grandParent
     684  grandParent.lower_[
    673685
    674686
Note: See TracChangeset for help on using the changeset viewer.