Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
const double * objective_
Objective.
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Redoes data when sequence numbers change.
Error Class thrown by an exception.
Definition: CoinError.hpp:42
int preferredWay_
Preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
virtual bool boundBranch() const
Return true if branch should fix variables.
OsiSimpleInteger & operator=(const OsiSimpleInteger &rhs)
Assignment operator.
OsiSOS & operator=(const OsiSOS &rhs)
void setNumberMembers(int value)
Set number of members.
double primalTolerance_
Primal tolerance.
double originalUpperBound() const
const OsiObject * originalObject() const
Return pointer back to object which created.
OsiLotsizeBranchingObject()
Default constructor.
double originalLowerBound() const
Original bounds.
int * indexRegion_
Useful index region to go with usefulRegion_.
int sosType_
SOS type.
void incrementNumberBranchesLeft()
Increment the number of branch arms left for this branching object.
int numberRanges() const
Number of points.
int priority() const
Return Priority - note 1 is highest priority.
OsiLotsize & operator=(const OsiLotsize &rhs)
const int * row_
Row indices.
Branching object for Special ordered sets.
short whichWay_
Computed preferred way to branch.
void setIntegerValued(bool yesNo)
Set whether set is integer valued or not.
OsiIntegerBranchingObject & operator=(const OsiIntegerBranchingObject &rhs)
Assignment operator.
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[...
int priority_
Priority.
double direction_
Direction 1.0 for minimization, -1.0 for maximization.
OsiIntegerBranchingObject()
Default constructor.
short branchIndex_
The state of the branching object.
virtual void updateAfter(const OsiObject *, const OsiObject *)
Updates stuff like pseudocosts after threads finished.
Define a single integer class.
virtual ~OsiTwoWayBranchingObject()
Destructor.
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
double infeasibility_
data
virtual ~OsiSOSBranchingObject()
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns &gt;= 0 Used by heuristics.
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
virtual OsiBranchingInformation * clone() const
Clone.
double * weights_
Weights.
double objectiveValue_
Value of objective function (in minimization sense)
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
virtual ~OsiObject2()
Destructor.
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
double * bound_
Ranges.
virtual ~OsiObject()
Destructor.
virtual bool canMoveToNearest() const
Return true if object can take part in move to nearest heuristic.
Abstract branching object base class.
virtual int columnNumber() const
Column number if single column object -1 otherwise, Used by heuristics.
OsiTwoWayBranchingObject()
Default constructor.
virtual void resetBounds(const OsiSolverInterface *solver)
Reset original upper and lower bound values from the solver.
int columnNumber_
Column number in solver.
OsiSimpleInteger()
Default Constructor.
const double * rowLower_
Pointer to current lower bounds on rows.
void decrementNumberBranchesLeft()
Decrement the number of branch arms left for this branching object.
const double * pi_
Pointer to duals.
double * bound() const
Ranges.
int numberWays() const
Return maximum number of ways branch may have.
OsiObject & operator=(const OsiObject &rhs)
Assignment operator.
int range_
Current range.
double integerTolerance_
Integer tolerance.
double value() const
Current value.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
double originalUpper_
Original upper bound.
int whichWay() const
Return current preferred way to branch.
OsiSOSBranchingObject & operator=(const OsiSOSBranchingObject &rhs)
Define Special Ordered Sets of type 1 and 2.
virtual OsiBranchingObject * clone() const
Clone.
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns &gt;= 0 Used by heuristics.
const OsiObject * originalObject_
Pointer back to object which created.
OsiLotsizeBranchingObject & operator=(const OsiLotsizeBranchingObject &rhs)
Assignment operator.
OsiBranchingObject()
Default Constructor.
Lotsize branching object.
void setBranchingIndex(int branchIndex)
Set the state of the branching object.
OsiBranchingObject & operator=(const OsiBranchingObject &rhs)
Assignment operator.
Abstract Base Class for describing an interface to a solver.
void setNumberWays(int numberWays)
Set maximum number of ways branch may have.
double cutoff_
Value of objective cutoff (in minimization sense)
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
const OsiSolverInterface * solver_
Pointer to solver.
void setNumberBranchesLeft(int)
Set the number of branch arms left for this branching object Just for forcing.
virtual void print(const OsiSolverInterface *=NULL) const
Print something about branch - only if log level high.
virtual OsiBranchingObject * clone() const
Clone.
virtual bool boundBranch() const
Return true if branch should only bound variables.
int numberBranches_
Number of branches.
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
int columnNumber_
data
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to contain the current solution.
void setOriginalUpperBound(double value)
void setSosType(int value)
Set SOS type.
virtual ~OsiSimpleInteger()
Destructor.
OsiBranchingInformation()
Default Constructor.
const double * lower_
Pointer to current lower bounds on columns.
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
double infeasibility() const
Return infeasibility.
virtual OsiObject * clone() const =0
Clone.
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
virtual int preferredWay() const
Get preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
OsiObject2()
Default Constructor.
int numberColumns_
The number of columns.
Lotsize class.
virtual ~OsiBranchingObject()
Destructor.
virtual ~OsiLotsize()
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
double otherInfeasibility_
&quot;Infeasibility&quot; on other way
int numberMembers() const
Number of members.
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 void resetBounds(const OsiSolverInterface *)
Reset variable bounds to their original values.
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
const double * solution_
Pointer to current solution.
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
double originalUpperBound() const
short numberWays_
Maximum number of ways on branch.
virtual void updateBefore(const OsiObject *)
Updates stuff like pseudocosts before threads.
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
const double * elementByColumn_
Elements in column copy of matrix.
void setOriginalObject(const OsiObject *object)
Set pointer back to object which created.
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
const int * columnLength_
Column lengths.
virtual OsiObject * clone() const
Clone.
virtual OsiBranchingObject * clone() const
Clone.
virtual ~OsiLotsizeBranchingObject()
Destructor.
OsiTwoWayBranchingObject & operator=(const OsiTwoWayBranchingObject &rhs)
Assignment operator.
int sosType() const
SOS type.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *, const OsiBranchingInformation *, int) const
Create a branching object and indicate which way to branch first.
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
int * members_
data
virtual void resetBounds(const OsiSolverInterface *solver)
Reset variable bounds to their original values.
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
int numberBranchingSolutions_
Number of branching solutions found (i.e. exclude heuristics)
void setOriginalLowerBound(double value)
int numberBranchesLeft() const
The number of branch arms left for this branching object.
Simple branching object for an integer variable.
const double * rowActivity_
Pointer to row activity.
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
int columnNumber() const
For debug.
double * usefulRegion_
Useful region of length CoinMax(numberColumns,2*numberRows) This is allocated and deleted before OsiO...
Define a class to add a bit of complexity to OsiObject This assumes 2 way branching.
const CoinBigIndex * columnStart_
Column starts.
virtual double checkInfeasibility(const OsiBranchingInformation *info) const
double defaultDual_
Dual to use if row bound violated (if negative then pseudoShadowPrices off)
double originalLowerBound() const
Original bounds.
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to fix the variable at the current (integer) value.
int CoinBigIndex
const double * upper_
Pointer to current upper bounds on columns.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
double originalLower_
data Original lower bound
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to fix the variable at the current (integer) value.
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
void setColumnNumber(int value)
Set solver column number.
void setPreferredWay(int value)
Set preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
virtual void floorCeiling(double &floorLotsize, double &ceilingLotsize, double value, double tolerance) const
Returns floor and ceiling.
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
double * mutableWeights() const
Array of weights.
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
double timeRemaining_
Maximum time remaining before stopping on time.
int branchIndex() const
Get the state of the branching object This is just the branch index.
int rangeType() const
Type - 1 points, 2 ranges.
const int * members() const
Members (indices in range 0 ... numberColumns-1)
int numberSolutions_
Number of solutions found.
int * mutableMembers() const
Members (indices in range 0 ... numberColumns-1)
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
virtual OsiObject * clone() const
Clone.
const double * weights() const
Array of weights.
void setPriority(int priority)
Set priority.
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
virtual void checkIsCutoff(double)
Double checks in case node can change its mind! Returns objective value Can change objective etc...
const double * rowUpper_
Pointer to current upper bounds on rows.
const double * hotstartSolution_
Highly optional target (hot start) solution.
virtual void resetSequenceEtc(int, const int *)
Change column numbers after preprocessing.
int numberRanges_
Number of points.
virtual ~OsiIntegerBranchingObject()
Destructor.
virtual ~OsiSOS()
Solver Branch Class.
int rangeType_
Type - 1 points, 2 ranges.
int way() const
Way returns -1 on down +1 on up.
Abstract base class for `objects&#39;.
virtual double branch()
Execute the actions required to branch, as specified by the current state of the branching object...
int numberBranches() const
The number of branch arms created for this branching object.
virtual ~OsiBranchingInformation()
Destructor.
virtual OsiObject * clone() const
Clone.
virtual OsiBranchingObject * clone() const =0
Clone.
bool integerValued_
Whether integer valued.
OsiBranchingInformation & operator=(const OsiBranchingInformation &rhs)
Assignment operator.
void setColumnNumber(int value)
Set solver column number.
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
OsiObject2 & operator=(const OsiObject2 &rhs)
Assignment operator.
virtual int preferredWay() const
Get pre-emptive preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
int numberMembers_
Number of members.
int firstBranch_
Which way was first branch -1 = down, +1 = up.
int setType() const
SOS type.
double value_
Current value - has some meaning about branch.
This just adds two-wayness to a branching object.
void setWhichWay(int way)
Return preferred way to branch.
OsiObject()
Default Constructor.