Ipopt  3.12.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ipoptoptions.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008 Peter Carbonetto. All Rights Reserved.
2 // This code is published under the Eclipse Public License.
3 //
4 // Author: Peter Carbonetto
5 // Dept. of Computer Science
6 // University of British Columbia
7 // September 15, 2008
8 
9 #ifndef INCLUDE_IPOPTOPTIONS
10 #define INCLUDE_IPOPTOPTIONS
11 
12 #include "mex.h"
13 #include "IpIpoptApplication.hpp"
14 
15 // Class IpoptOptions.
16 // -----------------------------------------------------------------
17 // This class processes the IPOPT options as specified by a user in the
18 // MATLAB environment.
19 class IpoptOptions {
20 public:
21 
22  // The constructor accepts as input an IPOPT application object and
23  // a MATLAB array. The latter input must be a structure array, with
24  // field names corresponding to the names of options in IPOPT.
25  IpoptOptions (Ipopt::IpoptApplication& app, const mxArray* ptr);
26 
27  // The destructor.
29 
30  // The first function returns true if and only if the user has
31  // specified a quasi-Newton approximation to the Hessian instead of
32  // the exact Hessian. The second function returns true if and only
33  // if the user has activated the derivative checker. The third
34  // function returns true if and only if a user-specified scaling of
35  // the problem is activated. The fourth function returns the print
36  // level for the IPOPT console. The remaining two functions return
37  // the floating-point value for positive and negative infinity,
38  // respectively.
39  bool useQuasiNewton () const;
40  bool useDerivChecker() const;
41  bool userScaling () const;
42  int printLevel () const;
43  double getPosInfty () const;
44  double getNegInfty () const;
45 
46 protected:
47  Ipopt::IpoptApplication& app; // The IPOPT application object.
48 
49  // These three functions are used by the class constructor.
50  void setOption (const char* label, const mxArray* ptr);
51  void setStringOption (const char* label, const mxArray* ptr);
52  void setIntegerOption (const char* label, const mxArray* ptr);
53  void setNumberOption (const char* label, const mxArray* ptr);
54 };
55 
56 #endif
void setNumberOption(const char *label, const mxArray *ptr)
void setOption(const char *label, const mxArray *ptr)
bool userScaling() const
void setStringOption(const char *label, const mxArray *ptr)
bool useQuasiNewton() const
int printLevel() const
Ipopt::IpoptApplication & app
double getNegInfty() const
IpoptOptions(Ipopt::IpoptApplication &app, const mxArray *ptr)
void setIntegerOption(const char *label, const mxArray *ptr)
This is the main application class for making calls to Ipopt.
bool useDerivChecker() const
double getPosInfty() const