1 | /* $Id: CouenneFixPoint.hpp 945 2013-04-06 20:25:21Z 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 | |
---|
22 | #include "CouenneBTPerfIndicator.hpp" |
---|
23 | |
---|
24 | namespace Couenne { |
---|
25 | |
---|
26 | class CouenneProblem; |
---|
27 | |
---|
28 | /// Cut Generator for FBBT fixpoint |
---|
29 | |
---|
30 | class CouenneFixPoint: public CglCutGenerator { |
---|
31 | |
---|
32 | public: |
---|
33 | |
---|
34 | /// constructor |
---|
35 | CouenneFixPoint (CouenneProblem *, |
---|
36 | const Ipopt::SmartPtr<Ipopt::OptionsList>); |
---|
37 | |
---|
38 | /// copy constructor |
---|
39 | CouenneFixPoint (const CouenneFixPoint &); |
---|
40 | |
---|
41 | /// destructor |
---|
42 | ~CouenneFixPoint (); |
---|
43 | |
---|
44 | /// clone method (necessary for the abstract CglCutGenerator class) |
---|
45 | CouenneFixPoint *clone () const |
---|
46 | {return new CouenneFixPoint (*this);} |
---|
47 | |
---|
48 | /// the main CglCutGenerator |
---|
49 | void generateCuts (const OsiSolverInterface &, |
---|
50 | OsiCuts &, |
---|
51 | const CglTreeInfo = CglTreeInfo ()) |
---|
52 | #if CGL_VERSION_MAJOR == 0 && CGL_VERSION_MINOR <= 57 |
---|
53 | const |
---|
54 | #endif |
---|
55 | ; |
---|
56 | |
---|
57 | /// Add list of options to be read from file |
---|
58 | static void registerOptions (Ipopt::SmartPtr <Bonmin::RegisteredOptions> roptions); |
---|
59 | |
---|
60 | protected: |
---|
61 | |
---|
62 | /// should we use an extended model or a more compact one? |
---|
63 | bool extendedModel_; |
---|
64 | |
---|
65 | /// pointer to the CouenneProblem representation |
---|
66 | CouenneProblem *problem_; |
---|
67 | |
---|
68 | /// Is this the first call? |
---|
69 | mutable bool firstCall_; |
---|
70 | |
---|
71 | /// CPU time |
---|
72 | mutable double CPUtime_; |
---|
73 | |
---|
74 | /// Number of actual runs |
---|
75 | mutable int nRuns_; |
---|
76 | |
---|
77 | /// Number of bounds tightened |
---|
78 | mutable int nTightened_; |
---|
79 | |
---|
80 | /// Create a single cut |
---|
81 | void createRow (int, int, |
---|
82 | int, |
---|
83 | OsiSolverInterface *, |
---|
84 | const int *, |
---|
85 | const double *, |
---|
86 | const double, |
---|
87 | const int, |
---|
88 | bool, |
---|
89 | int, int) const; |
---|
90 | |
---|
91 | /// Performance indicator |
---|
92 | CouenneBTPerfIndicator perfIndicator_; |
---|
93 | }; |
---|
94 | } |
---|
95 | |
---|
96 | #endif |
---|