source: stable/0.4/Couenne/src/bound_tightening/CouenneFixPoint.hpp @ 946

Last change on this file since 946 was 946, checked in by stefan, 8 years ago

merge r945 from trunk: allow compiling against Cgl 0.58

  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: CouenneFixPoint.hpp 946 2013-04-15 22:20:38Z stefan $
2 *
3 * Name:    CouenneFixPoint.hpp
4 * Author:  Pietro Belotti
5 * Purpose: A bound tightener based on fixpoint computation
6 *
7 * (C) Pietro Belotti, 2010.
8 * This file is licensed under the Eclipse Public License (EPL)
9 */
10
11#ifndef COUENNEFIXPOINT_HPP
12#define COUENNEFIXPOINT_HPP
13
14#include "BonRegisteredOptions.hpp"
15
16#include "BonOaDecBase.hpp"
17#include "CglConfig.h"
18#include "CglCutGenerator.hpp"
19#include "OsiRowCut.hpp"
20#include "OsiSolverInterface.hpp"
21
22namespace Couenne {
23
24  class CouenneProblem;
25
26  /// Cut Generator for FBBT fixpoint
27
28  class CouenneFixPoint: public CglCutGenerator {
29
30  public:
31
32    /// constructor
33    CouenneFixPoint (CouenneProblem *,
34                     const Ipopt::SmartPtr<Ipopt::OptionsList>);
35
36    /// copy constructor
37    CouenneFixPoint  (const CouenneFixPoint &);
38
39    /// destructor
40    ~CouenneFixPoint ();
41
42    /// clone method (necessary for the abstract CglCutGenerator class)
43    CouenneFixPoint *clone () const
44    {return new CouenneFixPoint (*this);}
45
46    /// the main CglCutGenerator
47    void generateCuts (const OsiSolverInterface &, 
48                       OsiCuts &, 
49                       const CglTreeInfo = CglTreeInfo ())
50#if CGL_VERSION_MAJOR == 0 && CGL_VERSION_MINOR <= 57
51    const
52#endif
53    ;
54
55    /// Add list of options to be read from file
56    static void registerOptions (Ipopt::SmartPtr <Bonmin::RegisteredOptions> roptions);
57
58  protected:
59
60    /// should we use an extended model or a more compact one?
61    bool extendedModel_;
62
63    /// pointer to the CouenneProblem representation
64    CouenneProblem *problem_;
65
66    /// Is this the first call?
67    mutable bool firstCall_;
68
69    /// CPU time
70    mutable double CPUtime_;
71
72    /// Number of actual runs
73    mutable int nRuns_;
74
75    /// Number of bounds tightened
76    mutable int nTightened_;
77
78    /// Create a single cut
79    void createRow (int, int,
80                    int,
81                    OsiSolverInterface *,
82                    const int    *,
83                    const double *,
84                    const double,
85                    const int,
86                    bool,
87                    int, int) const;
88  };
89}
90
91#endif
Note: See TracBrowser for help on using the repository browser.