Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

SbbPartialNodeInfo Class Reference

Holds information for recreating a subproblem by incremental change from the parent. More...

#include <SbbNode.hpp>

Inheritance diagram for SbbPartialNodeInfo:

SbbNodeInfo List of all members.

Public Member Functions

virtual void applyToModel (SbbModel *model, CoinWarmStartBasis *&basis, SbbCountRowCut **addCuts, int &currentNumberCuts) const
 Modify model according to information at node.

virtual SbbNodeInfobuildRowBasis (CoinWarmStartBasis &basis) const
 SbbPartialNodeInfo (SbbNodeInfo *parent, SbbNode *owner, int numberChangedBounds, const int *variables, const double *boundChanges, const CoinWarmStartDiff *basisDiff)
 SbbPartialNodeInfo (const SbbPartialNodeInfo &)
virtual SbbNodeInfoclone () const
 Clone.


Private Member Functions

SbbPartialNodeInfooperator= (const SbbPartialNodeInfo &rhs)
 Illegal Assignment operator.


Private Attributes

CoinWarmStartDiffbasisDiff_
 Basis diff information.

int * variables_
 Which variable (top bit if upper bound changing).

double * newBounds_
int numberChangedBounds_
 Number of bound changes.


Detailed Description

Holds information for recreating a subproblem by incremental change from the parent.

A SbbPartialNodeInfo object contains changes to the bounds and basis, and additional cuts, required to recreate a subproblem by modifying and augmenting the parent subproblem.

Definition at line 297 of file SbbNode.hpp.


Member Function Documentation

void SbbPartialNodeInfo::applyToModel SbbModel model,
CoinWarmStartBasis *&  basis,
SbbCountRowCut **  addCuts,
int &  currentNumberCuts
const [virtual]
 

Modify model according to information at node.

The routine modifies the model according to bound and basis change information at node and adds any cuts to the addCuts array.

Implements SbbNodeInfo.

Definition at line 552 of file SbbNode.cpp.

References CoinWarmStartBasis::applyDiff(), basisDiff_, numberChangedBounds_, OsiSolverInterface::setColLower(), OsiSolverInterface::setColUpper(), SbbModel::solver(), and variables_.

00557 { OsiSolverInterface *solver = model->solver();
00558 
00559   basis->applyDiff(basisDiff_) ;
00560 
00561   // branch - do bounds
00562   int i;
00563   for (i=0;i<numberChangedBounds_;i++) {
00564     int variable = variables_[i];
00565     if ((variable&0x80000000)==0) {
00566       // lower bound changing
00567       solver->setColLower(variable,newBounds_[i]);
00568     } else {
00569       // upper bound changing
00570       solver->setColUpper(variable&0x7fffffff,newBounds_[i]);
00571     }
00572   }
00573   for (i=0;i<numberCuts_;i++) 
00574     addCuts[currentNumberCuts+i]= cuts_[i];
00575   currentNumberCuts += numberCuts_;
00576   return ;
00577 }

SbbNodeInfo * SbbPartialNodeInfo::buildRowBasis CoinWarmStartBasis basis  )  const [virtual]
 

Builds up row basis backwards (until original model). Returns NULL or previous one to apply . Depends on Free being 0 and impossible for cuts

Implements SbbNodeInfo.

Definition at line 585 of file SbbNode.cpp.

References CoinWarmStartBasis::applyDiff(), and basisDiff_.

00587 { basis.applyDiff(basisDiff_) ;
00588 
00589   return parent_ ; }


The documentation for this class was generated from the following files:
Generated on Wed Dec 3 14:36:26 2003 for Sbb by doxygen 1.3.5