Ipopt 3.11.9
Loading...
Searching...
No Matches
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"
14
15using 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.
22public:
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.
34
35 // Access and modify the exit status and solution statistics.
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
50protected:
51 mxArray* ptr; // All the information is stored in a MATLAB array.
52};
53
54#endif
ApplicationReturnStatus
Return codes for the Optimize call for an application.
Number Number Index m
Number of constraints.
void setmultub(int n, const double *zu)
MatlabInfo(mxArray *&ptr)
void setmultlb(int n, const double *zl)
void setIterationCount(int iter)
const double * getmultlb() const
void setFuncEvals(int obj, int con, int grad, int jac, int hess)
void setCpuTime(double cpu)
void setExitStatus(ApplicationReturnStatus status)
const double * getmultub() const
mxArray * ptr
const double * getmultconstr() const
ApplicationReturnStatus getExitStatus() const
void setmultconstr(int m, const double *lambda)