Ipopt Documentation  
 
Loading...
Searching...
No Matches
SensUtils.hpp
Go to the documentation of this file.
1// Copyright 2009, 2011 Hans Pirnay
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Date : 2009-05-14
6
7#ifndef __SENSCUTILS_HPP__
8#define __SENSCUTILS_HPP__
9
10#include "IpUtils.hpp"
11#include "IpAlgTypes.hpp"
12#include "IpReturnCodes.hpp"
13
14#include <string>
15
16namespace Ipopt
17{
18
19/* This header file provides some definitions used throughout the program. */
20
26
27SIPOPTLIB_EXPORT Index AsIndexMax(
28 Index length,
29 const Index* x,
30 Index Incr
31);
32
33SIPOPTLIB_EXPORT Index AsIndexSum(
34 Index length,
35 const Index* x,
36 Index Incr
37);
38
39SIPOPTLIB_EXPORT void append_Index(
40 std::string& str,
41 Index idx
42);
43
45 ApplicationReturnStatus ipopt_retval
46);
47}
48
49// same as DECLARE_STD_EXCEPTION, but using SIPOPTLIB_EXPORT instead of IPOPTLIB_EXPORT
50#define DECLARE_STD_SIPOPT_EXCEPTION(__except_type) \
51 class SIPOPTLIB_EXPORT __except_type : public Ipopt::IpoptException \
52 { \
53 public: \
54 __except_type(const std::string& msg, const std::string& fname, Ipopt::Index line) \
55 : Ipopt::IpoptException(msg,fname,line, #__except_type) {} \
56 __except_type(const __except_type& copy) \
57 : Ipopt::IpoptException(copy) {} \
58 private: \
59 __except_type(); \
60 void operator=(const __except_type&); \
61 }
62
63#endif
ApplicationReturnStatus
Return codes for the Optimize call for an application.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SIPOPTLIB_EXPORT void append_Index(std::string &str, Index idx)
SolverReturn
enum for the return from the optimize algorithm
ipindex Index
Type of all indices of vectors, matrices etc.
Definition IpTypes.hpp:20
SIPOPTLIB_EXPORT Index AsIndexSum(Index length, const Index *x, Index Incr)
SIPOPTLIB_EXPORT SolverReturn AppReturn2SolverReturn(ApplicationReturnStatus ipopt_retval)
SIPOPTLIB_EXPORT Index AsIndexMax(Index length, const Index *x, Index Incr)
SensAlgorithmExitStatus
Definition SensUtils.hpp:22
@ SOLVE_SUCCESS
Definition SensUtils.hpp:23
@ FATAL_ERROR
Definition SensUtils.hpp:24