humoto
bridges
QuadProgpp
interface
quadprogpp
solution.h
Go to the documentation of this file.
1
/**
2
@file
3
@author Alexander Sherikov
4
5
@brief
6
*/
7
8
9
#pragma once
10
11
12
namespace
humoto
13
{
14
namespace
quadprogpp
15
{
16
/**
17
* @brief Solution of a QP.
18
*/
19
class
HUMOTO_LOCAL
Solution
:
public
humoto::Solution
20
{
21
public
:
22
/// The return value of quadprogpp.
23
double
quadprogpp_return_value_
;
24
25
26
public
:
27
/**
28
* @brief Status description
29
*
30
* @return description of the status if available
31
*/
32
std::string
getStatusDescription
()
const
33
{
34
if
(quadprogpp_return_value_ == std::numeric_limits<double>::infinity())
35
{
36
return
(
"quadprogpp: an infeasible or degenerate problem."
);
37
}
38
else
39
{
40
return
(
"quadprogpp: Ok."
);
41
}
42
}
43
44
45
/**
46
* @brief Log a QP problem
47
*
48
* @param[in,out] logger logger
49
* @param[in] parent parent
50
* @param[in] name name
51
*/
52
void
log
(
humoto::Logger
&logger
HUMOTO_GLOBAL_LOGGER_IF_DEFINED
,
53
const
LogEntryName
&parent =
LogEntryName
(),
54
const
std::string &name =
"solution"
)
const
55
{
56
LogEntryName
subname = parent; subname.
add
(name);
57
58
humoto::Solution::log
(logger, subname,
""
);
59
60
logger.log(
LogEntryName
(subname).add(
"quadprogpp_return_value"
), quadprogpp_return_value_);
61
}
62
};
63
}
64
}
humoto::quadprogpp::Solution::getStatusDescription
std::string getStatusDescription() const
Status description.
Definition:
solution.h:32
HUMOTO_LOCAL
#define HUMOTO_LOCAL
Definition:
export_import.h:26
HUMOTO_GLOBAL_LOGGER_IF_DEFINED
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
Definition:
logger.h:997
humoto::Solution
Container of the solution.
Definition:
solution.h:176
humoto::LogEntryName
Represents log entry name.
Definition:
logger.h:169
humoto::quadprogpp::Solution
Solution of a QP.
Definition:
solution.h:19
humoto::Logger
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
Definition:
logger.h:555
humoto::Solution::log
virtual void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="solution") const
Log a QP problem.
Definition:
solution.h:351
humoto
The root namespace of HuMoTo.
Definition:
config.h:12
humoto::quadprogpp::Solution::quadprogpp_return_value_
double quadprogpp_return_value_
The return value of quadprogpp.
Definition:
solution.h:23
humoto::LogEntryName::add
LogEntryName & add(const char *name)
extends entry name with a subname
Definition:
logger.h:232
humoto::quadprogpp::Solution::log
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="solution") const
Log a QP problem.
Definition:
solution.h:52
Generated on Fri Sep 29 2017 16:44:40 for humoto by
1.8.13