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

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.1/Osi/src/OsiAuxInfo.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2006, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 #ifndef OsiAuxInfo_H
    00004 #define OsiAuxInfo_H
    00005
    00006 class OsiSolverInterface;
    00007
    00008 //#############################################################################
    00019 class OsiAuxInfo {
    00020 public:
    00021   // Default Constructor
    00022   OsiAuxInfo (void * appData = NULL);
    00023
    00024   // Copy Constructor
    00025   OsiAuxInfo (const OsiAuxInfo & rhs);
    00026   // Destructor
    00027   virtual ~OsiAuxInfo();
    00028
    00030   virtual OsiAuxInfo * clone() const;
    00032   OsiAuxInfo & operator=(const OsiAuxInfo& rhs);
    00033
    00035   inline void * getApplicationData() const
    00036   { return appData_;}
    00037 protected:
    00039     void * appData_;
    00040 };
    00041 //#############################################################################
    00047 class OsiBabSolver : public OsiAuxInfo {
    00048 public:
    00049   // Default Constructor
    00050   OsiBabSolver (int solverType=0);
    00051
    00052   // Copy Constructor
    00053   OsiBabSolver (const OsiBabSolver & rhs);
    00054   // Destructor
    00055   virtual ~OsiBabSolver();
    00056
    00058   virtual OsiAuxInfo * clone() const;
    00060   OsiBabSolver & operator=(const OsiBabSolver& rhs);
    00061
    00063   inline void setSolver(const OsiSolverInterface * solver)
    00064   { solver_ = solver;}
    00066   inline void setSolver(const OsiSolverInterface & solver)
    00067   { solver_ = &solver;}
    00068
    00074   int solution(double & objectiveValue,
    00075                        double * newSolution, int numberColumns);
    00079   void setSolution(const double * solution, int numberColumns, double objectiveValue);
    00080
    00086   bool hasSolution(double & solutionValue, double * solution);
    00087
    00100   inline void setSolverType(int value)
    00101   { solverType_=value;}
    00114   inline int solverType() const
    00115   { return solverType_;}
    00118   inline bool solutionAddsCuts() const
    00119   { return solverType_==3;}
    00121   inline bool alwaysTryCutsAtRootNode() const
    00122   { return solverType_==4;}
    00125   inline bool solverAccurate() const
    00126   { return solverType_==0||solverType_==2||solverType_==4;}
    00128   inline bool reducedCostsAccurate() const
    00129   { return solverType_==0||solverType_==4;}
    00131   double mipBound() const;
    00133   bool mipFeasible() const;
    00135   inline void setMipBound(double value)
    00136   { mipBound_ = value;}
    00138   inline double bestObjectiveValue() const
    00139   { return bestObjectiveValue_;}
    00141   inline bool tryCuts() const
    00142   { return solverType_!=2;}
    00144   inline bool warmStart() const
    00145   { return solverType_!=2;}
    00150   inline int extraCharacteristics() const
    00151   { return extraCharacteristics_;}
    00156   inline void setExtraCharacteristics(int value)
    00157   { extraCharacteristics_=value;}
    00159   inline const double * beforeLower() const
    00160   { return beforeLower_;}
    00162   inline void setBeforeLower(const double * array)
    00163   { beforeLower_ = array;}
    00165   inline const double * beforeUpper() const
    00166   { return beforeUpper_;}
    00168   inline void setBeforeUpper(const double * array)
    00169   { beforeUpper_ = array;}
    00170 protected:
    00172   double bestObjectiveValue_;
    00174   double mipBound_;
    00176   const OsiSolverInterface * solver_;
    00178   double * bestSolution_;
    00180   const double * beforeLower_;
    00182   const double * beforeUpper_;
    00194   int solverType_;
    00196   int sizeSolution_;
    00201   int extraCharacteristics_;
    00202 };
    00203
    00204 #endif