A simplified interface for NLP modeling/solving. More...
#include <optistack.hpp>
This class offers a view with solution retrieval facilities The API is guaranteed to be stable.
Extra doc: https://github.com/casadi/casadi/wiki/L_1v
Definition at line 662 of file optistack.hpp.
Public Member Functions | |
std::string | type_name () const |
void | disp (std::ostream &stream, bool more=false) const |
std::string | get_str (bool more=false) const |
std::vector< MX > | value_variables () const |
get assignment expressions for the optimal solution More... | |
std::vector< MX > | value_parameters () const |
Dict | stats () const |
Get statistics. More... | |
Opti | opti () const |
native_DM | value (const MX &x, const std::vector< MX > &values=std::vector< MX >()) const |
native_DM | value (const DM &x, const std::vector< MX > &values=std::vector< MX >()) const |
native_DM | value (const SX &x, const std::vector< MX > &values=std::vector< MX >()) const |
Protected Member Functions | |
OptiSol (const Opti &opti) | |
Protected Attributes | |
OptiAdvanced | optistack_ |
Friends | |
class | OptiNode |
|
protected |
Definition at line 857 of file optistack.cpp.
void casadi::OptiSol::disp | ( | std::ostream & | stream, |
bool | more = false |
||
) | const |
Definition at line 860 of file optistack.cpp.
References casadi::Opti::disp(), and optistack_.
std::string casadi::OptiSol::get_str | ( | bool | more = false | ) | const |
Definition at line 864 of file optistack.cpp.
References casadi::Opti::get_str(), and optistack_.
|
inline |
Definition at line 694 of file optistack.hpp.
Dict casadi::OptiSol::stats | ( | ) | const |
nlpsol stats are passed as-is. No stability can be guaranteed about this part of the API
Extra doc: https://github.com/casadi/casadi/wiki/L_1w
Definition at line 886 of file optistack.cpp.
References optistack_, and casadi::Opti::stats().
|
inline |
Definition at line 665 of file optistack.hpp.
DM casadi::OptiSol::value | ( | const DM & | x, |
const std::vector< MX > & | values = std::vector<MX>() |
||
) | const |
Obtain value of expression at the current value
In regular mode, teh current value is the converged solution In debug mode, the value can be non-converged
[in] | values | Optional assignment expressions (e.g. x==3) to overrule the current value |
Definition at line 871 of file optistack.cpp.
References optistack_, and casadi::Opti::value().
DM casadi::OptiSol::value | ( | const MX & | x, |
const std::vector< MX > & | values = std::vector<MX>() |
||
) | const |
Obtain value of expression at the current value
In regular mode, teh current value is the converged solution In debug mode, the value can be non-converged
[in] | values | Optional assignment expressions (e.g. x==3) to overrule the current value |
Definition at line 868 of file optistack.cpp.
References optistack_, and casadi::Opti::value().
DM casadi::OptiSol::value | ( | const SX & | x, |
const std::vector< MX > & | values = std::vector<MX>() |
||
) | const |
Obtain value of expression at the current value
In regular mode, teh current value is the converged solution In debug mode, the value can be non-converged
[in] | values | Optional assignment expressions (e.g. x==3) to overrule the current value |
Definition at line 874 of file optistack.cpp.
References optistack_, and casadi::Opti::value().
std::vector< MX > casadi::OptiSol::value_parameters | ( | ) | const |
Definition at line 882 of file optistack.cpp.
References optistack_, and casadi::Opti::value_parameters().
std::vector< MX > casadi::OptiSol::value_variables | ( | ) | const |
Definition at line 878 of file optistack.cpp.
References optistack_, and casadi::Opti::value_variables().
|
friend |
Definition at line 663 of file optistack.hpp.
|
protected |
Definition at line 698 of file optistack.hpp.
Referenced by disp(), get_str(), stats(), value(), value_parameters(), and value_variables().