/home/coin/SVN-release/Cbc-2.4.2/Cbc/src/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 #ifndef CglLinked_H
00005 #define CglLinked_H
00006 /* THIS CONTAINS STUFF THAT SHOULD BE IN
00007    OsiSolverLink
00008    OsiBranchLink
00009    CglTemporary
00010 */
00011 #include "CoinModel.hpp"
00012 #include "OsiClpSolverInterface.hpp"
00013 #include "OsiChooseVariable.hpp"
00014 #include "CbcFathom.hpp"
00015 class CbcModel;
00016 class CoinPackedMatrix;
00017 class OsiLinkedBound;
00018 class OsiObject;
00019 class CglStored;
00020 class CglTemporary;
00027 class OsiSolverLink : public CbcOsiSolver {
00028   
00029 public:
00030   //---------------------------------------------------------------------------
00033 
00034   virtual void initialSolve();
00035   
00037   virtual void resolve();
00038 
00046   virtual int fathom(bool allFixed) ;
00053   double * nonlinearSLP(int numberPasses,double deltaTolerance);
00057   double linearizedBAB(CglStored * cut) ;
00066   double * heuristicSolution(int numberPasses,double deltaTolerance,int mode);
00067   
00069   int doAOCuts(CglTemporary * cutGen, const double * solution, const double * solution2);
00071   
00072   
00075 
00076   OsiSolverLink ();
00077   
00090   OsiSolverLink(  CoinModel & modelObject);
00091   // Other way with existing object
00092   void load(  CoinModel & modelObject,bool tightenBounds=false,int logLevel=1);
00094   virtual OsiSolverInterface * clone(bool copyData=true) const;
00095   
00097   OsiSolverLink (const OsiSolverLink &);
00098   
00100   OsiSolverLink & operator=(const OsiSolverLink& rhs);
00101   
00103   virtual ~OsiSolverLink ();
00104   
00106   
00107   
00110 
00111   void addBoundModifier(bool upperBoundAffected, bool useUpperBound, int whichVariable, int whichVariableAffected, 
00112                         double multiplier=1.0);
00114   int updateCoefficients(ClpSimplex * solver, CoinPackedMatrix * matrix);
00116   void analyzeObjects();
00118   void addTighterConstraints();
00120   inline double bestObjectiveValue() const
00121   { return bestObjectiveValue_;}
00123   inline void setBestObjectiveValue(double value)
00124   { bestObjectiveValue_ = value;}
00126   inline const double * bestSolution() const
00127   { return bestSolution_;}
00129   void setBestSolution(const double * solution, int numberColumns);
00131   inline void setSpecialOptions2(int value)
00132   { specialOptions2_=value;}
00134   void sayConvex(bool convex);
00136   inline int specialOptions2() const
00137   { return specialOptions2_;}
00141   CoinPackedMatrix * cleanMatrix() const
00142   { return matrix_;}
00147   CoinPackedMatrix * originalRowCopy() const
00148   { return originalRowCopy_;}
00150   ClpSimplex * quadraticModel() const
00151   { return quadraticModel_;}
00153   CoinPackedMatrix * quadraticRow(int rowNumber,double * linear) const;
00155   inline double defaultMeshSize() const
00156   { return defaultMeshSize_;}
00157   inline void setDefaultMeshSize(double value)
00158   { defaultMeshSize_=value;}
00160   inline double defaultBound() const
00161   { return defaultBound_;}
00162   inline void setDefaultBound(double value)
00163   { defaultBound_=value;}
00165   inline void setIntegerPriority(int value)
00166   { integerPriority_=value;}
00168   inline int integerPriority() const
00169   { return integerPriority_;}
00171   inline int objectiveVariable() const
00172   { return objectiveVariable_;}
00174   inline void setBiLinearPriority(int value)
00175   { biLinearPriority_=value;}
00177   inline int biLinearPriority() const
00178   { return biLinearPriority_;}
00180   inline const CoinModel * coinModel() const
00181   { return &coinModel_;}
00183   void setBiLinearPriorities(int value, double meshSize=1.0);
00191   void setBranchingStrategyOnVariables(int strategyValue, int priorityValue=-1,
00192                                        int mode=7);
00194   void setMeshSizes(double value);
00198   void setFixedPriority(int priorityValue);
00200   
00201   //---------------------------------------------------------------------------
00202   
00203 protected:
00204   
00205   
00208 
00209   //void initialize(ClpSimplex * & solver, OsiObject ** & object) const;
00211   void gutsOfDestructor(bool justNullify=false);
00213   void gutsOfCopy(const OsiSolverLink & rhs) ;
00215   
00221   CoinPackedMatrix * matrix_;
00225   CoinPackedMatrix * originalRowCopy_;
00227   ClpSimplex * quadraticModel_;
00229   int numberNonLinearRows_;
00231   int * startNonLinear_;
00233   int * rowNonLinear_;
00237   int * convex_;
00239   int * whichNonLinear_;
00241   CoinModel coinModel_;
00243   int numberVariables_;
00245   OsiLinkedBound * info_;
00253   int specialOptions2_;
00255   int objectiveRow_;
00257   int objectiveVariable_;
00259   double bestObjectiveValue_;
00261   double defaultMeshSize_;
00263   double defaultBound_;
00265   double * bestSolution_;
00267   int integerPriority_;
00269   int biLinearPriority_;
00271   int numberFix_;
00273   int * fixVariables_;
00275 };
00280 class OsiLinkedBound {
00281   
00282 public:
00283   //---------------------------------------------------------------------------
00286 
00287   void updateBounds(ClpSimplex * solver);
00289   
00290   
00293 
00294   OsiLinkedBound ();
00296   OsiLinkedBound(OsiSolverInterface * model, int variable,
00297                  int numberAffected, const int * positionL, 
00298                  const int * positionU, const double * multiplier);
00299   
00301   OsiLinkedBound (const OsiLinkedBound &);
00302   
00304   OsiLinkedBound & operator=(const OsiLinkedBound& rhs);
00305   
00307   ~OsiLinkedBound ();
00308   
00310   
00313 
00314   inline int variable() const
00315   { return variable_;}
00317   void addBoundModifier(bool upperBoundAffected, bool useUpperBound, int whichVariable, 
00318                         double multiplier=1.0);
00320   
00321 private:
00322   typedef struct {
00323     double multiplier; // to use in computation 
00324     int affected; // variable or element affected
00325     /*
00326       0 - LB of variable affected
00327       1 - UB of variable affected
00328       2 - element in position (affected) affected
00329     */
00330     unsigned char affect;
00331     unsigned char ubUsed; // nonzero if UB of this variable is used
00332     /* 
00333        0 - use x*multiplier
00334        1 - use multiplier/x
00335        2 - if UB use min of current upper and x*multiplier, if LB use max of current lower and x*multiplier
00336     */
00337     unsigned char type; // type of computation
00338   } boundElementAction;
00339   
00342 
00343   OsiSolverInterface * model_;
00345   int variable_;
00347   int numberAffected_;
00349   int maximumAffected_;
00351   boundElementAction * affected_;
00353 };
00354 #include "CbcHeuristic.hpp"
00358 class CbcHeuristicDynamic3 : public CbcHeuristic {
00359 public:
00360   
00361   // Default Constructor 
00362   CbcHeuristicDynamic3 ();
00363   
00364   /* Constructor with model
00365    */
00366   CbcHeuristicDynamic3 (CbcModel & model);
00367   
00368   // Copy constructor 
00369   CbcHeuristicDynamic3 ( const CbcHeuristicDynamic3 &);
00370   
00371   // Destructor 
00372   ~CbcHeuristicDynamic3 ();
00373   
00375   virtual CbcHeuristic * clone() const;
00376   
00378   virtual void setModel(CbcModel * model);
00379   
00380   using CbcHeuristic::solution ;
00391   virtual int solution(double & objectiveValue,
00392                        double * newSolution);
00394   virtual void resetModel(CbcModel * model);
00396   virtual bool canDealWithOdd() const
00397   { return true;}
00398   
00399 protected:
00400 private:
00402   CbcHeuristicDynamic3 & operator=(const CbcHeuristicDynamic3& rhs);
00403 };
00404 
00405 #include "OsiBranchingObject.hpp"
00406 
00410 class CoinWarmStartBasis;
00411 
00412 class OsiOldLink : public OsiSOS {
00413 
00414 public:
00415 
00416   // Default Constructor 
00417   OsiOldLink ();
00418 
00425   OsiOldLink (const OsiSolverInterface * solver, int numberMembers,
00426            int numberLinks, int first,
00427            const double * weights, int setNumber);
00434   OsiOldLink (const OsiSolverInterface * solver, int numberMembers,
00435            int numberLinks, int typeSOS, const int * which,
00436            const double * weights, int setNumber);
00437   
00438   // Copy constructor 
00439   OsiOldLink ( const OsiOldLink &);
00440    
00442   virtual OsiObject * clone() const;
00443 
00444   // Assignment operator 
00445   OsiOldLink & operator=( const OsiOldLink& rhs);
00446 
00447   // Destructor 
00448   virtual ~OsiOldLink ();
00449   
00450   using OsiObject::infeasibility ;
00452   virtual double infeasibility(const OsiBranchingInformation * info,int & whichWay) const;
00453 
00454   using OsiObject::feasibleRegion ;
00460   virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
00461 
00466   virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
00467 
00469   virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
00470 
00472   inline int numberLinks() const
00473   {return numberLinks_;}
00474 
00477   virtual bool canDoHeuristics() const 
00478   {return false;}
00481   virtual bool boundBranch() const 
00482   {return false;}
00483 
00484 private:
00486 
00488   int numberLinks_;
00489 };
00493 class OsiOldLinkBranchingObject : public OsiSOSBranchingObject {
00494 
00495 public:
00496 
00497   // Default Constructor 
00498   OsiOldLinkBranchingObject ();
00499 
00500   // Useful constructor
00501   OsiOldLinkBranchingObject (OsiSolverInterface * solver,  const OsiOldLink * originalObject,
00502                           int way,
00503                           double separator);
00504   
00505   // Copy constructor 
00506   OsiOldLinkBranchingObject ( const OsiOldLinkBranchingObject &);
00507    
00508   // Assignment operator 
00509   OsiOldLinkBranchingObject & operator=( const OsiOldLinkBranchingObject& rhs);
00510 
00512   virtual OsiBranchingObject * clone() const;
00513 
00514   // Destructor 
00515   virtual ~OsiOldLinkBranchingObject ();
00516   
00517   using OsiBranchingObject::branch ;
00519   virtual double branch(OsiSolverInterface * solver);
00520 
00521   using OsiBranchingObject::print ;
00524   virtual void print(const OsiSolverInterface * solver=NULL);
00525 private:
00527 };
00533 class OsiOneLink {
00534 
00535 public:
00536 
00537   // Default Constructor 
00538   OsiOneLink ();
00539 
00543   OsiOneLink (const OsiSolverInterface * solver, int xRow, int xColumn, int xyRow,
00544               const char * functionString);
00545   
00546   // Copy constructor 
00547   OsiOneLink ( const OsiOneLink &);
00548    
00549   // Assignment operator 
00550   OsiOneLink & operator=( const OsiOneLink& rhs);
00551 
00552   // Destructor 
00553   virtual ~OsiOneLink ();
00554   
00556 
00558   int xRow_;
00560   int xColumn_;
00562   int xyRow;
00564   std::string function_;
00565 };
00575 class OsiLink : public OsiSOS {
00576 
00577 public:
00578 
00579   // Default Constructor 
00580   OsiLink ();
00581 
00585   OsiLink (const OsiSolverInterface * solver, int yRow,
00586            int yColumn, double meshSize);
00587   
00588   // Copy constructor 
00589   OsiLink ( const OsiLink &);
00590    
00592   virtual OsiObject * clone() const;
00593 
00594   // Assignment operator 
00595   OsiLink & operator=( const OsiLink& rhs);
00596 
00597   // Destructor 
00598   virtual ~OsiLink ();
00599   
00600   using OsiObject::infeasibility ;
00602   virtual double infeasibility(const OsiBranchingInformation * info,int & whichWay) const;
00603 
00604   using OsiObject::feasibleRegion ;
00610   virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
00611 
00616   virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
00617 
00619   virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
00620 
00622   inline int numberLinks() const
00623   {return numberLinks_;}
00624 
00627   virtual bool canDoHeuristics() const 
00628   {return false;}
00631   virtual bool boundBranch() const 
00632   {return false;}
00633 
00634 private:
00637   double meshSize_;
00639   OsiOneLink * data_;
00641   int numberLinks_;
00643   int yRow_;
00645   int yColumn_;
00646 };
00650 class OsiLinkBranchingObject : public OsiTwoWayBranchingObject {
00651 
00652 public:
00653 
00654   // Default Constructor 
00655   OsiLinkBranchingObject ();
00656 
00657   // Useful constructor
00658   OsiLinkBranchingObject (OsiSolverInterface * solver,  const OsiLink * originalObject,
00659                           int way,
00660                           double separator);
00661   
00662   // Copy constructor 
00663   OsiLinkBranchingObject ( const OsiLinkBranchingObject &);
00664    
00665   // Assignment operator 
00666   OsiLinkBranchingObject & operator=( const OsiLinkBranchingObject& rhs);
00667 
00669   virtual OsiBranchingObject * clone() const;
00670 
00671   // Destructor 
00672   virtual ~OsiLinkBranchingObject ();
00673   
00674   using OsiBranchingObject::branch ;
00676   virtual double branch(OsiSolverInterface * solver);
00677 
00678   using OsiBranchingObject::print ;
00681   virtual void print(const OsiSolverInterface * solver=NULL);
00682 private:
00684 };
00692 class OsiBiLinear : public OsiObject2 {
00693 
00694 public:
00695 
00696   // Default Constructor 
00697   OsiBiLinear ();
00698 
00704   OsiBiLinear (OsiSolverInterface * solver, int xColumn,
00705                int yColumn, int xyRow, double coefficient,
00706                double xMesh, double yMesh,
00707                int numberExistingObjects=0,const OsiObject ** objects=NULL );
00708   
00714   OsiBiLinear (CoinModel * coinModel, int xColumn,
00715                int yColumn, int xyRow, double coefficient,
00716                double xMesh, double yMesh,
00717                int numberExistingObjects=0,const OsiObject ** objects=NULL );
00718   
00719   // Copy constructor 
00720   OsiBiLinear ( const OsiBiLinear &);
00721    
00723   virtual OsiObject * clone() const;
00724 
00725   // Assignment operator 
00726   OsiBiLinear & operator=( const OsiBiLinear& rhs);
00727 
00728   // Destructor 
00729   virtual ~OsiBiLinear ();
00730   
00731   using OsiObject::infeasibility ;
00733   virtual double infeasibility(const OsiBranchingInformation * info,int & whichWay) const;
00734 
00735   using OsiObject::feasibleRegion ;
00741   virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
00742 
00747   virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
00748 
00750   virtual void resetSequenceEtc(int numberColumns, const int * originalColumns);
00751 
00752   // This does NOT set mutable stuff
00753   virtual double checkInfeasibility(const OsiBranchingInformation * info) const;
00754   
00757   virtual bool canDoHeuristics() const 
00758   {return false;}
00761   virtual bool boundBranch() const 
00762   { return (branchingStrategy_&4)!=0;}
00764   inline int xColumn() const
00765   { return xColumn_;}
00767   inline int yColumn() const
00768   { return yColumn_;}
00770   inline int xRow() const
00771   { return xRow_;}
00773   inline int yRow() const
00774   { return yRow_;}
00776   inline int xyRow() const
00777   { return xyRow_;}
00779   inline double coefficient() const
00780   { return coefficient_;}
00782   inline void setCoefficient(double value)
00783   { coefficient_ = value;}
00785   inline int firstLambda() const
00786   { return firstLambda_;}
00788   inline double xSatisfied() const
00789   { return xSatisfied_;}
00790   inline void setXSatisfied(double value)
00791   { xSatisfied_=value;}
00793   inline double ySatisfied() const
00794   { return ySatisfied_;}
00795   inline void setYSatisfied(double value)
00796   { ySatisfied_=value;}
00798   inline double xOtherSatisfied() const
00799   { return xOtherSatisfied_;}
00800   inline void setXOtherSatisfied(double value)
00801   { xOtherSatisfied_=value;}
00803   inline double yOtherSatisfied() const
00804   { return yOtherSatisfied_;}
00805   inline void setYOtherSatisfied(double value)
00806   { yOtherSatisfied_=value;}
00808   inline double xMeshSize() const
00809   { return xMeshSize_;}
00810   inline void setXMeshSize(double value)
00811   { xMeshSize_=value;}
00813   inline double yMeshSize() const
00814   { return yMeshSize_;}
00815   inline void setYMeshSize(double value)
00816   { yMeshSize_=value;}
00818   inline double xySatisfied() const
00819   { return xySatisfied_;}
00820   inline void setXYSatisfied(double value)
00821   { xySatisfied_=value;}
00823   void setMeshSizes(const OsiSolverInterface * solver, double x, double y);
00834   inline int branchingStrategy() const
00835   { return branchingStrategy_;}
00836   inline void setBranchingStrategy(int value)
00837   { branchingStrategy_=value;}
00845   inline int boundType() const
00846   { return boundType_;}
00847   inline void setBoundType(int value)
00848   { boundType_ = value;}
00850   void newBounds(OsiSolverInterface * solver, int way, short xOrY, double separator) const;
00852   int updateCoefficients(const double * lower, const double * upper, double * objective,
00853                           CoinPackedMatrix * matrix, CoinWarmStartBasis * basis) const;
00855   double xyCoefficient(const double * solution) const;
00857   void getCoefficients(const OsiSolverInterface * solver,double xB[2], double yB[2], double xybar[4]) const;
00859   double computeLambdas(const double xB[3], const double yB[3],const double xybar[4],double lambda[4]) const;
00861   void addExtraRow(int row, double multiplier);
00863   void getPseudoShadow(const OsiBranchingInformation * info);
00865   double getMovement(const OsiBranchingInformation * info);
00866 
00867 protected:
00869   void computeLambdas(const OsiSolverInterface * solver,double lambda[4]) const;
00871   
00873   double coefficient_;
00875   double xMeshSize_;
00877   double yMeshSize_;
00879   double xSatisfied_;
00881   double ySatisfied_;
00883   double xOtherSatisfied_;
00885   double yOtherSatisfied_;
00887   double xySatisfied_;
00889   mutable double xyBranchValue_;
00891   int xColumn_;
00893   int yColumn_;
00895   int firstLambda_;
00906   int branchingStrategy_;
00914   int boundType_;
00916   int xRow_;
00918   int yRow_;
00920   int xyRow_;
00922   int convexity_;
00924   int numberExtraRows_;
00926   double * multiplier_;
00928   int * extraRow_;
00930   mutable short chosen_;
00931 };
00935 class OsiBiLinearBranchingObject : public OsiTwoWayBranchingObject {
00936 
00937 public:
00938 
00939   // Default Constructor 
00940   OsiBiLinearBranchingObject ();
00941 
00942   // Useful constructor
00943   OsiBiLinearBranchingObject (OsiSolverInterface * solver,  const OsiBiLinear * originalObject,
00944                           int way,
00945                           double separator, int chosen);
00946   
00947   // Copy constructor 
00948   OsiBiLinearBranchingObject ( const OsiBiLinearBranchingObject &);
00949    
00950   // Assignment operator 
00951   OsiBiLinearBranchingObject & operator=( const OsiBiLinearBranchingObject& rhs);
00952 
00954   virtual OsiBranchingObject * clone() const;
00955 
00956   // Destructor 
00957   virtual ~OsiBiLinearBranchingObject ();
00958   
00959   using OsiBranchingObject::branch ;
00961   virtual double branch(OsiSolverInterface * solver);
00962 
00963   using OsiBranchingObject::print ;
00966   virtual void print(const OsiSolverInterface * solver=NULL);
00969   virtual bool boundBranch() const; 
00970 private:
00973   short chosen_;
00974 };
00982 class OsiBiLinearEquality : public OsiBiLinear {
00983 
00984 public:
00985 
00986   // Default Constructor 
00987   OsiBiLinearEquality ();
00988 
00994   OsiBiLinearEquality (OsiSolverInterface * solver, int xColumn,
00995                int yColumn, int xyRow, double rhs,
00996                        double xMesh);
00997   
00998   // Copy constructor 
00999   OsiBiLinearEquality ( const OsiBiLinearEquality &);
01000    
01002   virtual OsiObject * clone() const;
01003 
01004   // Assignment operator 
01005   OsiBiLinearEquality & operator=( const OsiBiLinearEquality& rhs);
01006 
01007   // Destructor 
01008   virtual ~OsiBiLinearEquality ();
01009   
01011   virtual double improvement(const OsiSolverInterface * solver) const;
01017   double newGrid(OsiSolverInterface * solver, int type) const;
01019   inline int numberPoints() const
01020   { return numberPoints_;}
01021   inline void setNumberPoints(int value)
01022   { numberPoints_ = value;}
01023 
01024 private:
01026   int numberPoints_;
01027 };
01029 
01030 
01031 class OsiSimpleFixedInteger : public OsiSimpleInteger {
01032 
01033 public:
01034 
01036   OsiSimpleFixedInteger ();
01037 
01039   OsiSimpleFixedInteger (const OsiSolverInterface * solver, int iColumn);
01040   
01042   OsiSimpleFixedInteger (int iColumn, double lower, double upper);
01043   
01045   OsiSimpleFixedInteger (const OsiSimpleInteger &);
01046   
01048   OsiSimpleFixedInteger ( const OsiSimpleFixedInteger &);
01049    
01051   virtual OsiObject * clone() const;
01052 
01054   OsiSimpleFixedInteger & operator=( const OsiSimpleFixedInteger& rhs);
01055 
01057   virtual ~OsiSimpleFixedInteger ();
01058   
01059   using OsiObject::infeasibility ;
01061   virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
01062 
01067   virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
01068 protected:
01070   
01071 };
01081 class OsiUsesBiLinear : public OsiSimpleInteger {
01082 
01083 public:
01084 
01086   OsiUsesBiLinear ();
01087 
01089   OsiUsesBiLinear (const OsiSolverInterface * solver, int iColumn, int type);
01090   
01092   OsiUsesBiLinear (int iColumn, double lower, double upper, int type);
01093   
01095   OsiUsesBiLinear (const OsiSimpleInteger & rhs, int type);
01096   
01098   OsiUsesBiLinear ( const OsiUsesBiLinear & rhs);
01099    
01101   virtual OsiObject * clone() const;
01102 
01104   OsiUsesBiLinear & operator=( const OsiUsesBiLinear& rhs);
01105 
01107   virtual ~OsiUsesBiLinear ();
01108   
01109   using OsiObject::infeasibility ;
01111   virtual double infeasibility(const OsiBranchingInformation * info, int & whichWay) const;
01112 
01117   virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
01118 
01119   using OsiObject::feasibleRegion ;
01125   virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
01126 
01128   void addBiLinearObjects(OsiSolverLink * solver);
01129 protected:
01132   int numberBiLinear_;
01134   int type_;
01136   OsiObject ** objects_;
01137 };
01145 class OsiChooseStrongSubset  : public OsiChooseStrong {
01146  
01147 public:
01148     
01150   OsiChooseStrongSubset ();
01151 
01153   OsiChooseStrongSubset (const OsiSolverInterface * solver);
01154 
01156   OsiChooseStrongSubset (const OsiChooseStrongSubset &);
01157    
01159   OsiChooseStrongSubset & operator= (const OsiChooseStrongSubset& rhs);
01160 
01162   virtual OsiChooseVariable * clone() const;
01163 
01165   virtual ~OsiChooseStrongSubset ();
01166 
01171   virtual int setupList ( OsiBranchingInformation *info, bool initialize);
01185   virtual int chooseVariable( OsiSolverInterface * solver, OsiBranchingInformation *info, bool fixVariables);
01186 
01188   inline int numberObjectsToUse() const
01189   { return numberObjectsToUse_;}
01191   inline void setNumberObjectsToUse(int value)
01192   { numberObjectsToUse_ = value;}
01193 
01194 protected:
01195   // Data
01197   int numberObjectsToUse_;
01198 };
01199 
01200 #include <string>
01201 
01202 #include "CglStored.hpp"
01203 
01204 class CoinWarmStartBasis;
01206 class CglTemporary : public CglStored {
01207  
01208 public:
01209     
01210   
01221   virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
01222                              const CglTreeInfo info = CglTreeInfo()) const;
01224 
01227 
01228   CglTemporary ();
01229  
01231   CglTemporary (const CglTemporary & rhs);
01232 
01234   virtual CglCutGenerator * clone() const;
01235 
01237   CglTemporary &
01238     operator=(const CglTemporary& rhs);
01239   
01241   virtual
01242     ~CglTemporary ();
01244       
01245 private:
01246   
01247  // Private member methods
01248 
01249   // Private member data
01250 };
01251 //#############################################################################
01252 
01258 class OsiSolverLinearizedQuadratic : public OsiClpSolverInterface {
01259   
01260 public:
01261   //---------------------------------------------------------------------------
01264 
01265   virtual void initialSolve();
01267   
01268   
01271 
01272   OsiSolverLinearizedQuadratic ();
01274   OsiSolverLinearizedQuadratic(  ClpSimplex * quadraticModel);
01276   virtual OsiSolverInterface * clone(bool copyData=true) const;
01277   
01279   OsiSolverLinearizedQuadratic (const OsiSolverLinearizedQuadratic &);
01280   
01282   OsiSolverLinearizedQuadratic & operator=(const OsiSolverLinearizedQuadratic& rhs);
01283   
01285   virtual ~OsiSolverLinearizedQuadratic ();
01286   
01288   
01289   
01292 
01293   inline double bestObjectiveValue() const
01294   { return bestObjectiveValue_;}
01296   const double * bestSolution() const
01297   { return bestSolution_;}
01299   inline void setSpecialOptions3(int value)
01300   { specialOptions3_=value;}
01302   inline int specialOptions3() const
01303   { return specialOptions3_;}
01305   ClpSimplex * quadraticModel() const
01306   { return quadraticModel_;}
01308   
01309   //---------------------------------------------------------------------------
01310   
01311 protected:
01312   
01313   
01316   
01319 
01320   double bestObjectiveValue_;
01322   ClpSimplex * quadraticModel_;
01324   double * bestSolution_;
01329   int specialOptions3_;
01331 };
01332 class ClpSimplex;
01337 ClpSimplex * approximateSolution(CoinModel & coinModel, 
01338                                  int numberPasses, double deltaTolerance,
01339                                  int mode=0);
01340 #endif

Generated on Sat May 22 03:07:44 2010 by  doxygen 1.4.7