Cgl 0.59.7

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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;
19 class OsiBranchingInformation;
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
119 virtual OsiBranchingObject * createBranch(OsiSolverInterface * /*solver*/,
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_;
199 int priority_;
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:
231 int preferredWay_;
233 mutable double otherInfeasibility_;
234
235 };
236
254 class OsiBranchingObject {
255
256 public:
257
259 OsiBranchingObject ();
260
262 OsiBranchingObject (OsiSolverInterface * solver, double value);
263
265 OsiBranchingObject ( const OsiBranchingObject &);
266
268 OsiBranchingObject & operator=( const OsiBranchingObject& rhs);
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
285 inline void incrementNumberBranchesLeft()
286 { numberBranches_ ++;}
287
291 inline void setNumberBranchesLeft(int /*value*/)
292 {/*assert (value==1&&!branchIndex_);*/ numberBranches_=1;}
293
295 inline void decrementNumberBranchesLeft()
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
322 inline void setBranchingIndex(int branchIndex)
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
351 const OsiObject * originalObject_;
352
355 int numberBranches_;
356
360 short branchIndex_;
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 */
367 class OsiBranchingInformation {
368
369 public:
370
372 OsiBranchingInformation ();
373
378 OsiBranchingInformation (const OsiSolverInterface * solver, bool normalSolver,bool copySolution=false);
379
381 OsiBranchingInformation ( const OsiBranchingInformation &);
382
384 OsiBranchingInformation & operator=( const OsiBranchingInformation& rhs);
385
387 virtual OsiBranchingInformation * clone() const;
388
390 virtual ~OsiBranchingInformation ();
391
392 // Note public
393 public:
395
402 int stateOfSearch_;
404 double objectiveValue_;
406 double cutoff_;
408 double direction_;
410 double integerTolerance_;
412 double primalTolerance_;
414 double timeRemaining_;
416 double defaultDual_;
418 mutable const OsiSolverInterface * solver_;
420 int numberColumns_;
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_;
442 const CoinBigIndex * columnStart_;
444 const int * columnLength_;
446 const int * row_;
452 double * usefulRegion_;
454 int * indexRegion_;
456 int numberSolutions_;
458 int numberBranchingSolutions_;
460 int depth_;
462 bool owningSolution_;
463 };
464
466
467 class OsiTwoWayBranchingObject : public OsiBranchingObject {
468
469 public:
470
472 OsiTwoWayBranchingObject ();
473
480 OsiTwoWayBranchingObject (OsiSolverInterface *solver,const OsiObject * originalObject,
481 int way , double value) ;
482
484 OsiTwoWayBranchingObject ( const OsiTwoWayBranchingObject &);
485
487 OsiTwoWayBranchingObject & operator= (const OsiTwoWayBranchingObject& rhs);
488
490 virtual ~OsiTwoWayBranchingObject ();
491
492 using OsiBranchingObject::branch ;
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:
506 int firstBranch_;
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
525 OsiSimpleInteger ( const OsiSimpleInteger &);
526
528 virtual OsiObject * clone() const;
529
531 OsiSimpleInteger & operator=( const OsiSimpleInteger& rhs);
532
534 virtual ~OsiSimpleInteger ();
535
536 using OsiObject::infeasibility ;
538 virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
539
540 using OsiObject::feasibleRegion ;
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:
593 double originalLower_;
595 double originalUpper_;
597 int columnNumber_;
598
599 };
607 class OsiIntegerBranchingObject : public OsiTwoWayBranchingObject {
608
609 public:
610
612 OsiIntegerBranchingObject ();
613
621 OsiIntegerBranchingObject (OsiSolverInterface *solver,const OsiSimpleInteger * originalObject,
622 int way , double value) ;
630 OsiIntegerBranchingObject (OsiSolverInterface *solver,const OsiSimpleInteger * originalObject,
631 int way , double value, double downUpperBound, double upLowerBound) ;
632
634 OsiIntegerBranchingObject ( const OsiIntegerBranchingObject &);
635
637 OsiIntegerBranchingObject & operator= (const OsiIntegerBranchingObject& rhs);
638
640 virtual OsiBranchingObject * clone() const;
641
643 virtual ~OsiIntegerBranchingObject ();
644
645 using OsiBranchingObject::branch ;
651 virtual double branch(OsiSolverInterface * solver);
652
653 using OsiBranchingObject::print ;
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
700 using OsiObject::infeasibility ;
702 virtual double infeasibility(const OsiBranchingInformation * info,int & whichWay) const;
703
704 using OsiObject::feasibleRegion ;
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
779 int numberMembers_;
781 int sosType_;
783 bool integerValued_;
784 };
785
789 class OsiSOSBranchingObject : public OsiTwoWayBranchingObject {
790
791 public:
792
793 // Default Constructor
794 OsiSOSBranchingObject ();
795
796 // Useful constructor
797 OsiSOSBranchingObject (OsiSolverInterface * solver, const OsiSOS * originalObject,
798 int way,
799 double separator);
800
801 // Copy constructor
802 OsiSOSBranchingObject ( const OsiSOSBranchingObject &);
803
804 // Assignment operator
805 OsiSOSBranchingObject & operator=( const OsiSOSBranchingObject& rhs);
806
808 virtual OsiBranchingObject * clone() const;
809
810 // Destructor
811 virtual ~OsiSOSBranchingObject ();
812
813 using OsiBranchingObject::branch ;
815 virtual double branch(OsiSolverInterface * solver);
816
817 using OsiBranchingObject::print ;
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
852 using OsiObject::infeasibility ;
854 virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
855
856 using OsiObject::feasibleRegion ;
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
933 int columnNumber_;
935 int rangeType_;
937 int numberRanges_;
938 // largest gap
939 double largestGap_;
941 double * bound_;
943 mutable int range_;
944 };
945
946
957 class OsiLotsizeBranchingObject : public OsiTwoWayBranchingObject {
958
959 public:
960
962 OsiLotsizeBranchingObject ();
963
971 OsiLotsizeBranchingObject (OsiSolverInterface *solver,const OsiLotsize * originalObject,
972 int way , double value) ;
973
975 OsiLotsizeBranchingObject ( const OsiLotsizeBranchingObject &);
976
978 OsiLotsizeBranchingObject & operator= (const OsiLotsizeBranchingObject& rhs);
979
981 virtual OsiBranchingObject * clone() const;
982
984 virtual ~OsiLotsizeBranchingObject ();
985
986 using OsiBranchingObject::branch ;
992 virtual double branch(OsiSolverInterface * solver);
993
994 using OsiBranchingObject::print ;
997 virtual void print(const OsiSolverInterface * solver=NULL);
998
999 protected:
1001 double down_[2];
1003 double up_[2];
1004 };
1005 #endif
OsiBranchingInformation::objective_
const double * objective_
Objective.
Definition: OsiBranchingObject.hpp:434
OsiSOS::resetSequenceEtc
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Redoes data when sequence numbers change.
CoinError
Error Class thrown by an exception.
Definition: CoinError.hpp:42
OsiObject2::preferredWay_
int preferredWay_
Preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
Definition: OsiBranchingObject.hpp:231
OsiBranchingObject::boundBranch
virtual bool boundBranch() const
Return true if branch should fix variables.
Definition: OsiBranchingObject.hpp:312
OsiSimpleInteger::operator=
OsiSimpleInteger & operator=(const OsiSimpleInteger &rhs)
Assignment operator.
OsiSOS::operator=
OsiSOS & operator=(const OsiSOS &rhs)
OsiSOS::setNumberMembers
void setNumberMembers(int value)
Set number of members.
Definition: OsiBranchingObject.hpp:756
OsiBranchingInformation::primalTolerance_
double primalTolerance_
Primal tolerance.
Definition: OsiBranchingObject.hpp:412
OsiSimpleInteger::originalUpperBound
double originalUpperBound() const
Definition: OsiBranchingObject.hpp:570
OsiBranchingInformation::stateOfSearch_
int stateOfSearch_
data
Definition: OsiBranchingObject.hpp:402
OsiBranchingObject::originalObject
const OsiObject * originalObject() const
Return pointer back to object which created.
Definition: OsiBranchingObject.hpp:330
OsiLotsizeBranchingObject::OsiLotsizeBranchingObject
OsiLotsizeBranchingObject()
Default constructor.
OsiSimpleInteger::originalLowerBound
double originalLowerBound() const
Original bounds.
Definition: OsiBranchingObject.hpp:566
OsiBranchingInformation::indexRegion_
int * indexRegion_
Useful index region to go with usefulRegion_.
Definition: OsiBranchingObject.hpp:454
OsiSOS::sosType_
int sosType_
SOS type.
Definition: OsiBranchingObject.hpp:781
OsiBranchingObject::incrementNumberBranchesLeft
void incrementNumberBranchesLeft()
Increment the number of branch arms left for this branching object.
Definition: OsiBranchingObject.hpp:285
OsiLotsize::numberRanges
int numberRanges() const
Number of points.
Definition: OsiBranchingObject.hpp:908
OsiTwoWayBranchingObject::firstBranch
int firstBranch() const
Definition: OsiBranchingObject.hpp:500
OsiObject::priority
int priority() const
Return Priority - note 1 is highest priority.
Definition: OsiBranchingObject.hpp:136
OsiLotsize::operator=
OsiLotsize & operator=(const OsiLotsize &rhs)
OsiBranchingInformation::row_
const int * row_
Row indices.
Definition: OsiBranchingObject.hpp:446
OsiSOSBranchingObject
Branching object for Special ordered sets.
Definition: OsiBranchingObject.hpp:789
OsiObject::whichWay_
short whichWay_
Computed preferred way to branch.
Definition: OsiBranchingObject.hpp:195
OsiSOS::setIntegerValued
void setIntegerValued(bool yesNo)
Set whether set is integer valued or not.
Definition: OsiBranchingObject.hpp:750
OsiIntegerBranchingObject::operator=
OsiIntegerBranchingObject & operator=(const OsiIntegerBranchingObject &rhs)
Assignment operator.
CoinTypes.hpp
OsiLotsize::findRange
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[...
OsiObject::priority_
int priority_
Priority.
Definition: OsiBranchingObject.hpp:199
OsiBranchingInformation::direction_
double direction_
Direction 1.0 for minimization, -1.0 for maximization.
Definition: OsiBranchingObject.hpp:408
OsiSOSBranchingObject::OsiSOSBranchingObject
OsiSOSBranchingObject()
OsiIntegerBranchingObject::OsiIntegerBranchingObject
OsiIntegerBranchingObject()
Default constructor.
OsiBranchingInformation
Definition: OsiBranchingObject.hpp:367
OsiBranchingObject::branchIndex_
short branchIndex_
The state of the branching object.
Definition: OsiBranchingObject.hpp:360
OsiObject::updateAfter
virtual void updateAfter(const OsiObject *, const OsiObject *)
Updates stuff like pseudocosts after threads finished.
Definition: OsiBranchingObject.hpp:187
OsiSimpleInteger
Define a single integer class.
Definition: OsiBranchingObject.hpp:511
OsiTwoWayBranchingObject::~OsiTwoWayBranchingObject
virtual ~OsiTwoWayBranchingObject()
Destructor.
OsiSOS::canDoHeuristics
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
Definition: OsiBranchingObject.hpp:747
OsiSOS::canHandleShadowPrices
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
Definition: OsiBranchingObject.hpp:753
OsiObject::infeasibility_
double infeasibility_
data
Definition: OsiBranchingObject.hpp:193
OsiSOSBranchingObject::~OsiSOSBranchingObject
virtual ~OsiSOSBranchingObject()
OsiSimpleInteger::columnNumber
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns &gt;= 0 Used by heuristics.
OsiObject::canDoHeuristics
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
Definition: OsiBranchingObject.hpp:125
OsiBranchingInformation::clone
virtual OsiBranchingInformation * clone() const
Clone.
OsiSOS::weights_
double * weights_
Weights.
Definition: OsiBranchingObject.hpp:776
OsiBranchingInformation::objectiveValue_
double objectiveValue_
Value of objective function (in minimization sense)
Definition: OsiBranchingObject.hpp:404
OsiLotsizeBranchingObject::up_
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
Definition: OsiBranchingObject.hpp:1003
OsiObject2::~OsiObject2
virtual ~OsiObject2()
Destructor.
OsiLotsizeBranchingObject::down_
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
Definition: OsiBranchingObject.hpp:1001
OsiLotsize::bound_
double * bound_
Ranges.
Definition: OsiBranchingObject.hpp:941
OsiObject::~OsiObject
virtual ~OsiObject()
Destructor.
OsiObject::canMoveToNearest
virtual bool canMoveToNearest() const
Return true if object can take part in move to nearest heuristic.
Definition: OsiBranchingObject.hpp:129
OsiBranchingObject
Abstract branching object base class.
Definition: OsiBranchingObject.hpp:254
OsiObject::columnNumber
virtual int columnNumber() const
Column number if single column object -1 otherwise, Used by heuristics.
OsiTwoWayBranchingObject::OsiTwoWayBranchingObject
OsiTwoWayBranchingObject()
Default constructor.
OsiLotsize::resetBounds
virtual void resetBounds(const OsiSolverInterface *solver)
Reset original upper and lower bound values from the solver.
OsiSimpleInteger::columnNumber_
int columnNumber_
Column number in solver.
Definition: OsiBranchingObject.hpp:597
OsiSimpleInteger::OsiSimpleInteger
OsiSimpleInteger()
Default Constructor.
OsiBranchingInformation::rowLower_
const double * rowLower_
Pointer to current lower bounds on rows.
Definition: OsiBranchingObject.hpp:436
OsiBranchingObject::decrementNumberBranchesLeft
void decrementNumberBranchesLeft()
Decrement the number of branch arms left for this branching object.
Definition: OsiBranchingObject.hpp:295
OsiBranchingInformation::pi_
const double * pi_
Pointer to duals.
Definition: OsiBranchingObject.hpp:430
OsiLotsize::bound
double * bound() const
Ranges.
Definition: OsiBranchingObject.hpp:911
OsiObject::numberWays
int numberWays() const
Return maximum number of ways branch may have.
Definition: OsiBranchingObject.hpp:149
OsiObject::operator=
OsiObject & operator=(const OsiObject &rhs)
Assignment operator.
OsiLotsize::range_
int range_
Current range.
Definition: OsiBranchingObject.hpp:943
OsiBranchingInformation::integerTolerance_
double integerTolerance_
Integer tolerance.
Definition: OsiBranchingObject.hpp:410
OsiBranchingObject::value
double value() const
Current value.
Definition: OsiBranchingObject.hpp:326
OsiLotsize::createBranch
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
OsiSimpleInteger::originalUpper_
double originalUpper_
Original upper bound.
Definition: OsiBranchingObject.hpp:595
OsiObject::whichWay
int whichWay() const
Return current preferred way to branch.
Definition: OsiBranchingObject.hpp:164
OsiSOSBranchingObject::operator=
OsiSOSBranchingObject & operator=(const OsiSOSBranchingObject &rhs)
OsiSOS
Define Special Ordered Sets of type 1 and 2.
Definition: OsiBranchingObject.hpp:674
OsiIntegerBranchingObject::clone
virtual OsiBranchingObject * clone() const
Clone.
OsiLotsize::columnNumber
virtual int columnNumber() const
Column number if single column object -1 otherwise, so returns &gt;= 0 Used by heuristics.
OsiBranchingObject::originalObject_
const OsiObject * originalObject_
Pointer back to object which created.
Definition: OsiBranchingObject.hpp:351
OsiLotsizeBranchingObject::operator=
OsiLotsizeBranchingObject & operator=(const OsiLotsizeBranchingObject &rhs)
Assignment operator.
OsiBranchingObject::OsiBranchingObject
OsiBranchingObject()
Default Constructor.
OsiLotsizeBranchingObject
Lotsize branching object.
Definition: OsiBranchingObject.hpp:957
OsiBranchingObject::setBranchingIndex
void setBranchingIndex(int branchIndex)
Set the state of the branching object.
Definition: OsiBranchingObject.hpp:322
OsiBranchingObject::operator=
OsiBranchingObject & operator=(const OsiBranchingObject &rhs)
Assignment operator.
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
OsiObject::setNumberWays
void setNumberWays(int numberWays)
Set maximum number of ways branch may have.
Definition: OsiBranchingObject.hpp:152
OsiBranchingInformation::cutoff_
double cutoff_
Value of objective cutoff (in minimization sense)
Definition: OsiBranchingObject.hpp:406
OsiIntegerBranchingObject::down_
double down_[2]
Lower [0] and upper [1] bounds for the down arm (way_ = -1)
Definition: OsiBranchingObject.hpp:661
OsiBranchingInformation::solver_
const OsiSolverInterface * solver_
Pointer to solver.
Definition: OsiBranchingObject.hpp:418
OsiBranchingObject::setNumberBranchesLeft
void setNumberBranchesLeft(int)
Set the number of branch arms left for this branching object Just for forcing.
Definition: OsiBranchingObject.hpp:291
OsiBranchingObject::print
virtual void print(const OsiSolverInterface *=NULL) const
Print something about branch - only if log level high.
Definition: OsiBranchingObject.hpp:343
OsiLotsizeBranchingObject::clone
virtual OsiBranchingObject * clone() const
Clone.
OsiObject::boundBranch
virtual bool boundBranch() const
Return true if branch should only bound variables.
Definition: OsiBranchingObject.hpp:143
CoinError.hpp
OsiBranchingObject::numberBranches_
int numberBranches_
Number of branches.
Definition: OsiBranchingObject.hpp:355
OsiIntegerBranchingObject::up_
double up_[2]
Lower [0] and upper [1] bounds for the up arm (way_ = 1)
Definition: OsiBranchingObject.hpp:663
OsiLotsize::columnNumber_
int columnNumber_
data
Definition: OsiBranchingObject.hpp:933
OsiLotsize::feasibleRegion
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to contain the current solution.
OsiSimpleInteger::setOriginalUpperBound
void setOriginalUpperBound(double value)
Definition: OsiBranchingObject.hpp:572
OsiSOS::setSosType
void setSosType(int value)
Set SOS type.
Definition: OsiBranchingObject.hpp:764
OsiSimpleInteger::~OsiSimpleInteger
virtual ~OsiSimpleInteger()
Destructor.
OsiBranchingInformation::OsiBranchingInformation
OsiBranchingInformation()
Default Constructor.
OsiBranchingInformation::lower_
const double * lower_
Pointer to current lower bounds on columns.
Definition: OsiBranchingObject.hpp:422
OsiSOSBranchingObject::print
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
OsiObject::infeasibility
double infeasibility() const
Return infeasibility.
Definition: OsiBranchingObject.hpp:170
OsiObject::clone
virtual OsiObject * clone() const =0
Clone.
OsiObject::canHandleShadowPrices
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
Definition: OsiBranchingObject.hpp:146
OsiObject2::preferredWay
virtual int preferredWay() const
Get preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
Definition: OsiBranchingObject.hpp:227
OsiObject2::OsiObject2
OsiObject2()
Default Constructor.
OsiBranchingInformation::numberColumns_
int numberColumns_
The number of columns.
Definition: OsiBranchingObject.hpp:420
OsiLotsize
Lotsize class.
Definition: OsiBranchingObject.hpp:827
OsiBranchingObject::~OsiBranchingObject
virtual ~OsiBranchingObject()
Destructor.
OsiLotsize::~OsiLotsize
virtual ~OsiLotsize()
OsiSimpleInteger::downEstimate
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
OsiObject2::otherInfeasibility_
double otherInfeasibility_
&quot;Infeasibility&quot; on other way
Definition: OsiBranchingObject.hpp:233
OsiSOS::numberMembers
int numberMembers() const
Number of members.
Definition: OsiBranchingObject.hpp:726
OsiObject::feasibleRegion
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...
OsiObject::resetBounds
virtual void resetBounds(const OsiSolverInterface *)
Reset variable bounds to their original values.
Definition: OsiBranchingObject.hpp:180
OsiSimpleInteger::canHandleShadowPrices
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
Definition: OsiBranchingObject.hpp:588
OsiBranchingInformation::solution_
const double * solution_
Pointer to current solution.
Definition: OsiBranchingObject.hpp:424
OsiLotsize::downEstimate
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
OsiLotsize::originalUpperBound
double originalUpperBound() const
Definition: OsiBranchingObject.hpp:902
OsiObject::numberWays_
short numberWays_
Maximum number of ways on branch.
Definition: OsiBranchingObject.hpp:197
OsiObject::updateBefore
virtual void updateBefore(const OsiObject *)
Updates stuff like pseudocosts before threads.
Definition: OsiBranchingObject.hpp:185
OsiSOS::downEstimate
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
OsiBranchingInformation::elementByColumn_
const double * elementByColumn_
Elements in column copy of matrix.
Definition: OsiBranchingObject.hpp:440
OsiBranchingObject::setOriginalObject
void setOriginalObject(const OsiObject *object)
Set pointer back to object which created.
Definition: OsiBranchingObject.hpp:333
OsiObject::downEstimate
virtual double downEstimate() const
Return &quot;down&quot; estimate (default 1.0e-5)
OsiBranchingInformation::columnLength_
const int * columnLength_
Column lengths.
Definition: OsiBranchingObject.hpp:444
OsiLotsize::clone
virtual OsiObject * clone() const
Clone.
OsiSOSBranchingObject::clone
virtual OsiBranchingObject * clone() const
Clone.
OsiLotsizeBranchingObject::~OsiLotsizeBranchingObject
virtual ~OsiLotsizeBranchingObject()
Destructor.
OsiTwoWayBranchingObject::operator=
OsiTwoWayBranchingObject & operator=(const OsiTwoWayBranchingObject &rhs)
Assignment operator.
OsiSOS::sosType
int sosType() const
SOS type.
Definition: OsiBranchingObject.hpp:734
OsiObject::createBranch
virtual OsiBranchingObject * createBranch(OsiSolverInterface *, const OsiBranchingInformation *, int) const
Create a branching object and indicate which way to branch first.
Definition: OsiBranchingObject.hpp:119
OsiLotsize::canHandleShadowPrices
virtual bool canHandleShadowPrices() const
Return true if knows how to deal with Pseudo Shadow Prices.
Definition: OsiBranchingObject.hpp:922
OsiSOS::members_
int * members_
data
Definition: OsiBranchingObject.hpp:774
OsiSimpleInteger::resetBounds
virtual void resetBounds(const OsiSolverInterface *solver)
Reset variable bounds to their original values.
OsiLotsize::upEstimate
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
OsiBranchingInformation::numberBranchingSolutions_
int numberBranchingSolutions_
Number of branching solutions found (i.e. exclude heuristics)
Definition: OsiBranchingObject.hpp:458
OsiSimpleInteger::setOriginalLowerBound
void setOriginalLowerBound(double value)
Definition: OsiBranchingObject.hpp:568
OsiBranchingObject::numberBranchesLeft
int numberBranchesLeft() const
The number of branch arms left for this branching object.
Definition: OsiBranchingObject.hpp:281
OsiIntegerBranchingObject
Simple branching object for an integer variable.
Definition: OsiBranchingObject.hpp:607
OsiBranchingInformation::rowActivity_
const double * rowActivity_
Pointer to row activity.
Definition: OsiBranchingObject.hpp:432
OsiIntegerBranchingObject::print
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
OsiBranchingObject::columnNumber
int columnNumber() const
For debug.
OsiBranchingInformation::usefulRegion_
double * usefulRegion_
Useful region of length CoinMax(numberColumns,2*numberRows) This is allocated and deleted before OsiO...
Definition: OsiBranchingObject.hpp:452
OsiObject2
Define a class to add a bit of complexity to OsiObject This assumes 2 way branching.
Definition: OsiBranchingObject.hpp:206
OsiBranchingInformation::columnStart_
const CoinBigIndex * columnStart_
Column starts.
Definition: OsiBranchingObject.hpp:442
OsiObject::checkInfeasibility
virtual double checkInfeasibility(const OsiBranchingInformation *info) const
OsiLotsize::largestGap_
double largestGap_
Definition: OsiBranchingObject.hpp:939
OsiBranchingInformation::defaultDual_
double defaultDual_
Dual to use if row bound violated (if negative then pseudoShadowPrices off)
Definition: OsiBranchingObject.hpp:416
OsiLotsize::originalLowerBound
double originalLowerBound() const
Original bounds.
Definition: OsiBranchingObject.hpp:900
OsiSimpleInteger::feasibleRegion
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to fix the variable at the current (integer) value.
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:105
OsiBranchingInformation::upper_
const double * upper_
Pointer to current upper bounds on columns.
Definition: OsiBranchingObject.hpp:426
OsiSOS::createBranch
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
OsiSimpleInteger::originalLower_
double originalLower_
data Original lower bound
Definition: OsiBranchingObject.hpp:593
OsiBranchingInformation::owningSolution_
bool owningSolution_
TEMP.
Definition: OsiBranchingObject.hpp:462
OsiLotsizeBranchingObject::print
virtual void print(const OsiSolverInterface *solver=NULL)
Print something about branch - only if log level high.
OsiSOS::feasibleRegion
virtual double feasibleRegion(OsiSolverInterface *solver, const OsiBranchingInformation *info) const
Set bounds to fix the variable at the current (integer) value.
OsiSimpleInteger::resetSequenceEtc
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
OsiSimpleInteger::upEstimate
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
OsiSimpleInteger::setColumnNumber
void setColumnNumber(int value)
Set solver column number.
Definition: OsiBranchingObject.hpp:556
OsiObject2::setPreferredWay
void setPreferredWay(int value)
Set preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
Definition: OsiBranchingObject.hpp:223
OsiLotsize::floorCeiling
virtual void floorCeiling(double &floorLotsize, double &ceilingLotsize, double value, double tolerance) const
Returns floor and ceiling.
OsiSimpleInteger::createBranch
virtual OsiBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
Creates a branching object.
OsiSOS::mutableWeights
double * mutableWeights() const
Array of weights.
Definition: OsiBranchingObject.hpp:768
OsiLotsize::resetSequenceEtc
virtual void resetSequenceEtc(int numberColumns, const int *originalColumns)
Change column numbers after preprocessing.
OsiBranchingInformation::timeRemaining_
double timeRemaining_
Maximum time remaining before stopping on time.
Definition: OsiBranchingObject.hpp:414
OsiBranchingObject::branchIndex
int branchIndex() const
Get the state of the branching object This is just the branch index.
Definition: OsiBranchingObject.hpp:317
OsiLotsize::rangeType
int rangeType() const
Type - 1 points, 2 ranges.
Definition: OsiBranchingObject.hpp:905
OsiSOS::members
const int * members() const
Members (indices in range 0 ... numberColumns-1)
Definition: OsiBranchingObject.hpp:730
OsiBranchingInformation::numberSolutions_
int numberSolutions_
Number of solutions found.
Definition: OsiBranchingObject.hpp:456
OsiSOS::mutableMembers
int * mutableMembers() const
Members (indices in range 0 ... numberColumns-1)
Definition: OsiBranchingObject.hpp:760
OsiLotsize::OsiLotsize
OsiLotsize()
OsiLotsize::canDoHeuristics
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
Definition: OsiBranchingObject.hpp:926
OsiSimpleInteger::clone
virtual OsiObject * clone() const
Clone.
OsiSOS::weights
const double * weights() const
Array of weights.
Definition: OsiBranchingObject.hpp:742
OsiObject::setPriority
void setPriority(int priority)
Set priority.
Definition: OsiBranchingObject.hpp:139
OsiSOS::upEstimate
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
OsiBranchingObject::checkIsCutoff
virtual void checkIsCutoff(double)
Double checks in case node can change its mind! Returns objective value Can change objective etc...
Definition: OsiBranchingObject.hpp:338
OsiBranchingInformation::rowUpper_
const double * rowUpper_
Pointer to current upper bounds on rows.
Definition: OsiBranchingObject.hpp:438
OsiBranchingInformation::hotstartSolution_
const double * hotstartSolution_
Highly optional target (hot start) solution.
Definition: OsiBranchingObject.hpp:428
OsiObject::resetSequenceEtc
virtual void resetSequenceEtc(int, const int *)
Change column numbers after preprocessing.
Definition: OsiBranchingObject.hpp:183
OsiLotsize::numberRanges_
int numberRanges_
Number of points.
Definition: OsiBranchingObject.hpp:937
OsiIntegerBranchingObject::~OsiIntegerBranchingObject
virtual ~OsiIntegerBranchingObject()
Destructor.
OsiSOS::~OsiSOS
virtual ~OsiSOS()
OsiSolverBranch
Solver Branch Class.
Definition: OsiSolverBranch.hpp:18
OsiLotsize::rangeType_
int rangeType_
Type - 1 points, 2 ranges.
Definition: OsiBranchingObject.hpp:935
OsiSOS::OsiSOS
OsiSOS()
OsiBranchingInformation::depth_
int depth_
Depth in tree.
Definition: OsiBranchingObject.hpp:460
OsiTwoWayBranchingObject::way
int way() const
Way returns -1 on down +1 on up.
Definition: OsiBranchingObject.hpp:502
OsiObject
Abstract base class for `objects&#39;.
Definition: OsiBranchingObject.hpp:56
OsiBranchingObject::branch
virtual double branch()
Execute the actions required to branch, as specified by the current state of the branching object...
Definition: OsiBranchingObject.hpp:309
OsiBranchingObject::numberBranches
int numberBranches() const
The number of branch arms created for this branching object.
Definition: OsiBranchingObject.hpp:277
OsiBranchingInformation::~OsiBranchingInformation
virtual ~OsiBranchingInformation()
Destructor.
OsiSOS::clone
virtual OsiObject * clone() const
Clone.
OsiBranchingObject::clone
virtual OsiBranchingObject * clone() const =0
Clone.
OsiSOS::integerValued_
bool integerValued_
Whether integer valued.
Definition: OsiBranchingObject.hpp:783
OsiBranchingInformation::operator=
OsiBranchingInformation & operator=(const OsiBranchingInformation &rhs)
Assignment operator.
OsiLotsize::setColumnNumber
void setColumnNumber(int value)
Set solver column number.
Definition: OsiBranchingObject.hpp:874
OsiObject::upEstimate
virtual double upEstimate() const
Return &quot;up&quot; estimate (default 1.0e-5)
OsiObject2::operator=
OsiObject2 & operator=(const OsiObject2 &rhs)
Assignment operator.
OsiObject::preferredWay
virtual int preferredWay() const
Get pre-emptive preferred way of branching - -1 off, 0 down, 1 up (for 2-way)
Definition: OsiBranchingObject.hpp:167
OsiSOS::numberMembers_
int numberMembers_
Number of members.
Definition: OsiBranchingObject.hpp:779
OsiTwoWayBranchingObject::firstBranch_
int firstBranch_
Which way was first branch -1 = down, +1 = up.
Definition: OsiBranchingObject.hpp:506
OsiSOS::setType
int setType() const
SOS type.
Definition: OsiBranchingObject.hpp:738
OsiBranchingObject::value_
double value_
Current value - has some meaning about branch.
Definition: OsiBranchingObject.hpp:348
OsiTwoWayBranchingObject
This just adds two-wayness to a branching object.
Definition: OsiBranchingObject.hpp:467
OsiObject::setWhichWay
void setWhichWay(int way)
Return preferred way to branch.
Definition: OsiBranchingObject.hpp:158
OsiObject::OsiObject
OsiObject()
Default Constructor.