Functions
Title

Functions

CASADI_EXPORT Function casadi::dplesol (const std::string &name, const std::string &solver, const SpDict &st, const Dict &opts=Dict())
 
CASADI_EXPORT MX casadi::dplesol (const MX &A, const MX &V, const std::string &solver, const Dict &opts=Dict())
 
CASADI_EXPORT MXVector casadi::dplesol (const MXVector &A, const MXVector &V, const std::string &solver, const Dict &opts=Dict())
 
CASADI_EXPORT DMVector casadi::dplesol (const DMVector &A, const DMVector &V, const std::string &solver, const Dict &opts=Dict())
 
CASADI_EXPORT std::vector< std::string > casadi::dple_in ()
 Get input scheme of DPLE solvers. More...
 
CASADI_EXPORT std::vector< std::string > casadi::dple_out ()
 Get output scheme of DPLE solvers. More...
 
CASADI_EXPORT std::string casadi::dple_in (casadi_int ind)
 Get DPLE input scheme name by index. More...
 
CASADI_EXPORT std::string casadi::dple_out (casadi_int ind)
 Get DPLE output scheme name by index. More...
 
CASADI_EXPORT casadi_int casadi::dple_n_in ()
 Get the number of QP solver inputs. More...
 
CASADI_EXPORT casadi_int casadi::dple_n_out ()
 Get the number of QP solver outputs. More...
 
CASADI_EXPORT bool casadi::has_dple (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void casadi::load_dple (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string casadi::doc_dple (const std::string &name)
 Get the documentation string for a plugin. More...
 

Detailed Description

Discrete periodic Lyapunov Equation solver Given matrices $A_k$ and symmetric $V_k, k = 0..K-1$

A_k in R^(n x n)
V_k in R^n

provides all of $P_k$ that satisfy:

P_0 = A_(K-1)*P_(K-1)*A_(K-1)' + V_k
P_k+1 = A_k*P_k*A_k' + V_k  for k = 1..K-1

General information


List of available options
IdTypeDescriptionUsed in
ad_weightOT_DOUBLEWeighting factor for derivative calculation.When there is an option of either using forward or reverse mode directional derivatives, the condition ad_weight*nf<=(1-ad_weight)*na is used where nf and na are estimates of the number of forward/reverse mode directional derivatives needed. By default, ad_weight is calculated automatically, but this can be overridden by setting this option. In particular, 0 means forcing forward mode and 1 forcing reverse mode. Leave unset for (class specific) heuristics.casadi::FunctionInternal
ad_weight_spOT_DOUBLEWeighting factor for sparsity pattern calculation calculation.Overrides default behavior. Set to 0 and 1 to force forward and reverse mode respectively. Cf. option "ad_weight". When set to -1, sparsity is completely ignored and dense matrices are used.casadi::FunctionInternal
always_inlineOT_BOOLForce inlining.casadi::FunctionInternal
cacheOT_DICTPrepopulate the function cache. Default: emptycasadi::FunctionInternal
compilerOT_STRINGJust-in-time compiler plugin to be used.casadi::FunctionInternal
const_dimOT_BOOLAssume constant dimension of Pcasadi::Dple
custom_jacobianOT_FUNCTIONOverride CasADi's AD. Use together with 'jac_penalty': 0. Note: Highly experimental. Syntax may break often.casadi::FunctionInternal
der_optionsOT_DICTDefault options to be used to populate forward_options, reverse_options, and jacobian_options before those options are merged in.casadi::FunctionInternal
derivative_ofOT_FUNCTIONThe function is a derivative of another function. The type of derivative (directional derivative, Jacobian) is inferred from the function name.casadi::FunctionInternal
dumpOT_BOOLDump function to file upon first evaluation. [false]casadi::FunctionInternal
dump_dirOT_STRINGDirectory to dump inputs/outputs to. Make sure the directory exists [.]casadi::FunctionInternal
dump_formatOT_STRINGChoose file format to dump matrices. See DM.from_file [mtx]casadi::FunctionInternal
dump_inOT_BOOLDump numerical values of inputs to file (readable with DM.from_file) [default: false]casadi::FunctionInternal
dump_outOT_BOOLDump numerical values of outputs to file (readable with DM.from_file) [default: false]casadi::FunctionInternal
enable_fdOT_BOOLEnable derivative calculation by finite differencing. [default: false]]casadi::FunctionInternal
enable_forwardOT_BOOLEnable derivative calculation using generated functions for Jacobian-times-vector products - typically using forward mode AD - if available. [default: true]casadi::FunctionInternal
enable_jacobianOT_BOOLEnable derivative calculation using generated functions for Jacobians of all differentiable outputs with respect to all differentiable inputs - if available. [default: true]casadi::FunctionInternal
enable_reverseOT_BOOLEnable derivative calculation using generated functions for transposed Jacobian-times-vector products - typically using reverse mode AD - if available. [default: true]casadi::FunctionInternal
eps_unstableOT_DOUBLEA margin for unstability detectioncasadi::Dple
error_on_failOT_BOOLThrow exceptions when function evaluation fails (default true).casadi::ProtoFunction
error_unstableOT_BOOLThrow an exception when it is detected that Product(A_i, i=N..1)has eigenvalues greater than 1-eps_unstablecasadi::Dple
external_transformOT_VECTORVECTORList of external_transform instruction arguments. Default: emptycasadi::FunctionInternal
fd_methodOT_STRINGMethod for finite differencing [default 'central']casadi::FunctionInternal
fd_optionsOT_DICTOptions to be passed to the finite difference instancecasadi::FunctionInternal
forward_optionsOT_DICTOptions to be passed to a forward mode constructorcasadi::FunctionInternal
gather_statsOT_BOOLDeprecated option (ignored): Statistics are now always collected.casadi::FunctionInternal
input_schemeOT_STRINGVECTORDeprecated option (ignored)casadi::FunctionInternal
inputs_checkOT_BOOLThrow exceptions when the numerical values of the inputs don't make sensecasadi::FunctionInternal
is_diff_inOT_BOOLVECTORIndicate for each input if it should be differentiable.casadi::FunctionInternal
is_diff_outOT_BOOLVECTORIndicate for each output if it should be differentiable.casadi::FunctionInternal
jac_penaltyOT_DOUBLEWhen requested for a number of forward/reverse directions, it may be cheaper to compute first the full jacobian and then multiply with seeds, rather than obtain the requested directions in a straightforward manner. Casadi uses a heuristic to decide which is cheaper. A high value of 'jac_penalty' makes it less likely for the heurstic to chose the full Jacobian strategy. The special value -1 indicates never to use the full Jacobian strategycasadi::FunctionInternal
jacobian_optionsOT_DICTOptions to be passed to a Jacobian constructorcasadi::FunctionInternal
jitOT_BOOLUse just-in-time compiler to speed up the evaluationcasadi::FunctionInternal
jit_cleanupOT_BOOLCleanup up the temporary source file that jit creates. Default: truecasadi::FunctionInternal
jit_nameOT_STRINGThe file name used to write out code. The actual file names used depend on 'jit_temp_suffix' and include extensions. Default: 'jit_tmp'casadi::FunctionInternal
jit_optionsOT_DICTOptions to be passed to the jit compiler.casadi::FunctionInternal
jit_serializeOT_STRINGSpecify behaviour when serializing a jitted function: SOURCE|link|embed.casadi::FunctionInternal
jit_temp_suffixOT_BOOLUse a temporary (seemingly random) filename suffix for generated code and libraries. This is desired for thread-safety. This behaviour may defeat caching compiler wrappers. Default: truecasadi::FunctionInternal
max_ioOT_INTAcceptable number of inputs and outputs. Warn if exceeded.casadi::FunctionInternal
max_num_dirOT_INTSpecify the maximum number of directions for derivative functions. Overrules the builtin optimized_num_dir.casadi::FunctionInternal
never_inlineOT_BOOLForbid inlining.casadi::FunctionInternal
output_schemeOT_STRINGVECTORDeprecated option (ignored)casadi::FunctionInternal
pos_defOT_BOOLAssume P positive definitecasadi::Dple
post_expandOT_BOOLAfter construction, expand this Function. Default: Falsecasadi::FunctionInternal
post_expand_optionsOT_DICTOptions to be passed to post-construction expansion. Default: emptycasadi::FunctionInternal
print_inOT_BOOLPrint numerical values of inputs [default: false]casadi::FunctionInternal
print_outOT_BOOLPrint numerical values of outputs [default: false]casadi::FunctionInternal
print_timeOT_BOOLprint information about execution time. Implies record_time.casadi::ProtoFunction
record_timeOT_BOOLrecord information about execution time, for retrieval with stats().casadi::ProtoFunction
regularity_checkOT_BOOLThrow exceptions when NaN or Inf appears during evaluationcasadi::ProtoFunction
reverse_optionsOT_DICTOptions to be passed to a reverse mode constructorcasadi::FunctionInternal
user_dataOT_VOIDPTRA user-defined field that can be used to identify the function or pass additional informationcasadi::FunctionInternal
verboseOT_BOOLVerbose evaluation – for debuggingcasadi::ProtoFunction

Input scheme: casadi::DpleInput (DPLE_NUM_IN = 2)
Full nameShortDescription
DPLE_AaA matrices (horzcat when const_dim, diagcat otherwise) [a].
DPLE_VvV matrices (horzcat when const_dim, diagcat otherwise) [v].

Output scheme: casadi::DpleOutput (DPLE_NUM_OUT = 1)
Full nameShortDescription
DPLE_PpLyapunov matrix (horzcat when const_dim, diagcat otherwise) (Cholesky of P if pos_def) [p].

List of plugins

- slicot

Note: some of the plugins in this list might not be available on your system. Also, there might be extra plugins available to you that are not listed here. You can obtain their documentation with Dple.doc("myextraplugin")


slicot

An efficient solver for Discrete Periodic Lyapunov Equations using SLICOT

Uses Periodic Schur Decomposition ('psd') and does not assume positive definiteness. Based on Periodic Lyapunov equations: some applications and new algorithms. Int. J. Control, vol. 67, pp. 69-87, 1997.

Overview of the method: J. Gillis Practical Methods for Approximate Robust Periodic Optimal Control ofNonlinear Mechanical Systems, PhD Thesis, KULeuven, 2015

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


List of available options
IdTypeDescription
linear_solverOT_STRINGUser-defined linear solver class. Needed for sensitivities.
linear_solver_optionsOT_DICTOptions to be passed to the linear solver.
psd_num_zeroOT_DOUBLENumerical zero used in Periodic Schur decomposition with slicot.This option is needed when your systems has Floquet multiplierszero or close to zero
Author
Joris Gillis
Date
2013-2016

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

Function Documentation

◆ doc_dple()

CASADI_EXPORT std::string casadi::doc_dple ( const std::string &  name)

◆ dple_in() [1/2]

CASADI_EXPORT std::vector<std::string> casadi::dple_in ( )

◆ dple_in() [2/2]

CASADI_EXPORT std::string casadi::dple_in ( casadi_int  ind)

◆ dple_n_in()

CASADI_EXPORT casadi_int casadi::dple_n_in ( )

◆ dple_n_out()

CASADI_EXPORT casadi_int casadi::dple_n_out ( )

◆ dple_out() [1/2]

CASADI_EXPORT std::vector<std::string> casadi::dple_out ( )

◆ dple_out() [2/2]

CASADI_EXPORT std::string casadi::dple_out ( casadi_int  ind)

◆ dplesol() [1/4]

CASADI_EXPORT DMVector casadi::dplesol ( const DMVector A,
const DMVector V,
const std::string &  solver,
const Dict opts = Dict() 
)

◆ dplesol() [2/4]

CASADI_EXPORT MX casadi::dplesol ( const MX A,
const MX V,
const std::string &  solver,
const Dict opts = Dict() 
)

◆ dplesol() [3/4]

CASADI_EXPORT MXVector casadi::dplesol ( const MXVector A,
const MXVector V,
const std::string &  solver,
const Dict opts = Dict() 
)

◆ dplesol() [4/4]

CASADI_EXPORT Function casadi::dplesol ( const std::string &  name,
const std::string &  solver,
const SpDict st,
const Dict opts = Dict() 
)

◆ has_dple()

CASADI_EXPORT bool casadi::has_dple ( const std::string &  name)

◆ load_dple()

CASADI_EXPORT void casadi::load_dple ( const std::string &  name)