Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

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
15 using Ipopt::ApplicationReturnStatus;
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.
36 ApplicationReturnStatus getExitStatus () const;
37 void setExitStatus (ApplicationReturnStatus status);
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
MatlabInfo::setFuncEvals
void setFuncEvals(int obj, int con, int grad, int jac, int hess)
MatlabInfo::getmultub
const double * getmultub() const
m
Number Number Index m
Number of constraints.
Definition: IpStdCInterface.h:137
MatlabInfo::setExitStatus
void setExitStatus(ApplicationReturnStatus status)
MatlabInfo::MatlabInfo
MatlabInfo(mxArray *&ptr)
MatlabInfo::~MatlabInfo
~MatlabInfo()
Definition: matlabinfo.hpp:33
MatlabInfo::getmultconstr
const double * getmultconstr() const
MatlabInfo::setmultub
void setmultub(int n, const double *zu)
MatlabInfo::getmultlb
const double * getmultlb() const
MatlabInfo::setmultlb
void setmultlb(int n, const double *zl)
MatlabInfo::setCpuTime
void setCpuTime(double cpu)
MatlabInfo::setIterationCount
void setIterationCount(int iter)
IpIpoptApplication.hpp
MatlabInfo::getExitStatus
ApplicationReturnStatus getExitStatus() const
Ipopt::ApplicationReturnStatus
ApplicationReturnStatus
Return codes for the Optimize call for an application.
Definition: IpReturnCodes.hpp:17
ApplicationReturnStatus
ApplicationReturnStatus
Return codes for the Optimize call for an application.
Definition: IpReturnCodes_inc.h:16
MatlabInfo
Definition: matlabinfo.hpp:21
MatlabInfo::ptr
mxArray * ptr
Definition: matlabinfo.hpp:51
MatlabInfo::setmultconstr
void setmultconstr(int m, const double *lambda)