Cbc  2.10.5
 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:
60  OsiObject();
61 
63  OsiObject(const OsiObject &);
64 
66  OsiObject &operator=(const OsiObject &rhs);
67 
69  virtual OsiObject *clone() const = 0;
70 
72  virtual ~OsiObject();
73 
95  double infeasibility(const OsiSolverInterface *solver, int &whichWay) const;
96  // Faster version when more information available
97  virtual double infeasibility(const OsiBranchingInformation *info, int &whichWay) const = 0;
98  // This does NOT set mutable stuff
99  virtual double checkInfeasibility(const OsiBranchingInformation *info) const;
100 
105  virtual double feasibleRegion(OsiSolverInterface *solver) const;
111  virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const = 0;
112 
119  const OsiBranchingInformation * /*info*/,
120  int /*way*/) const
121  {
122  throw CoinError("Need code", "createBranch", "OsiBranchingObject");
123  return NULL;
124  }
125 
128  virtual bool canDoHeuristics() const
129  {
130  return true;
131  }
134  virtual bool canMoveToNearest() const
135  {
136  return false;
137  }
141  virtual int columnNumber() const;
143  inline int priority() const
144  {
145  return priority_;
146  }
148  inline void setPriority(int priority)
149  {
151  }
154  virtual bool boundBranch() const
155  {
156  return true;
157  }
159  virtual bool canHandleShadowPrices() const
160  {
161  return false;
162  }
164  inline int numberWays() const
165  {
166  return numberWays_;
167  }
169  inline void setNumberWays(int numberWays)
170  {
171  numberWays_ = static_cast< short int >(numberWays);
172  }
177  inline void setWhichWay(int way)
178  {
179  whichWay_ = static_cast< short int >(way);
180  }
185  inline int whichWay() const
186  {
187  return whichWay_;
188  }
190  virtual int preferredWay() const
191  {
192  return -1;
193  }
195  inline double infeasibility() const
196  {
197  return infeasibility_;
198  }
200  virtual double upEstimate() const;
202  virtual double downEstimate() const;
207  virtual void resetBounds(const OsiSolverInterface *) {}
210  virtual void resetSequenceEtc(int, const int *) {}
212  virtual void updateBefore(const OsiObject *) {}
214  virtual void updateAfter(const OsiObject *, const OsiObject *) {}
215 
216 protected:
218 
220  mutable double infeasibility_;
222  mutable short whichWay_;
224  short numberWays_;
227 };
230 
231 class OsiObject2 : public OsiObject {
232 
233 public:
235  OsiObject2();
236 
238  OsiObject2(const OsiObject2 &);
239 
241  OsiObject2 &operator=(const OsiObject2 &rhs);
242 
244  virtual ~OsiObject2();
245 
247  inline void setPreferredWay(int value)
248  {
249  preferredWay_ = value;
250  }
251 
253  virtual int preferredWay() const
254  {
255  return preferredWay_;
256  }
257 
258 protected:
262  mutable double otherInfeasibility_;
263 };
264 
283 
284 public:
287 
290 
293 
296 
298  virtual OsiBranchingObject *clone() const = 0;
299 
301  virtual ~OsiBranchingObject();
302 
304  inline int numberBranches() const
305  {
306  return numberBranches_;
307  }
308 
310  inline int numberBranchesLeft() const
311  {
312  return numberBranches_ - branchIndex_;
313  }
314 
317  {
318  numberBranches_++;
319  }
320 
324  inline void setNumberBranchesLeft(int /*value*/)
325  { /*assert (value==1&&!branchIndex_);*/
326  numberBranches_ = 1;
327  }
328 
331  {
332  branchIndex_++;
333  }
334 
340  virtual double branch(OsiSolverInterface *solver) = 0;
346  virtual double branch() { return branch(NULL); }
349  virtual bool boundBranch() const
350  {
351  return true;
352  }
356  inline int branchIndex() const
357  {
358  return branchIndex_;
359  }
360 
364  {
365  branchIndex_ = static_cast< short int >(branchIndex);
366  }
367 
369  inline double value() const
370  {
371  return value_;
372  }
373 
375  inline const OsiObject *originalObject() const
376  {
377  return originalObject_;
378  }
380  inline void setOriginalObject(const OsiObject *object)
381  {
382  originalObject_ = object;
383  }
387  virtual void checkIsCutoff(double) {}
389  int columnNumber() const;
392  virtual void print(const OsiSolverInterface * = NULL) const {}
393 
394 protected:
396  double value_;
397 
400 
404 
409 };
410 /* This contains information
411  This could also contain pseudo shadow prices
412  or information for dealing with computing and trusting pseudo-costs
413 */
415 
416 public:
419 
424  OsiBranchingInformation(const OsiSolverInterface *solver, bool normalSolver, bool copySolution = false);
425 
428 
431 
433  virtual OsiBranchingInformation *clone() const;
434 
436  virtual ~OsiBranchingInformation();
437 
438  // Note public
439 public:
441 
452  double cutoff_;
454  double direction_;
462  double defaultDual_;
464  mutable const OsiSolverInterface *solver_;
468  mutable const double *lower_;
470  mutable const double *solution_;
472  mutable const double *upper_;
474  const double *hotstartSolution_;
476  const double *pi_;
478  const double *rowActivity_;
480  const double *objective_;
482  const double *rowLower_;
484  const double *rowUpper_;
486  const double *elementByColumn_;
490  const int *columnLength_;
492  const int *row_;
498  double *usefulRegion_;
506  int depth_;
509 };
510 
512 
514 
515 public:
518 
526  int way, double value);
527 
530 
533 
535  virtual ~OsiTwoWayBranchingObject();
536 
543  virtual double branch(OsiSolverInterface *solver) = 0;
544 
545  inline int firstBranch() const { return firstBranch_; }
547  inline int way() const
548  {
550  }
551 
552 protected:
555 };
557 
558 class OsiSimpleInteger : public OsiObject2 {
559 
560 public:
563 
565  OsiSimpleInteger(const OsiSolverInterface *solver, int iColumn);
566 
568  OsiSimpleInteger(int iColumn, double lower, double upper);
569 
572 
574  virtual OsiObject *clone() const;
575 
578 
580  virtual ~OsiSimpleInteger();
581 
584  virtual double infeasibility(const OsiBranchingInformation *info, int &whichWay) const;
585 
592  virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const;
593 
598  virtual OsiBranchingObject *createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const;
599 
601  inline void setColumnNumber(int value)
602  {
603  columnNumber_ = value;
604  }
605 
610  virtual int columnNumber() const;
611 
613  inline double originalLowerBound() const
614  {
615  return originalLower_;
616  }
617  inline void setOriginalLowerBound(double value)
618  {
619  originalLower_ = value;
620  }
621  inline double originalUpperBound() const
622  {
623  return originalUpper_;
624  }
625  inline void setOriginalUpperBound(double value)
626  {
627  originalUpper_ = value;
628  }
633  virtual void resetBounds(const OsiSolverInterface *solver);
636  virtual void resetSequenceEtc(int numberColumns, const int *originalColumns);
637 
639  virtual double upEstimate() const;
641  virtual double downEstimate() const;
643  virtual bool canHandleShadowPrices() const
644  {
645  return false;
646  }
647 
648 protected:
656 };
665 
666 public:
669 
678  int way, double value);
686  OsiIntegerBranchingObject(OsiSolverInterface *solver, const OsiSimpleInteger *originalObject,
687  int way, double value, double downUpperBound, double upLowerBound);
688 
691 
694 
696  virtual OsiBranchingObject *clone() const;
697 
699  virtual ~OsiIntegerBranchingObject();
700 
707  virtual double branch(OsiSolverInterface *solver);
708 
712  virtual void print(const OsiSolverInterface *solver = NULL);
713 
714 protected:
715  // Probably could get away with just value which is already stored
717  double down_[2];
719  double up_[2];
720 };
721 
728 class OsiSOS : public OsiObject2 {
729 
730 public:
731  // Default Constructor
732  OsiSOS();
733 
738  OsiSOS(const OsiSolverInterface *solver, int numberMembers,
739  const int *which, const double *weights, int type = 1);
740 
741  // Copy constructor
742  OsiSOS(const OsiSOS &);
743 
745  virtual OsiObject *clone() const;
746 
747  // Assignment operator
748  OsiSOS &operator=(const OsiSOS &rhs);
749 
750  // Destructor
751  virtual ~OsiSOS();
752 
755  virtual double infeasibility(const OsiBranchingInformation *info, int &whichWay) const;
756 
763  virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const;
764 
769  virtual OsiBranchingObject *createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const;
771  virtual double upEstimate() const;
773  virtual double downEstimate() const;
774 
776  virtual void resetSequenceEtc(int numberColumns, const int *originalColumns);
777 
779  inline int numberMembers() const
780  {
781  return numberMembers_;
782  }
783 
785  inline const int *members() const
786  {
787  return members_;
788  }
789 
791  inline int sosType() const
792  {
793  return sosType_;
794  }
795 
797  inline int setType() const
798  {
799  return sosType_;
800  }
801 
803  inline const double *weights() const
804  {
805  return weights_;
806  }
807 
810  virtual bool canDoHeuristics() const
811  {
812  return (sosType_ == 1 && integerValued_);
813  }
815  inline void setIntegerValued(bool yesNo)
816  {
817  integerValued_ = yesNo;
818  }
820  virtual bool canHandleShadowPrices() const
821  {
822  return true;
823  }
825  inline void setNumberMembers(int value)
826  {
827  numberMembers_ = value;
828  }
829 
831  inline int *mutableMembers() const
832  {
833  return members_;
834  }
835 
837  inline void setSosType(int value)
838  {
839  sosType_ = value;
840  }
841 
843  inline double *mutableWeights() const
844  {
845  return weights_;
846  }
847 
848 protected:
850 
852  int *members_;
854  double *weights_;
855 
859  int sosType_;
862 };
863 
868 
869 public:
870  // Default Constructor
872 
873  // Useful constructor
875  int way,
876  double separator);
877 
878  // Copy constructor
880 
881  // Assignment operator
883 
885  virtual OsiBranchingObject *clone() const;
886 
887  // Destructor
888  virtual ~OsiSOSBranchingObject();
889 
892  virtual double branch(OsiSolverInterface *solver);
893 
897  virtual void print(const OsiSolverInterface *solver = NULL);
898 
899 private:
901 };
904 class OsiLotsize : public OsiObject2 {
905 
906 public:
907  // Default Constructor
908  OsiLotsize();
909 
910  /* Useful constructor - passed model index.
911  Also passed valid values - if range then pairs
912  */
913  OsiLotsize(const OsiSolverInterface *solver, int iColumn,
914  int numberPoints, const double *points, bool range = false);
915 
916  // Copy constructor
917  OsiLotsize(const OsiLotsize &);
918 
920  virtual OsiObject *clone() const;
921 
922  // Assignment operator
923  OsiLotsize &operator=(const OsiLotsize &rhs);
924 
925  // Destructor
926  virtual ~OsiLotsize();
927 
930  virtual double infeasibility(const OsiBranchingInformation *info, int &whichWay) const;
931 
940  virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const;
941 
946  virtual OsiBranchingObject *createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const;
947 
949  inline void setColumnNumber(int value)
950  {
951  columnNumber_ = value;
952  }
953 
958  virtual int columnNumber() const;
964  virtual void resetBounds(const OsiSolverInterface *solver);
965 
969  bool findRange(double value, double integerTolerance) const;
970 
973  virtual void floorCeiling(double &floorLotsize, double &ceilingLotsize, double value,
974  double tolerance) const;
975 
977  inline double originalLowerBound() const
978  {
979  return bound_[0];
980  }
981  inline double originalUpperBound() const
982  {
983  return bound_[rangeType_ * numberRanges_ - 1];
984  }
986  inline int rangeType() const
987  {
988  return rangeType_;
989  }
991  inline int numberRanges() const
992  {
993  return numberRanges_;
994  }
996  inline double *bound() const
997  {
998  return bound_;
999  }
1002  virtual void resetSequenceEtc(int numberColumns, const int *originalColumns);
1003 
1005  virtual double upEstimate() const;
1007  virtual double downEstimate() const;
1009  virtual bool canHandleShadowPrices() const
1010  {
1011  return true;
1012  }
1015  virtual bool canDoHeuristics() const
1016  {
1017  return false;
1018  }
1019 
1020 private:
1022 
1029  // largest gap
1030  double largestGap_;
1032  double *bound_;
1034  mutable int range_;
1035 };
1036 
1048 
1049 public:
1052 
1061  int way, double value);
1062 
1065 
1068 
1070  virtual OsiBranchingObject *clone() const;
1071 
1073  virtual ~OsiLotsizeBranchingObject();
1074 
1081  virtual double branch(OsiSolverInterface *solver);
1082 
1086  virtual void print(const OsiSolverInterface *solver = NULL);
1087 
1088 protected:
1090  double down_[2];
1092  double up_[2];
1093 };
1094 #endif
1095 
1096 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
1097 */
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)
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.