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

- File List
- File Members

# /home/coin/svn-release/Blis-0.93.10/Osi/src/Osi/OsiAuxInfo.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2006, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00004
    00005 #ifndef OsiAuxInfo_H
    00006 #define OsiAuxInfo_H
    00007
    00008 class OsiSolverInterface;
    00009
    00010 //#############################################################################
    00021 class OsiAuxInfo {
    00022 public:
    00023   // Default Constructor
    00024   OsiAuxInfo (void * appData = NULL);
    00025
    00026   // Copy Constructor
    00027   OsiAuxInfo (const OsiAuxInfo & rhs);
    00028   // Destructor
    00029   virtual ~OsiAuxInfo();
    00030
    00032   virtual OsiAuxInfo * clone() const;
    00034   OsiAuxInfo & operator=(const OsiAuxInfo& rhs);
    00035
    00037   inline void * getApplicationData() const
    00038   { return appData_;}
    00039 protected:
    00041     void * appData_;
    00042 };
    00043 //#############################################################################
    00049 class OsiBabSolver : public OsiAuxInfo {
    00050 public:
    00051   // Default Constructor
    00052   OsiBabSolver (int solverType=0);
    00053
    00054   // Copy Constructor
    00055   OsiBabSolver (const OsiBabSolver & rhs);
    00056   // Destructor
    00057   virtual ~OsiBabSolver();
    00058
    00060   virtual OsiAuxInfo * clone() const;
    00062   OsiBabSolver & operator=(const OsiBabSolver& rhs);
    00063
    00065   inline void setSolver(const OsiSolverInterface * solver)
    00066   { solver_ = solver;}
    00068   inline void setSolver(const OsiSolverInterface & solver)
    00069   { solver_ = &solver;}
    00070
    00076   int solution(double & objectiveValue,
    00077                        double * newSolution, int numberColumns);
    00081   void setSolution(const double * solution, int numberColumns, double objectiveValue);
    00082
    00088   bool hasSolution(double & solutionValue, double * solution);
    00089
    00102   inline void setSolverType(int value)
    00103   { solverType_=value;}
    00116   inline int solverType() const
    00117   { return solverType_;}
    00120   inline bool solutionAddsCuts() const
    00121   { return solverType_==3;}
    00123   inline bool alwaysTryCutsAtRootNode() const
    00124   { return solverType_==4;}
    00127   inline bool solverAccurate() const
    00128   { return solverType_==0||solverType_==2||solverType_==4;}
    00130   inline bool reducedCostsAccurate() const
    00131   { return solverType_==0||solverType_==4;}
    00133   double mipBound() const;
    00135   bool mipFeasible() const;
    00137   inline void setMipBound(double value)
    00138   { mipBound_ = value;}
    00140   inline double bestObjectiveValue() const
    00141   { return bestObjectiveValue_;}
    00143   inline bool tryCuts() const
    00144   { return solverType_!=2;}
    00146   inline bool warmStart() const
    00147   { return solverType_!=2;}
    00152   inline int extraCharacteristics() const
    00153   { return extraCharacteristics_;}
    00158   inline void setExtraCharacteristics(int value)
    00159   { extraCharacteristics_=value;}
    00161   inline const double * beforeLower() const
    00162   { return beforeLower_;}
    00164   inline void setBeforeLower(const double * array)
    00165   { beforeLower_ = array;}
    00167   inline const double * beforeUpper() const
    00168   { return beforeUpper_;}
    00170   inline void setBeforeUpper(const double * array)
    00171   { beforeUpper_ = array;}
    00172 protected:
    00174   double bestObjectiveValue_;
    00176   double mipBound_;
    00178   const OsiSolverInterface * solver_;
    00180   double * bestSolution_;
    00182   const double * beforeLower_;
    00184   const double * beforeUpper_;
    00196   int solverType_;
    00198   int sizeSolution_;
    00203   int extraCharacteristics_;
    00204 };
    00205
    00206 #endif