List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
casadi::OptiSol Class Reference

A simplified interface for NLP modeling/solving. More...

#include <optistack.hpp>

Detailed Description

This class offers a view with solution retrieval facilities The API is guaranteed to be stable.

Date
2017
Author
Joris Gillis, Erik Lambrechts

Extra doc: https://github.com/casadi/casadi/wiki/L_1v

Definition at line 628 of file optistack.hpp.

Inheritance diagram for casadi::OptiSol:
Inheritance graph
[legend]

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< MXvalue_variables () const
 get assignment expressions for the optimal solution More...
 
std::vector< MXvalue_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
 

Constructor & Destructor Documentation

◆ OptiSol()

casadi::OptiSol::OptiSol ( const Opti opti)
protected

Member Function Documentation

◆ disp()

void casadi::OptiSol::disp ( std::ostream &  stream,
bool  more = false 
) const

◆ get_str()

std::string casadi::OptiSol::get_str ( bool  more = false) const

◆ opti()

Opti casadi::OptiSol::opti ( ) const
inline

Definition at line 660 of file optistack.hpp.

◆ stats()

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

◆ type_name()

std::string casadi::OptiSol::type_name ( ) const
inline

Definition at line 631 of file optistack.hpp.

◆ value() [1/3]

native_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

Parameters
[in]valuesOptional assignment expressions (e.g. x==3) to overrule the current value

◆ value() [2/3]

native_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

Parameters
[in]valuesOptional assignment expressions (e.g. x==3) to overrule the current value

◆ value() [3/3]

native_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

Parameters
[in]valuesOptional assignment expressions (e.g. x==3) to overrule the current value

◆ value_parameters()

std::vector<MX> casadi::OptiSol::value_parameters ( ) const

◆ value_variables()

std::vector<MX> casadi::OptiSol::value_variables ( ) const

Friends And Related Function Documentation

◆ OptiNode

friend class OptiNode
friend

Definition at line 629 of file optistack.hpp.

Member Data Documentation

◆ optistack_

OptiAdvanced casadi::OptiSol::optistack_
protected

Definition at line 664 of file optistack.hpp.


The documentation for this class was generated from the following file: