Main Page
Namespaces
Classes
Files
File List
File Members
build
buildd
coinor-ipopt-3.10.2
Ipopt
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
setCpuTime
(
double
cpu);
40
41
// Access and modify the Lagrange multipliers.
42
const
double
*
getmultlb
()
const
;
43
const
double
*
getmultub
()
const
;
44
const
double
*
getmultconstr
()
const
;
45
void
setmultlb
(
int
n,
const
double
* zl);
46
void
setmultub
(
int
n,
const
double
* zu);
47
void
setmultconstr
(
int
m
,
const
double
* lambda);
48
49
protected
:
50
mxArray*
ptr
;
// All the information is stored in a MATLAB array.
51
};
52
53
#endif
Generated on Fri Jun 29 2012 06:35:12 by
1.8.1.1