Ignore:
Timestamp:
Sep 29, 2006 4:48:36 PM (13 years ago)
Author:
pbonami
Message:

astyled the devel branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Bonmin/src/CbcBonmin/BonCbcNlpStrategy.hpp

    r57 r62  
    1919
    2020
    21 namespace Bonmin{
    22 class CbcNlpStrategy : public CbcStrategy
     21namespace Bonmin
    2322{
    24 public:
     23  class CbcNlpStrategy : public CbcStrategy
     24  {
     25  public:
    2526
    26   // Default Constructor
    27   CbcNlpStrategy (int maxFailures,
    28       int maxInfeasibles,
    29       int pretendFailIsInfeasible);
     27    // Default Constructor
     28    CbcNlpStrategy (int maxFailures,
     29        int maxInfeasibles,
     30        int pretendFailIsInfeasible);
    3031
    31   // Copy constructor
    32   CbcNlpStrategy ( const CbcNlpStrategy &);
     32    // Copy constructor
     33    CbcNlpStrategy ( const CbcNlpStrategy &);
    3334
    34   // Destructor
    35   virtual ~CbcNlpStrategy ();
     35    // Destructor
     36    virtual ~CbcNlpStrategy ();
    3637
    37   /// Clone
    38   virtual CbcStrategy * clone() const;
     38    /// Clone
     39    virtual CbcStrategy * clone() const;
    3940
    40   /// Return a new Full node information pointer (descendant of CbcFullNodeInfo)
    41   virtual CbcNodeInfo * fullNodeInfo(CbcModel * model,int numberRowsAtContinuous) const;
    42   /// Return a new Partial node information pointer (descendant of CbcPartialNodeInfo)
    43   virtual CbcNodeInfo * partialNodeInfo(CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
    44       int numberChangedBounds,const int * variables,
    45       const double * boundChanges,
    46       const CoinWarmStartDiff *basisDiff) const;
    47   /** After a CbcModel::resolve this can return a status
    48       -1 no effect
    49       0 treat as optimal
    50       1 as 0 but do not do any more resolves (i.e. no more cuts)
    51       2 treat as infeasible
    52   */
    53   virtual int status(CbcModel * model, CbcNodeInfo * parent, int whereFrom);
    54   /// set maximum number of consecutive failures in a branch before giving up
    55   inline void setMaxFailure(int value)
    56   {
    57     maxFailure_ = value;
    58   }
    59   /// maximum number of consecutive infeasible nodes before giving up
    60   inline void setMaxInfeasible(int value)
    61   {
    62     maxInfeasible_ = value;
    63   }
     41    /// Return a new Full node information pointer (descendant of CbcFullNodeInfo)
     42    virtual CbcNodeInfo * fullNodeInfo(CbcModel * model,int numberRowsAtContinuous) const;
     43    /// Return a new Partial node information pointer (descendant of CbcPartialNodeInfo)
     44    virtual CbcNodeInfo * partialNodeInfo(CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
     45        int numberChangedBounds,const int * variables,
     46        const double * boundChanges,
     47        const CoinWarmStartDiff *basisDiff) const;
     48    /** After a CbcModel::resolve this can return a status
     49        -1 no effect
     50        0 treat as optimal
     51        1 as 0 but do not do any more resolves (i.e. no more cuts)
     52        2 treat as infeasible
     53    */
     54    virtual int status(CbcModel * model, CbcNodeInfo * parent, int whereFrom);
     55    /// set maximum number of consecutive failures in a branch before giving up
     56    inline void setMaxFailure(int value)
     57    {
     58      maxFailure_ = value;
     59    }
     60    /// maximum number of consecutive infeasible nodes before giving up
     61    inline void setMaxInfeasible(int value)
     62    {
     63      maxInfeasible_ = value;
     64    }
    6465
    65   /// Setup cut generators
    66   virtual void setupCutGenerators(CbcModel & model);
    67   /// Setup heuristics
    68   virtual void setupHeuristics(CbcModel & model);
    69   /// Do printing stuff
    70   virtual void setupPrinting(CbcModel & model,int modelLogLevel);
    71   /// Other stuff e.g. strong branching and preprocessing
    72   virtual void setupOther(CbcModel & model);
     66    /// Setup cut generators
     67    virtual void setupCutGenerators(CbcModel & model);
     68    /// Setup heuristics
     69    virtual void setupHeuristics(CbcModel & model);
     70    /// Do printing stuff
     71    virtual void setupPrinting(CbcModel & model,int modelLogLevel);
     72    /// Other stuff e.g. strong branching and preprocessing
     73    virtual void setupOther(CbcModel & model);
    7374
    74   bool hasFailed()
    75   {
    76     return hasFailed_;
    77   }
    78 protected:
    79   // Data
    80   /// did we fail?
    81   bool hasFailed_;
    82   /// maximum number of consecutive failures in a branch before giving up
    83   int maxFailure_;
    84   /// maximum number of consecutive infeasible nodes before giving up
    85   int maxInfeasible_;
    86   /** If yes when a problem is not solved (failed to be solved)
    87       will pretend that it is infeasible. */
    88   int pretendFailIsInfeasible_;
     75    bool hasFailed()
     76    {
     77      return hasFailed_;
     78    }
     79  protected:
     80    // Data
     81    /// did we fail?
     82    bool hasFailed_;
     83    /// maximum number of consecutive failures in a branch before giving up
     84    int maxFailure_;
     85    /// maximum number of consecutive infeasible nodes before giving up
     86    int maxInfeasible_;
     87    /** If yes when a problem is not solved (failed to be solved)
     88        will pretend that it is infeasible. */
     89    int pretendFailIsInfeasible_;
    8990
    90 private:
    91   /// Illegal Assignment operator
    92   CbcNlpStrategy & operator=(const CbcNlpStrategy& rhs);
     91  private:
     92    /// Illegal Assignment operator
     93    CbcNlpStrategy & operator=(const CbcNlpStrategy& rhs);
    9394
    94 };
     95  };
    9596}
    9697
Note: See TracChangeset for help on using the changeset viewer.