# CbcLinked.hpp

Go to the documentation of this file.

    00001 /* $Id: CbcLinked.hpp 1200 2009-07-25 08:44:13Z forrest $ */
    00002 // Copyright (C) 2006, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00005
    00006 #ifndef CglLinked_H
    00007 #define CglLinked_H
    00008 /* THIS CONTAINS STUFF THAT SHOULD BE IN
    00009    OsiSolverLink
    00010    OsiBranchLink
    00011    CglTemporary
    00012 */
    00013 #include "CoinModel.hpp"
    00014 #include "OsiClpSolverInterface.hpp"
    00015 #include "OsiChooseVariable.hpp"
    00016 #include "CbcFathom.hpp"
    00017 class CbcModel;
    00018 class CoinPackedMatrix;
    00019 class OsiLinkedBound;
    00020 class OsiObject;
    00021 class CglStored;
    00022 class CglTemporary;
    00029 class OsiSolverLink : public CbcOsiSolver {
    00030
    00031 public:
    00032     //---------------------------------------------------------------------------
    00035
    00036     virtual void initialSolve();
    00037
    00039     virtual void resolve();
    00040
    00048     virtual int fathom(bool allFixed) ;
    00055     double * nonlinearSLP(int numberPasses, double deltaTolerance);
    00059     double linearizedBAB(CglStored * cut) ;
    00068     double * heuristicSolution(int numberPasses, double deltaTolerance, int mode);
    00069
    00071     int doAOCuts(CglTemporary * cutGen, const double * solution, const double * solution2);
    00073
    00074
    00077
    00078     OsiSolverLink ();
    00079
    00092     OsiSolverLink(  CoinModel & modelObject);
    00093     // Other way with existing object
    00094     void load(  CoinModel & modelObject, bool tightenBounds = false, int logLevel = 1);
    00096     virtual OsiSolverInterface * clone(bool copyData = true) const;
    00097
    00099     OsiSolverLink (const OsiSolverLink &);
    00100
    00102     OsiSolverLink & operator=(const OsiSolverLink& rhs);
    00103
    00105     virtual ~OsiSolverLink ();
    00106
    00108
    00109
    00112
    00113     void addBoundModifier(bool upperBoundAffected, bool useUpperBound, int whichVariable, int whichVariableAffected,
    00114                           double multiplier = 1.0);
    00116     int updateCoefficients(ClpSimplex * solver, CoinPackedMatrix * matrix);
    00118     void analyzeObjects();
    00120     void addTighterConstraints();
    00122     inline double bestObjectiveValue() const {
    00123         return bestObjectiveValue_;
    00124     }
    00126     inline void setBestObjectiveValue(double value) {
    00127         bestObjectiveValue_ = value;
    00128     }
    00130     inline const double * bestSolution() const {
    00131         return bestSolution_;
    00132     }
    00134     void setBestSolution(const double * solution, int numberColumns);
    00136     inline void setSpecialOptions2(int value) {
    00137         specialOptions2_ = value;
    00138     }
    00140     void sayConvex(bool convex);
    00142     inline int specialOptions2() const {
    00143         return specialOptions2_;
    00144     }
    00148     CoinPackedMatrix * cleanMatrix() const {
    00149         return matrix_;
    00150     }
    00155     CoinPackedMatrix * originalRowCopy() const {
    00156         return originalRowCopy_;
    00157     }
    00159     ClpSimplex * quadraticModel() const {
    00160         return quadraticModel_;
    00161     }
    00163     CoinPackedMatrix * quadraticRow(int rowNumber, double * linear) const;
    00165     inline double defaultMeshSize() const {
    00166         return defaultMeshSize_;
    00167     }
    00168     inline void setDefaultMeshSize(double value) {
    00169         defaultMeshSize_ = value;
    00170     }
    00172     inline double defaultBound() const {
    00173         return defaultBound_;
    00174     }
    00175     inline void setDefaultBound(double value) {
    00176         defaultBound_ = value;
    00177     }
    00179     inline void setIntegerPriority(int value) {
    00180         integerPriority_ = value;
    00181     }
    00183     inline int integerPriority() const {
    00184         return integerPriority_;
    00185     }
    00187     inline int objectiveVariable() const {
    00188         return objectiveVariable_;
    00189     }
    00191     inline void setBiLinearPriority(int value) {
    00192         biLinearPriority_ = value;
    00193     }
    00195     inline int biLinearPriority() const {
    00196         return biLinearPriority_;
    00197     }
    00199     inline const CoinModel * coinModel() const {
    00200         return &coinModel_;
    00201     }
    00203     void setBiLinearPriorities(int value, double meshSize = 1.0);
    00211     void setBranchingStrategyOnVariables(int strategyValue, int priorityValue = -1,
    00212                                          int mode = 7);
    00214     void setMeshSizes(double value);
    00218     void setFixedPriority(int priorityValue);
    00220
    00221     //---------------------------------------------------------------------------
    00222
    00223 protected:
    00224
    00225
    00228
    00229     //void initialize(ClpSimplex * & solver, OsiObject ** & object) const;
    00231     void gutsOfDestructor(bool justNullify = false);
    00233     void gutsOfCopy(const OsiSolverLink & rhs) ;
    00235
    00241     CoinPackedMatrix * matrix_;
    00245     CoinPackedMatrix * originalRowCopy_;
    00247     ClpSimplex * quadraticModel_;
    00249     int numberNonLinearRows_;
    00251     int * startNonLinear_;
    00253     int * rowNonLinear_;
    00257     int * convex_;
    00259     int * whichNonLinear_;
    00261     CoinModel coinModel_;
    00263     int numberVariables_;
    00265     OsiLinkedBound * info_;
    00273     int specialOptions2_;
    00275     int objectiveRow_;
    00277     int objectiveVariable_;
    00279     double bestObjectiveValue_;
    00281     double defaultMeshSize_;
    00283     double defaultBound_;
    00285     double * bestSolution_;
    00287     int integerPriority_;
    00289     int biLinearPriority_;
    00291     int numberFix_;
    00293     int * fixVariables_;
    00295 };
    00300 class OsiLinkedBound {
    00301
    00302 public:
    00303     //---------------------------------------------------------------------------
    00306
    00307     void updateBounds(ClpSimplex * solver);
    00309
    00310
    00313
    00314     OsiLinkedBound ();
    00316     OsiLinkedBound(OsiSolverInterface * model, int variable,
    00317                    int numberAffected, const int * positionL,
    00318                    const int * positionU, const double * multiplier);
    00319
    00321     OsiLinkedBound (const OsiLinkedBound &);
    00322
    00324     OsiLinkedBound & operator=(const OsiLinkedBound& rhs);
    00325
    00327     ~OsiLinkedBound ();
    00328
    00330
    00333
    00334     inline int variable() const {
    00335         return variable_;
    00336     }
    00338     void addBoundModifier(bool upperBoundAffected, bool useUpperBound, int whichVariable,
    00339                           double multiplier = 1.0);
    00341
    00342 private:
    00343     typedef struct {
    00344         double multiplier; // to use in computation
    00345         int affected; // variable or element affected
    00346         /*
    00347           0 - LB of variable affected
    00348           1 - UB of variable affected
    00349           2 - element in position (affected) affected
    00350         */
    00351         unsigned char affect;
    00352         unsigned char ubUsed; // nonzero if UB of this variable is used
    00353         /*
    00354            0 - use x*multiplier
    00355            1 - use multiplier/x
    00356            2 - if UB use min of current upper and x*multiplier, if LB use max of current lower and x*multiplier
    00357         */
    00358         unsigned char type; // type of computation
    00359     } boundElementAction;
    00360
    00363
    00364     OsiSolverInterface * model_;
    00366     int variable_;
    00368     int numberAffected_;
    00370     int maximumAffected_;
    00372     boundElementAction * affected_;
    00374 };
    00375 #include "CbcHeuristic.hpp"
    00379 class CbcHeuristicDynamic3 : public CbcHeuristic {
    00380 public:
    00381
    00382     // Default Constructor
    00383     CbcHeuristicDynamic3 ();
    00384
    00385     /* Constructor with model
    00386      */
    00387     CbcHeuristicDynamic3 (CbcModel & model);
    00388
    00389     // Copy constructor
    00390     CbcHeuristicDynamic3 ( const CbcHeuristicDynamic3 &);
    00391
    00392     // Destructor
    00393     ~CbcHeuristicDynamic3 ();
    00394
    00396     virtual CbcHeuristic * clone() const;
    00397
    00399     virtual void setModel(CbcModel * model);
    00400
    00401     using CbcHeuristic::solution ;
    00412     virtual int solution(double & objectiveValue,
    00413                          double * newSolution);
    00415     virtual void resetModel(CbcModel * model);
    00417     virtual bool canDealWithOdd() const {
    00418         return true;
    00419     }
    00420
    00421 protected:
    00422 private:
    00424     CbcHeuristicDynamic3 & operator=(const CbcHeuristicDynamic3& rhs);
    00425 };
    00426
    00427 #include "OsiBranchingObject.hpp"
    00428
    00432 class CoinWarmStartBasis;
    00433
    00434 class OsiOldLink : public OsiSOS {
    00435
    00436 public:
    00437
    00438     // Default Constructor
    00439     OsiOldLink ();
    00440
    00447     OsiOldLink (const OsiSolverInterface * solver, int numberMembers,
    00448                 int numberLinks, int first,
    00449                 const double * weights, int setNumber);
    00456     OsiOldLink (const OsiSolverInterface * solver, int numberMembers,
    00457                 int numberLinks, int typeSOS, const int * which,
    00458                 const double * weights, int setNumber);
    00459
    00460     // Copy constructor
    00461     OsiOldLink ( const OsiOldLink &);
    00462
    00464     virtual OsiObject * clone() const;
    00465
    00466     // Assignment operator
    00467     OsiOldLink & operator=( const OsiOldLink& rhs);
    00468
    00469     // Destructor
    00470     virtual ~OsiOldLink ();
    00471
    00472     using OsiObject::infeasibility ;
    00474     virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
    00475
    00476     using OsiObject::feasibleRegion ;
    00482     virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
    00483
    00488     virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
    00489
    00491     virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
    00492
    00494     inline int numberLinks() const {
    00495         return numberLinks_;
    00496     }
    00497
    00500     virtual bool canDoHeuristics() const {
    00501         return false;
    00502     }
    00505     virtual bool boundBranch() const {
    00506         return false;
    00507     }
    00508
    00509 private:
    00511
    00513     int numberLinks_;
    00514 };
    00518 class OsiOldLinkBranchingObject : public OsiSOSBranchingObject {
    00519
    00520 public:
    00521
    00522     // Default Constructor
    00523     OsiOldLinkBranchingObject ();
    00524
    00525     // Useful constructor
    00526     OsiOldLinkBranchingObject (OsiSolverInterface * solver,  const OsiOldLink * originalObject,
    00527                                int way,
    00528                                double separator);
    00529
    00530     // Copy constructor
    00531     OsiOldLinkBranchingObject ( const OsiOldLinkBranchingObject &);
    00532
    00533     // Assignment operator
    00534     OsiOldLinkBranchingObject & operator=( const OsiOldLinkBranchingObject& rhs);
    00535
    00537     virtual OsiBranchingObject * clone() const;
    00538
    00539     // Destructor
    00540     virtual ~OsiOldLinkBranchingObject ();
    00541
    00542     using OsiBranchingObject::branch ;
    00544     virtual double branch(OsiSolverInterface * solver);
    00545
    00546     using OsiBranchingObject::print ;
    00549     virtual void print(const OsiSolverInterface * solver = NULL);
    00550 private:
    00552 };
    00558 class OsiOneLink {
    00559
    00560 public:
    00561
    00562     // Default Constructor
    00563     OsiOneLink ();
    00564
    00568     OsiOneLink (const OsiSolverInterface * solver, int xRow, int xColumn, int xyRow,
    00569                 const char * functionString);
    00570
    00571     // Copy constructor
    00572     OsiOneLink ( const OsiOneLink &);
    00573
    00574     // Assignment operator
    00575     OsiOneLink & operator=( const OsiOneLink& rhs);
    00576
    00577     // Destructor
    00578     virtual ~OsiOneLink ();
    00579
    00581
    00583     int xRow_;
    00585     int xColumn_;
    00587     int xyRow;
    00589     std::string function_;
    00590 };
    00600 class OsiLink : public OsiSOS {
    00601
    00602 public:
    00603
    00604     // Default Constructor
    00605     OsiLink ();
    00606
    00610     OsiLink (const OsiSolverInterface * solver, int yRow,
    00611              int yColumn, double meshSize);
    00612
    00613     // Copy constructor
    00614     OsiLink ( const OsiLink &);
    00615
    00617     virtual OsiObject * clone() const;
    00618
    00619     // Assignment operator
    00620     OsiLink & operator=( const OsiLink& rhs);
    00621
    00622     // Destructor
    00623     virtual ~OsiLink ();
    00624
    00625     using OsiObject::infeasibility ;
    00627     virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
    00628
    00629     using OsiObject::feasibleRegion ;
    00635     virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
    00636
    00641     virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
    00642
    00644     virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
    00645
    00647     inline int numberLinks() const {
    00648         return numberLinks_;
    00649     }
    00650
    00653     virtual bool canDoHeuristics() const {
    00654         return false;
    00655     }
    00658     virtual bool boundBranch() const {
    00659         return false;
    00660     }
    00661
    00662 private:
    00665     double meshSize_;
    00667     OsiOneLink * data_;
    00669     int numberLinks_;
    00671     int yRow_;
    00673     int yColumn_;
    00674 };
    00678 class OsiLinkBranchingObject : public OsiTwoWayBranchingObject {
    00679
    00680 public:
    00681
    00682     // Default Constructor
    00683     OsiLinkBranchingObject ();
    00684
    00685     // Useful constructor
    00686     OsiLinkBranchingObject (OsiSolverInterface * solver,  const OsiLink * originalObject,
    00687                             int way,
    00688                             double separator);
    00689
    00690     // Copy constructor
    00691     OsiLinkBranchingObject ( const OsiLinkBranchingObject &);
    00692
    00693     // Assignment operator
    00694     OsiLinkBranchingObject & operator=( const OsiLinkBranchingObject& rhs);
    00695
    00697     virtual OsiBranchingObject * clone() const;
    00698
    00699     // Destructor
    00700     virtual ~OsiLinkBranchingObject ();
    00701
    00702     using OsiBranchingObject::branch ;
    00704     virtual double branch(OsiSolverInterface * solver);
    00705
    00706     using OsiBranchingObject::print ;
    00709     virtual void print(const OsiSolverInterface * solver = NULL);
    00710 private:
    00712 };
    00720 class OsiBiLinear : public OsiObject2 {
    00721
    00722 public:
    00723
    00724     // Default Constructor
    00725     OsiBiLinear ();
    00726
    00732     OsiBiLinear (OsiSolverInterface * solver, int xColumn,
    00733                  int yColumn, int xyRow, double coefficient,
    00734                  double xMesh, double yMesh,
    00735                  int numberExistingObjects = 0, const OsiObject ** objects = NULL );
    00736
    00742     OsiBiLinear (CoinModel * coinModel, int xColumn,
    00743                  int yColumn, int xyRow, double coefficient,
    00744                  double xMesh, double yMesh,
    00745                  int numberExistingObjects = 0, const OsiObject ** objects = NULL );
    00746
    00747     // Copy constructor
    00748     OsiBiLinear ( const OsiBiLinear &);
    00749
    00751     virtual OsiObject * clone() const;
    00752
    00753     // Assignment operator
    00754     OsiBiLinear & operator=( const OsiBiLinear& rhs);
    00755
    00756     // Destructor
    00757     virtual ~OsiBiLinear ();
    00758
    00759     using OsiObject::infeasibility ;
    00761     virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
    00762
    00763     using OsiObject::feasibleRegion ;
    00769     virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
    00770
    00775     virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
    00776
    00778     virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
    00779
    00780     // This does NOT set mutable stuff
    00781     virtual double checkInfeasibility(const OsiBranchingInformation * info) const;
    00782
    00785     virtual bool canDoHeuristics() const {
    00786         return false;
    00787     }
    00790     virtual bool boundBranch() const {
    00791         return (branchingStrategy_&4) != 0;
    00792     }
    00794     inline int xColumn() const {
    00795         return xColumn_;
    00796     }
    00798     inline int yColumn() const {
    00799         return yColumn_;
    00800     }
    00802     inline int xRow() const {
    00803         return xRow_;
    00804     }
    00806     inline int yRow() const {
    00807         return yRow_;
    00808     }
    00810     inline int xyRow() const {
    00811         return xyRow_;
    00812     }
    00814     inline double coefficient() const {
    00815         return coefficient_;
    00816     }
    00818     inline void setCoefficient(double value) {
    00819         coefficient_ = value;
    00820     }
    00822     inline int firstLambda() const {
    00823         return firstLambda_;
    00824     }
    00826     inline double xSatisfied() const {
    00827         return xSatisfied_;
    00828     }
    00829     inline void setXSatisfied(double value) {
    00830         xSatisfied_ = value;
    00831     }
    00833     inline double ySatisfied() const {
    00834         return ySatisfied_;
    00835     }
    00836     inline void setYSatisfied(double value) {
    00837         ySatisfied_ = value;
    00838     }
    00840     inline double xOtherSatisfied() const {
    00841         return xOtherSatisfied_;
    00842     }
    00843     inline void setXOtherSatisfied(double value) {
    00844         xOtherSatisfied_ = value;
    00845     }
    00847     inline double yOtherSatisfied() const {
    00848         return yOtherSatisfied_;
    00849     }
    00850     inline void setYOtherSatisfied(double value) {
    00851         yOtherSatisfied_ = value;
    00852     }
    00854     inline double xMeshSize() const {
    00855         return xMeshSize_;
    00856     }
    00857     inline void setXMeshSize(double value) {
    00858         xMeshSize_ = value;
    00859     }
    00861     inline double yMeshSize() const {
    00862         return yMeshSize_;
    00863     }
    00864     inline void setYMeshSize(double value) {
    00865         yMeshSize_ = value;
    00866     }
    00868     inline double xySatisfied() const {
    00869         return xySatisfied_;
    00870     }
    00871     inline void setXYSatisfied(double value) {
    00872         xySatisfied_ = value;
    00873     }
    00875     void setMeshSizes(const OsiSolverInterface * solver, double x, double y);
    00886     inline int branchingStrategy() const {
    00887         return branchingStrategy_;
    00888     }
    00889     inline void setBranchingStrategy(int value) {
    00890         branchingStrategy_ = value;
    00891     }
    00899     inline int boundType() const {
    00900         return boundType_;
    00901     }
    00902     inline void setBoundType(int value) {
    00903         boundType_ = value;
    00904     }
    00906     void newBounds(OsiSolverInterface * solver, int way, short xOrY, double separator) const;
    00908     int updateCoefficients(const double * lower, const double * upper, double * objective,
    00909                            CoinPackedMatrix * matrix, CoinWarmStartBasis * basis) const;
    00911     double xyCoefficient(const double * solution) const;
    00913     void getCoefficients(const OsiSolverInterface * solver, double xB[2], double yB[2], double xybar[4]) const;
    00915     double computeLambdas(const double xB[3], const double yB[3], const double xybar[4], double lambda[4]) const;
    00917     void addExtraRow(int row, double multiplier);
    00919     void getPseudoShadow(const OsiBranchingInformation * info);
    00921     double getMovement(const OsiBranchingInformation * info);
    00922
    00923 protected:
    00925     void computeLambdas(const OsiSolverInterface * solver, double lambda[4]) const;
    00927
    00929     double coefficient_;
    00931     double xMeshSize_;
    00933     double yMeshSize_;
    00935     double xSatisfied_;
    00937     double ySatisfied_;
    00939     double xOtherSatisfied_;
    00941     double yOtherSatisfied_;
    00943     double xySatisfied_;
    00945     mutable double xyBranchValue_;
    00947     int xColumn_;
    00949     int yColumn_;
    00951     int firstLambda_;
    00962     int branchingStrategy_;
    00970     int boundType_;
    00972     int xRow_;
    00974     int yRow_;
    00976     int xyRow_;
    00978     int convexity_;
    00980     int numberExtraRows_;
    00982     double * multiplier_;
    00984     int * extraRow_;
    00986     mutable short chosen_;
    00987 };
    00991 class OsiBiLinearBranchingObject : public OsiTwoWayBranchingObject {
    00992
    00993 public:
    00994
    00995     // Default Constructor
    00996     OsiBiLinearBranchingObject ();
    00997
    00998     // Useful constructor
    00999     OsiBiLinearBranchingObject (OsiSolverInterface * solver,  const OsiBiLinear * originalObject,
    01000                                 int way,
    01001                                 double separator, int chosen);
    01002
    01003     // Copy constructor
    01004     OsiBiLinearBranchingObject ( const OsiBiLinearBranchingObject &);
    01005
    01006     // Assignment operator
    01007     OsiBiLinearBranchingObject & operator=( const OsiBiLinearBranchingObject& rhs);
    01008
    01010     virtual OsiBranchingObject * clone() const;
    01011
    01012     // Destructor
    01013     virtual ~OsiBiLinearBranchingObject ();
    01014
    01015     using OsiBranchingObject::branch ;
    01017     virtual double branch(OsiSolverInterface * solver);
    01018
    01019     using OsiBranchingObject::print ;
    01022     virtual void print(const OsiSolverInterface * solver = NULL);
    01025     virtual bool boundBranch() const;
    01026 private:
    01029     short chosen_;
    01030 };
    01038 class OsiBiLinearEquality : public OsiBiLinear {
    01039
    01040 public:
    01041
    01042     // Default Constructor
    01043     OsiBiLinearEquality ();
    01044
    01050     OsiBiLinearEquality (OsiSolverInterface * solver, int xColumn,
    01051                          int yColumn, int xyRow, double rhs,
    01052                          double xMesh);
    01053
    01054     // Copy constructor
    01055     OsiBiLinearEquality ( const OsiBiLinearEquality &);
    01056
    01058     virtual OsiObject * clone() const;
    01059
    01060     // Assignment operator
    01061     OsiBiLinearEquality & operator=( const OsiBiLinearEquality& rhs);
    01062
    01063     // Destructor
    01064     virtual ~OsiBiLinearEquality ();
    01065
    01067     virtual double improvement(const OsiSolverInterface * solver) const;
    01073     double newGrid(OsiSolverInterface * solver, int type) const;
    01075     inline int numberPoints() const {
    01076         return numberPoints_;
    01077     }
    01078     inline void setNumberPoints(int value) {
    01079         numberPoints_ = value;
    01080     }
    01081
    01082 private:
    01084     int numberPoints_;
    01085 };
    01087
    01088
    01089 class OsiSimpleFixedInteger : public OsiSimpleInteger {
    01090
    01091 public:
    01092
    01094     OsiSimpleFixedInteger ();
    01095
    01097     OsiSimpleFixedInteger (const OsiSolverInterface * solver, int iColumn);
    01098
    01100     OsiSimpleFixedInteger (int iColumn, double lower, double upper);
    01101
    01103     OsiSimpleFixedInteger (const OsiSimpleInteger &);
    01104
    01106     OsiSimpleFixedInteger ( const OsiSimpleFixedInteger &);
    01107
    01109     virtual OsiObject * clone() const;
    01110
    01112     OsiSimpleFixedInteger & operator=( const OsiSimpleFixedInteger& rhs);
    01113
    01115     virtual ~OsiSimpleFixedInteger ();
    01116
    01117     using OsiObject::infeasibility ;
    01119     virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
    01120
    01125     virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
    01126 protected:
    01128
    01129 };
    01139 class OsiUsesBiLinear : public OsiSimpleInteger {
    01140
    01141 public:
    01142
    01144     OsiUsesBiLinear ();
    01145
    01147     OsiUsesBiLinear (const OsiSolverInterface * solver, int iColumn, int type);
    01148
    01150     OsiUsesBiLinear (int iColumn, double lower, double upper, int type);
    01151
    01153     OsiUsesBiLinear (const OsiSimpleInteger & rhs, int type);
    01154
    01156     OsiUsesBiLinear ( const OsiUsesBiLinear & rhs);
    01157
    01159     virtual OsiObject * clone() const;
    01160
    01162     OsiUsesBiLinear & operator=( const OsiUsesBiLinear& rhs);
    01163
    01165     virtual ~OsiUsesBiLinear ();
    01166
    01167     using OsiObject::infeasibility ;
    01169     virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
    01170
    01175     virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
    01176
    01177     using OsiObject::feasibleRegion ;
    01183     virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
    01184
    01186     void addBiLinearObjects(OsiSolverLink * solver);
    01187 protected:
    01190     int numberBiLinear_;
    01192     int type_;
    01194     OsiObject ** objects_;
    01195 };
    01203 class OsiChooseStrongSubset  : public OsiChooseStrong {
    01204
    01205 public:
    01206
    01208     OsiChooseStrongSubset ();
    01209
    01211     OsiChooseStrongSubset (const OsiSolverInterface * solver);
    01212
    01214     OsiChooseStrongSubset (const OsiChooseStrongSubset &);
    01215
    01217     OsiChooseStrongSubset & operator= (const OsiChooseStrongSubset& rhs);
    01218
    01220     virtual OsiChooseVariable * clone() const;
    01221
    01223     virtual ~OsiChooseStrongSubset ();
    01224
    01229     virtual int setupList ( OsiBranchingInformation *info, bool initialize);
    01243     virtual int chooseVariable( OsiSolverInterface * solver, OsiBranchingInformation *info, bool fixVariables);
    01244
    01246     inline int numberObjectsToUse() const {
    01247         return numberObjectsToUse_;
    01248     }
    01250     inline void setNumberObjectsToUse(int value) {
    01251         numberObjectsToUse_ = value;
    01252     }
    01253
    01254 protected:
    01255     // Data
    01257     int numberObjectsToUse_;
    01258 };
    01259
    01260 #include <string>
    01261
    01262 #include "CglStored.hpp"
    01263
    01264 class CoinWarmStartBasis;
    01266 class CglTemporary : public CglStored {
    01267
    01268 public:
    01269
    01270
    01281     virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
    01282                                const CglTreeInfo info = CglTreeInfo()) const;
    01284
    01287
    01288     CglTemporary ();
    01289
    01291     CglTemporary (const CglTemporary & rhs);
    01292
    01294     virtual CglCutGenerator * clone() const;
    01295
    01297     CglTemporary &
    01298     operator=(const CglTemporary& rhs);
    01299
    01301     virtual
    01302     ~CglTemporary ();
    01304
    01305 private:
    01306
    01307 // Private member methods
    01308
    01309     // Private member data
    01310 };
    01311 //#############################################################################
    01312
    01318 class OsiSolverLinearizedQuadratic : public OsiClpSolverInterface {
    01319
    01320 public:
    01321     //---------------------------------------------------------------------------
    01324
    01325     virtual void initialSolve();
    01327
    01328
    01331
    01332     OsiSolverLinearizedQuadratic ();
    01334     OsiSolverLinearizedQuadratic(  ClpSimplex * quadraticModel);
    01336     virtual OsiSolverInterface * clone(bool copyData = true) const;
    01337
    01339     OsiSolverLinearizedQuadratic (const OsiSolverLinearizedQuadratic &);
    01340
    01342     OsiSolverLinearizedQuadratic & operator=(const OsiSolverLinearizedQuadratic& rhs);
    01343
    01345     virtual ~OsiSolverLinearizedQuadratic ();
    01346
    01348
    01349
    01352
    01353     inline double bestObjectiveValue() const {
    01354         return bestObjectiveValue_;
    01355     }
    01357     const double * bestSolution() const {
    01358         return bestSolution_;
    01359     }
    01361     inline void setSpecialOptions3(int value) {
    01362         specialOptions3_ = value;
    01363     }
    01365     inline int specialOptions3() const {
    01366         return specialOptions3_;
    01367     }
    01369     ClpSimplex * quadraticModel() const {
    01370         return quadraticModel_;
    01371     }
    01373
    01374     //---------------------------------------------------------------------------
    01375
    01376 protected:
    01377
    01378
    01381
    01384
    01385     double bestObjectiveValue_;
    01387     ClpSimplex * quadraticModel_;
    01389     double * bestSolution_;
    01394     int specialOptions3_;
    01396 };
    01397 class ClpSimplex;
    01402 ClpSimplex * approximateSolution(CoinModel & coinModel,
    01403                                  int numberPasses, double deltaTolerance,
    01404                                  int mode = 0);
    01405 #endif
    01406

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines