Engee documentation

Defining OptimizationProblems

The page is in the process of being translated.

SciMLBase.SciMLBase.OptimizationProblem(sys::System, op; kwargs...)
SciMLBase.SciMLBase.OptimizationProblem{iip}(sys::System, op; kwargs...)
SciMLBase.SciMLBase.OptimizationProblem{iip, specialize}(sys::System, op; kwargs...)

Build a SciMLBase.OptimizationProblem given a system sys and operating point op . iip is a boolean indicating whether the problem should be in-place. specialization is a SciMLBase.AbstractSpecalize subtype indicating the level of specialization of the SciMLBase.OptimizationFunction. The operating point should be an iterable collection of key-value pairs mapping variables/parameters in the system to the (initial) values they should take in SciMLBase.OptimizationProblem. Any values not provided will fallback to the corresponding default (if present).

Keyword arguments

  • eval_expression: Whether to compile any functions via eval or RuntimeGeneratedFunctions.

  • eval_module: If eval_expression == true, the module to eval into. Otherwise, the module in which to generate the RuntimeGeneratedFunction.

  • guesses: The guesses for variables in the system, used as initial values for the initialization problem.

  • warn_initialize_determined: Warn if the initialization system is under/over-determined.

  • initialization_eqs: Extra equations to use in the initialization problem.

  • fully_determined: Override whether the initialization system is fully determined.

  • use_scc: Whether to use SCCNonlinearProblem for initialization if the system is fully determined.

  • check_initialization_units: Enable or disable unit checks when constructing the initialization problem.

  • tofloat: Passed to varmap_to_vars when building the parameter vector of a non-split system.

  • u0_eltype: The eltype of the u0 vector. If nothing, finds the promoted floating point type from op.

  • u0_constructor: A function to apply to the u0 value returned from varmap_to_vars. to construct the final u0 value.

  • p_constructor: A function to apply to each array buffer created when constructing the parameter object.

  • warn_cyclic_dependency: Whether to emit a warning listing out cycles in initial conditions provided for unknowns and parameters.

  • circular_dependency_max_cycle_length: Maximum length of cycle to check for. Only applicable if warn_cyclic_dependency == true.

  • circular_dependency_max_cycles: Maximum number of cycles to check for. Only applicable if warn_cyclic_dependency == true.

  • substitution_limit: The number times to substitute initial conditions into each other to attempt to arrive at a numeric value.

  • check_compatibility: Whether to check if the given system sys contains all the information necessary to create a SciMLBase.OptimizationProblem and no more. If disabled, assumes that sys at least contains the necessary information.

  • expression: Val{true} to return an Expr that constructs the corresponding problem instead of the problem itself. Val{false} otherwise.

All other keyword arguments are forwarded to the SciMLBase.OptimizationFunction constructor.

Extended docs

The following API is internal and may change or be removed without notice. Its usage is highly discouraged.

  • build_initializeprob: If false, avoids building the initialization problem.

  • check_length: Whether to check the number of equations along with number of unknowns and length of u0 vector for consistency. If false, do not check with equations. This is forwarded to check_eqs_u0.

  • time_dependent_init: Whether to build a time-dependent initialization for the problem. A time-dependent initialization solves for a consistent u0, whereas a time-independent one only runs parameter initialization.

  • algebraic_only: Whether to build the initialization problem using only algebraic equations.

  • allow_incomplete: Whether to allow incomplete initialization problems.