OsiBranchingObject.hpp
Go to the documentation of this file.
1 // Copyright (C) 2006, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 // This code is licensed under the terms of the Eclipse Public License (EPL).
4 
5 #ifndef OsiBranchingObject_H
6 #define OsiBranchingObject_H
7 
8 #include <cassert>
9 #include <string>
10 #include <vector>
11 
12 #include "CoinError.hpp"
13 #include "CoinTypes.hpp"
14 
15 class OsiSolverInterface;
16 class OsiSolverBranch;
17 
18 class OsiBranchingObject;
20 
21 //#############################################################################
22 //This contains the abstract base class for an object and for branching.
23 //It also contains a simple integer class
24 //#############################################################################
25 
56 class OsiObject {
57 
58 public:
59 
61  OsiObject ();
62 
64  OsiObject ( const OsiObject &);
65 
67  OsiObject & operator=( const OsiObject& rhs);
68 
70  virtual OsiObject * clone() const=0;
71 
73  virtual ~OsiObject ();
74 
96  double infeasibility(const OsiSolverInterface * solver,int &whichWay) const ;
97  // Faster version when more information available
98  virtual double infeasibility(const OsiBranchingInformation * info, int &whichWay) const =0;
99  // This does NOT set mutable stuff
100  virtual double checkInfeasibility(const OsiBranchingInformation * info) const;
101 
106  virtual double feasibleRegion(OsiSolverInterface * solver) const ;
112  virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const =0;
113 
120  const OsiBranchingInformation * /*info*/,
121  int /*way*/) const {throw CoinError("Need code","createBranch","OsiBranchingObject"); return NULL; }
122 
125  virtual bool canDoHeuristics() const
126  {return true;}
129  virtual bool canMoveToNearest() const
130  {return false;}
134  virtual int columnNumber() const;
136  inline int priority() const
137  { return priority_;}
139  inline void setPriority(int priority)
140  { priority_ = priority;}
143  virtual bool boundBranch() const
144  {return true;}
146  virtual bool canHandleShadowPrices() const
147  { return false;}
149  inline int numberWays() const
150  { return numberWays_;}
152  inline void setNumberWays(int numberWays)
153  { numberWays_ = static_cast<short int>(numberWays) ; }
158  inline void setWhichWay(int way)
159  { whichWay_ = static_cast<short int>(way) ; }
164  inline int whichWay() const
165  { return whichWay_;}
167  virtual int preferredWay() const
168  { return -1;}
170  inline double infeasibility() const
171  { return infeasibility_;}
173  virtual double upEstimate() const;
175  virtual double downEstimate() const;
180  virtual void resetBounds(const OsiSolverInterface * ) {}
183  virtual void resetSequenceEtc(int , const int * ) {}
185  virtual void updateBefore(const OsiObject * ) {}
187  virtual void updateAfter(const OsiObject * , const OsiObject * ) {}
188 
189 protected:
191 
193  mutable double infeasibility_;
195  mutable short whichWay_;
197  short numberWays_;
200 
201 };
204 
205 
206 class OsiObject2 : public OsiObject {
207 
208 public:
209 
211  OsiObject2 ();
212 
214  OsiObject2 ( const OsiObject2 &);
215 
217  OsiObject2 & operator=( const OsiObject2& rhs);
218 
220  virtual ~OsiObject2 ();
221 
223  inline void setPreferredWay(int value)
224  {preferredWay_=value;}
225 
227  virtual int preferredWay() const
228  { return preferredWay_;}
229 protected:
233  mutable double otherInfeasibility_;
234 
235 };
236 
255 
256 public:
257 
260 
262  OsiBranchingObject (OsiSolverInterface * solver, double value);
263 
266 
269 
271  virtual OsiBranchingObject * clone() const=0;
272 
274  virtual ~OsiBranchingObject ();
275 
277  inline int numberBranches() const
278  {return numberBranches_;}
279 
281  inline int numberBranchesLeft() const
282  {return numberBranches_-branchIndex_;}
283 
286  { numberBranches_ ++;}
287 
291  inline void setNumberBranchesLeft(int /*value*/)
292  {/*assert (value==1&&!branchIndex_);*/ numberBranches_=1;}
293 
296  {branchIndex_++;}
297 
303  virtual double branch(OsiSolverInterface * solver)=0;
309  virtual double branch() {return branch(NULL);}
312  virtual bool boundBranch() const
313  {return true;}
317  inline int branchIndex() const
318  {return branchIndex_;}
319 
323  { branchIndex_ = static_cast<short int>(branchIndex) ; }
324 
326  inline double value() const
327  {return value_;}
328 
330  inline const OsiObject * originalObject() const
331  {return originalObject_;}
333  inline void setOriginalObject(const OsiObject * object)
334  {originalObject_=object;}
338  virtual void checkIsCutoff(double ) {}
340  int columnNumber() const;
343  virtual void print(const OsiSolverInterface * =NULL) const {}
344 
345 protected:
346 
348  double value_;
349 
352 
356 
361 
362 };
363 /* This contains information
364  This could also contain pseudo shadow prices
365  or information for dealing with computing and trusting pseudo-costs
366 */
368 
369 public:
370 
373 
378  OsiBranchingInformation (const OsiSolverInterface * solver, bool normalSolver,bool copySolution=false);
379 
382 
385 
387  virtual OsiBranchingInformation * clone() const;
388 
390  virtual ~OsiBranchingInformation ();
391 
392  // Note public
393 public:
395 
406  double cutoff_;
408  double direction_;
416  double defaultDual_;
418  mutable const OsiSolverInterface * solver_;
422  mutable const double * lower_;
424  mutable const double * solution_;
426  mutable const double * upper_;
428  const double * hotstartSolution_;
430  const double * pi_;
432  const double * rowActivity_;
434  const double * objective_;
436  const double * rowLower_;
438  const double * rowUpper_;
440  const double * elementByColumn_;
444  const int * columnLength_;
446  const int * row_;
452  double * usefulRegion_;
460  int depth_;
463 };
464 
466 
468 
469 public:
470 
473 
481  int way , double value) ;
482 
485 
488 
490  virtual ~OsiTwoWayBranchingObject ();
491 
498  virtual double branch(OsiSolverInterface * solver)=0;
499 
500  inline int firstBranch() const { return firstBranch_; }
502  inline int way() const
503  { return !branchIndex_ ? firstBranch_ : -firstBranch_;}
504 protected:
507 };
509 
510 
511 class OsiSimpleInteger : public OsiObject2 {
512 
513 public:
514 
516  OsiSimpleInteger ();
517 
519  OsiSimpleInteger (const OsiSolverInterface * solver, int iColumn);
520 
522  OsiSimpleInteger (int iColumn, double lower, double upper);
523 
526 
528  virtual OsiObject * clone() const;
529 
532 
534  virtual ~OsiSimpleInteger ();
535 
538  virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
539 
546  virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
547 
552  virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
553 
554 
556  inline void setColumnNumber(int value)
557  {columnNumber_=value;}
558 
563  virtual int columnNumber() const;
564 
566  inline double originalLowerBound() const
567  { return originalLower_;}
568  inline void setOriginalLowerBound(double value)
569  { originalLower_=value;}
570  inline double originalUpperBound() const
571  { return originalUpper_;}
572  inline void setOriginalUpperBound(double value)
573  { originalUpper_=value;}
578  virtual void resetBounds(const OsiSolverInterface * solver) ;
581  virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
582 
584  virtual double upEstimate() const;
586  virtual double downEstimate() const;
588  virtual bool canHandleShadowPrices() const
589  { return false;}
590 protected:
598 
599 };
608 
609 public:
610 
613 
622  int way , double value) ;
630  OsiIntegerBranchingObject (OsiSolverInterface *solver,const OsiSimpleInteger * originalObject,
631  int way , double value, double downUpperBound, double upLowerBound) ;
632 
635 
638 
640  virtual OsiBranchingObject * clone() const;
641 
643  virtual ~OsiIntegerBranchingObject ();
644 
651  virtual double branch(OsiSolverInterface * solver);
652 
656  virtual void print(const OsiSolverInterface * solver=NULL);
657 
658 protected:
659  // Probably could get away with just value which is already stored
661  double down_[2];
663  double up_[2];
664 };
665 
666 
674 class OsiSOS : public OsiObject2 {
675 
676 public:
677 
678  // Default Constructor
679  OsiSOS ();
680 
685  OsiSOS (const OsiSolverInterface * solver, int numberMembers,
686  const int * which, const double * weights, int type=1);
687 
688  // Copy constructor
689  OsiSOS ( const OsiSOS &);
690 
692  virtual OsiObject * clone() const;
693 
694  // Assignment operator
695  OsiSOS & operator=( const OsiSOS& rhs);
696 
697  // Destructor
698  virtual ~OsiSOS ();
699 
702  virtual double infeasibility(const OsiBranchingInformation * info,int & whichWay) const;
703 
710  virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
711 
716  virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
718  virtual double upEstimate() const;
720  virtual double downEstimate() const;
721 
723  virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
724 
726  inline int numberMembers() const
727  {return numberMembers_;}
728 
730  inline const int * members() const
731  {return members_;}
732 
734  inline int sosType() const
735  {return sosType_;}
736 
738  inline int setType() const
739  {return sosType_;}
740 
742  inline const double * weights() const
743  { return weights_;}
744 
747  virtual bool canDoHeuristics() const
748  {return (sosType_==1&&integerValued_);}
750  inline void setIntegerValued(bool yesNo)
751  { integerValued_=yesNo;}
753  virtual bool canHandleShadowPrices() const
754  { return true;}
756  inline void setNumberMembers(int value)
757  {numberMembers_=value;}
758 
760  inline int * mutableMembers() const
761  {return members_;}
762 
764  inline void setSosType(int value)
765  {sosType_=value;}
766 
768  inline double * mutableWeights() const
769  { return weights_;}
770 protected:
772 
774  int * members_;
776  double * weights_;
777 
781  int sosType_;
784 };
785 
790 
791 public:
792 
793  // Default Constructor
795 
796  // Useful constructor
798  int way,
799  double separator);
800 
801  // Copy constructor
803 
804  // Assignment operator
806 
808  virtual OsiBranchingObject * clone() const;
809 
810  // Destructor
811  virtual ~OsiSOSBranchingObject ();
812 
815  virtual double branch(OsiSolverInterface * solver);
816 
820  virtual void print(const OsiSolverInterface * solver=NULL);
821 private:
823 };
827 class OsiLotsize : public OsiObject2 {
828 
829 public:
830 
831  // Default Constructor
832  OsiLotsize ();
833 
834  /* Useful constructor - passed model index.
835  Also passed valid values - if range then pairs
836  */
837  OsiLotsize (const OsiSolverInterface * solver, int iColumn,
838  int numberPoints, const double * points, bool range=false);
839 
840  // Copy constructor
841  OsiLotsize ( const OsiLotsize &);
842 
844  virtual OsiObject * clone() const;
845 
846  // Assignment operator
847  OsiLotsize & operator=( const OsiLotsize& rhs);
848 
849  // Destructor
850  virtual ~OsiLotsize ();
851 
854  virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
855 
864  virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
865 
870  virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
871 
872 
874  inline void setColumnNumber(int value)
875  {columnNumber_=value;}
876 
881  virtual int columnNumber() const;
887  virtual void resetBounds(const OsiSolverInterface * solver);
888 
892  bool findRange(double value, double integerTolerance) const;
893 
896  virtual void floorCeiling(double & floorLotsize, double & ceilingLotsize, double value,
897  double tolerance) const;
898 
900  inline double originalLowerBound() const
901  { return bound_[0];}
902  inline double originalUpperBound() const
903  { return bound_[rangeType_*numberRanges_-1];}
905  inline int rangeType() const
906  { return rangeType_;}
908  inline int numberRanges() const
909  { return numberRanges_;}
911  inline double * bound() const
912  { return bound_;}
915  virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
916 
918  virtual double upEstimate() const;
920  virtual double downEstimate() const;
922  virtual bool canHandleShadowPrices() const
923  { return true;}
926  virtual bool canDoHeuristics() const
927  {return false;}
928 
929 private:
931 
938  // largest gap
939  double largestGap_;
941  double * bound_;
943  mutable int range_;
944 };
945 
946 
958 
959 public:
960 
963 
972  int way , double value) ;
973 
976 
979 
981  virtual OsiBranchingObject * clone() const;
982 
984  virtual ~OsiLotsizeBranchingObject ();
985 
992  virtual double branch(OsiSolverInterface * solver);
993 
997  virtual void print(const OsiSolverInterface * solver=NULL);
998 
999 protected:
1001  double down_[2];
1003  double up_[2];
1004 };
1005 #endif
virtual int preferredWay() const
Get pre-emptive preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
int CoinBigIndex
Branching object for Special ordered sets.
void setNumberBranchesLeft(int)
Set the number of branch arms left for this branching object Just for forcing.
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
virtual void resetSequenceEtc(int, const int *)
Change column numbers after preprocessing.
const int * members() const
Members (indices in range 0 ... numberColumns-1)
int numberBranchesLeft() const
The number of branch arms left for this branching object.
void incrementNumberBranchesLeft()
Increment the number of branch arms left for this branching object.
double originalUpperBound() const
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
virtual ~OsiSOS()
int setType() const
SOS type.
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
int numberMembers() const
Number of members.
virtual bool boundBranch() const
Return true if branch should fix variables.
OsiLotsizeBranchingObject()
Default constructor.
OsiObject2 & operator=(const OsiObject2 &rhs)
Assignment operator.
int branchIndex() const
Get the state of the branching object This is just the branch index.
Define a single integer class.
virtual ~OsiObject2()
Destructor.
int sosType() const
SOS type.
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
bool findRange(double value, double integerTolerance) const
Finds range of interest so value is feasible in range range_ or infeasible between hi[range_] and lo[...
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
double * mutableWeights() const
Array of weights.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
virtual ~OsiLotsizeBranchingObject()
Destructor.
Define a class to add a bit of complexity to OsiObject This assumes 2 way branching.
int * indexRegion_
Useful index region to go with usefulRegion_.
const OsiSolverInterface * solver_
Pointer to solver.
OsiBranchingInformation & operator=(const OsiBranchingInformation &rhs)
Assignment operator.
void setWhichWay(int way)
Return preferred way to branch.
virtual OsiBranchingInformation * clone() const
Clone.
virtual void updateBefore(const OsiObject *)
Updates stuff like pseudocosts before threads.
short branchIndex_
The state of the branching object.
Simple branching object for an integer variable.
Define Special Ordered Sets of type 1 and 2.
double originalUpper_
Original upper bound.
bool integerValued_
Whether integer valued.
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
virtual ~OsiBranchingInformation()
Destructor.
double * usefulRegion_
Useful region of length CoinMax(numberColumns,2*numberRows) This is allocated and deleted before OsiO...
void setSosType(int value)
Set SOS type.
int * mutableMembers() const
Members (indices in range 0 ... numberColumns-1)
double timeRemaining_
Maximum time remaining before stopping on time.
double infeasibility_
data
void setColumnNumber(int value)
Set solver column number.
double value_
Current value - has some meaning about branch.
void setPriority(int priority)
Set priority.
virtual void floorCeiling(double &floorLotsize, double &ceilingLotsize, double value, double tolerance) const
Returns floor and ceiling.
const double * hotstartSolution_
Highly optional target (hot start) solution.
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to contain the current solution.
short whichWay_
Computed preferred way to branch.
virtual OsiObject * clone() const
Clone.
void setBranchingIndex(int branchIndex)
Set the state of the branching object.
virtual void checkIsCutoff(double)
Double checks in case node can change its mind! Returns objective value Can change objective etc...
virtual int columnNumber() const
Column number if single column object -1 otherwise, Used by heuristics.
double cutoff_
Value of objective cutoff (in minimization sense)
virtual double feasibleRegion(OsiSolverInterface *solver) const
For the variable(s) referenced by the object, look at the current solution and set bounds to match th...
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
double infeasibility() const
Return infeasibility.
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
virtual OsiObject * clone() const =0
Clone.
int numberMembers_
Number of members.
void setOriginalUpperBound(double value)
OsiIntegerBranchingObject & operator=(const OsiIntegerBranchingObject &rhs)
Assignment operator.
const double * elementByColumn_
Elements in column copy of matrix.
virtual ~OsiSimpleInteger()
Destructor.
Lotsize branching object.
OsiSOS & operator=(const OsiSOS &rhs)
virtual OsiBranchingObject * clone() const
Clone.
OsiTwoWayBranchingObject & operator=(const OsiTwoWayBranchingObject &rhs)
Assignment operator.
const double * objective_
Objective.
void setPreferredWay(int value)
Set preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
const OsiObject * originalObject() const
Return pointer back to object which created.
double * bound_
Ranges.
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
const double * rowLower_
Pointer to current lower bounds on rows.
double originalUpperBound() const
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
const CoinBigIndex * columnStart_
Column starts.
const double * rowActivity_
Pointer to row activity.
int numberBranches_
Number of branches.
double value() const
Current value.
OsiBranchingObject()
Default Constructor.
int way() const
Way returns -1 on down +1 on up.
int firstBranch_
Which way was first branch -1 = down, +1 = up.
const double * upper_
Pointer to current upper bounds on columns.
virtual double branch()
Execute the actions required to branch, as specified by the current state of the branching object...
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Redoes data when sequence numbers change.
OsiObject & operator=(const OsiObject &rhs)
Assignment operator.
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
OsiObject2()
Default Constructor.
virtual ~OsiSOSBranchingObject()
int numberSolutions_
Number of solutions found.
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns &gt;= 0 Used by heuristics.
OsiLotsizeBranchingObject & operator=(const OsiLotsizeBranchingObject &rhs)
Assignment operator.
int numberBranchingSolutions_
Number of branching solutions found (i.e. exclude heuristics)
virtual ~OsiTwoWayBranchingObject()
Destructor.
void setNumberMembers(int value)
Set number of members.
virtual OsiBranchingObject * clone() const
Clone.
OsiLotsize & operator=(const OsiLotsize &rhs)
int numberRanges_
Number of points.
short numberWays_
Maximum number of ways on branch.
const double * pi_
Pointer to duals.
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns &gt;= 0 Used by heuristics.
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to fix the variable at the current (integer) value.
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to fix the variable at the current (integer) value.
int priority() const
Return Priority - note 1 is highest priority.
const OsiObject * originalObject_
Pointer back to object which created.
int rangeType() const
Type - 1 points, 2 ranges.
virtual OsiBranchingObject * clone() const
Clone.
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
OsiBranchingObject & operator=(const OsiBranchingObject &rhs)
Assignment operator.
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
virtual ~OsiObject()
Destructor.
void setColumnNumber(int value)
Set solver column number.
double objectiveValue_
Value of objective function (in minimization sense)
int columnNumber_
data
virtual void updateAfter(const OsiObject *, const OsiObject *)
Updates stuff like pseudocosts after threads finished.
double defaultDual_
Dual to use if row bound violated (if negative then pseudoShadowPrices off)
const double * weights() const
Array of weights.
virtual OsiBranchingObject * clone() const =0
Clone.
virtual OsiObject * clone() const
Clone.
This just adds two-wayness to a branching object.
Abstract Base Class for describing an interface to a solver.
virtual bool canMoveToNearest() const
Return true if object can take part in move to nearest heuristic.
double integerTolerance_
Integer tolerance.
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
int numberColumns_
The number of columns.
const double * solution_
Pointer to current solution.
OsiObject()
Default Constructor.
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
OsiIntegerBranchingObject()
Default constructor.
void setOriginalLowerBound(double value)
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
virtual double checkInfeasibility(const OsiBranchingInformation *info) const
virtual void resetBounds(const OsiSolverInterface *)
Reset variable bounds to their original values.
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
int whichWay() const
Return current preferred way to branch.
virtual ~OsiIntegerBranchingObject()
Destructor.
double * weights_
Weights.
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
int preferredWay_
Preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
int rangeType_
Type - 1 points, 2 ranges.
OsiTwoWayBranchingObject()
Default constructor.
double originalLowerBound() const
Original bounds.
Error Class thrown by an exception.
Definition: CoinError.hpp:42
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
int numberWays() const
Return maximum number of ways branch may have.
double originalLower_
data Original lower bound
int sosType_
SOS type.
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
virtual ~OsiLotsize()
void setNumberWays(int numberWays)
Set maximum number of ways branch may have.
OsiSimpleInteger()
Default Constructor.
int * members_
data
int numberBranches() const
The number of branch arms created for this branching object.
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
int columnNumber() const
For debug.
virtual bool boundBranch() const
Return true if branch should only bound variables.
const double * rowUpper_
Pointer to current upper bounds on rows.
virtual OsiObject * clone() const
Clone.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *, const OsiBranchingInformation *, int) const
Create a branching object and indicate which way to branch first.
OsiSimpleInteger & operator=(const OsiSimpleInteger &rhs)
Assignment operator.
OsiBranchingInformation()
Default Constructor.
double originalLowerBound() const
Original bounds.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
virtual void resetBounds(const OsiSolverInterface *solver)
Reset variable bounds to their original values.
void setOriginalObject(const OsiObject *object)
Set pointer back to object which created.
int numberRanges() const
Number of points.
double * bound() const
Ranges.
double direction_
Direction 1.0 for minimization, -1.0 for maximization.
int columnNumber_
Column number in solver.
Solver Branch Class.
const double * lower_
Pointer to current lower bounds on columns.
void setIntegerValued(bool yesNo)
Set whether set is integer valued or not.
Lotsize class.
const int * columnLength_
Column lengths.
Abstract base class for `objects&#39;.
virtual ~OsiBranchingObject()
Destructor.
double otherInfeasibility_
&quot;Infeasibility&quot; on other way
virtual int preferredWay() const
Get preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
int priority_
Priority.
int range_
Current range.
virtual void resetBounds(const OsiSolverInterface *solver)
Reset original upper and lower bound values from the solver.
OsiSOSBranchingObject & operator=(const OsiSOSBranchingObject &rhs)
const int * row_
Row indices.
virtual void print(const OsiSolverInterface *=NULL) const
Print something about branch - only if log level high.
double primalTolerance_
Primal tolerance.
void decrementNumberBranchesLeft()
Decrement the number of branch arms left for this branching object.
Abstract branching object base class.