OptimizationFunction
|
The page is in the process of being translated. |
#
SciMLBase.OptimizationFunction — Type
SciMLBase.OptimizationFunction(sys::System; kwargs...)
SciMLBase.OptimizationFunction{iip}(sys::System; kwargs...)
SciMLBase.OptimizationFunction{iip, specialize}(sys::System; kwargs...)
Create a SciMLBase.OptimizationFunction from the given sys. iip is a boolean indicating whether the function should be in-place. specialization is a SciMLBase.AbstractSpecalize subtype indicating the level of specialization of the SciMLBase.OptimizationFunction.
Beyond the arguments listed below, this constructor accepts all keyword arguments supported by the DifferentialEquations.jl solve function. For a complete list and detailed descriptions, see the DifferentialEquations.jl solve documentation.
Keyword arguments
-
u0: Theu0vector for the corresponding problem, if available. Can be obtained usingModelingToolkit.get_u0. -
p: The parameter object for the corresponding problem, if available. Can be obtained usingModelingToolkit.get_p. -
eval_expression: Whether to compile any functions viaevalorRuntimeGeneratedFunctions. -
eval_module: Ifeval_expression == true, the module toevalinto. Otherwise, the module in which to generate theRuntimeGeneratedFunction. -
checkbounds: Whether to enable bounds checking in the generated code. -
simplify: Whether tosimplifyany symbolically computed jacobians/hessians/etc. -
cse: Whether to enable Common Subexpression Elimination (CSE) on the generated code. This typically improves performance of the generated code but reduces readability. -
sparse: Whether to generate jacobian/hessian/etc. functions that return/operate on sparse matrices. Also controls whether the mass matrix is sparse, wherever applicable. -
check_compatibility: Whether to check if the given systemsyscontains all the information necessary to create aSciMLBase.OptimizationFunctionand no more. If disabled, assumes thatsysat least contains the necessary information. -
expression:Val{true}to return anExprthat constructs the corresponding problem instead of the problem itself.Val{false}otherwise. -
jac: Whether to symbolically compute and generate code for the jacobian function. -
grad: Whether the symbolically compute and generate code for the gradient of the cost function with respect to unknowns. -
hess: Whether to symbolically compute and generate code for the hessian function. -
cons_h: Whether to symbolically compute and generate code for the hessian function of constraints. Since the constraint function is vector-valued, the hessian is a vector of hessian matrices. -
cons_j: Whether to symbolically compute and generate code for the jacobian function of constraints. -
sparsity: Whether to provide symbolically compute and provide sparsity patterns for the jacobian/hessian/etc. -
cons_sparse: Identical to thesparsekeyword, but specifically for jacobian/hessian functions of the constraints. -
kwargs...: Additional keyword arguments passed to the solver
All other keyword arguments are forwarded to the SciMLBase.OptimizationFunction struct constructor.