Ipopt  3.12.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
matlabinfo.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 25, 2008
8 
9 #ifndef INCLUDE_MATLABINFO
10 #define INCLUDE_MATLABINFO
11 
12 #include "mex.h"
13 #include "IpIpoptApplication.hpp"
14 
16 
17 // Class MatlabInfo.
18 // -----------------------------------------------------------------
19 // An object of this class stores all the information we will pass
20 // back to MATLAB upon termination of IPOPT.
21 class MatlabInfo {
22 public:
23 
24  // Create a new info object and store the information in a MATLAB
25  // array. The input pointer will point to the the newly created
26  // MATLAB array. Since the user has an opportunity to modify the
27  // MATLAB array pointed to by "ptr", we do not destroy the array
28  // when the MatlabInfo object is destroyed. It is up to the user to
29  // do that.
30  explicit MatlabInfo (mxArray*& ptr);
31 
32  // The destructor.
33  ~MatlabInfo() { };
34 
35  // Access and modify the exit status and solution statistics.
38  void setIterationCount (int iter);
39  void setFuncEvals(int obj, int con, int grad, int jac, int hess);
40  void setCpuTime (double cpu);
41 
42  // Access and modify the Lagrange multipliers.
43  const double* getmultlb () const;
44  const double* getmultub () const;
45  const double* getmultconstr () const;
46  void setmultlb (int n, const double* zl);
47  void setmultub (int n, const double* zu);
48  void setmultconstr (int m, const double* lambda);
49 
50 protected:
51  mxArray* ptr; // All the information is stored in a MATLAB array.
52 };
53 
54 #endif
void setFuncEvals(int obj, int con, int grad, int jac, int hess)
const double * getmultub() const
Number Number Index m
Number of constraints.
void setExitStatus(ApplicationReturnStatus status)
MatlabInfo(mxArray *&ptr)
const double * getmultconstr() const
void setmultub(int n, const double *zu)
const double * getmultlb() const
void setmultlb(int n, const double *zl)
void setCpuTime(double cpu)
void setIterationCount(int iter)
ApplicationReturnStatus getExitStatus() const
ApplicationReturnStatus
Return codes for the Optimize call for an application.
ApplicationReturnStatus
Return codes for the Optimize call for an application.
mxArray * ptr
Definition: matlabinfo.hpp:51
void setmultconstr(int m, const double *lambda)