Ipopt
3.11.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
contrib
MatlabInterface
src
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
Generated on Mon Oct 21 2013 19:08:14 for Ipopt by
1.8.4