Concrete Solution Types
Concrete solution types store solver results and implement the array and field contracts described by the SciML solution interface. Constructors for these types are primarily used by solver packages through build_solution.
Algebraic Solutions
SciMLBase.LinearSolution — Type
struct LinearSolution{T, N, uType, R, A, C, S} <: SciMLBase.AbstractLinearSolution{T, N}Representation of the solution to an linear system Ax=b defined by a LinearProblem
Fields
u: the representation of the linear solve's solution.resid: the residual of the solver, if the method is an iterative method. Returns a mutable type, thus if scalar it is wrapped in aRef.alg: the algorithm type used by the solver.iters: the number of iterations used to solve the equation, if the method is an iterative method.retcode: the return code from the solver. Used to determine whether the solver solved successfully or whether it exited due to an error. For more details, see the return code documentation.cache: theLinearCacheobject containing the solver's internal cached variables. This is given to allow continuation of solver usage, for example, solvingAx=bwith the sameAand a newbwithout refactorizingA. See the caching interface tutorial for details on how to use thecacheeffectively: https://docs.sciml.ai/LinearSolve/stable/tutorials/caching_interfacestats: statistics of the solver, such as the number of function evaluations required.
SciMLBase.EigenvalueSolution — Type
struct EigenvalueSolution{T, N, U, V, P, A, R, S} <: SciMLBase.AbstractEigenvalueSolution{T, N}Representation of the solution to an eigenvalue problem defined by an EigenvalueProblem.
Fields
u: the computed eigenvalues.vectors: the corresponding eigenvectors, stored as the columns of a matrix.prob: theEigenvalueProblemthat was solved.alg: the algorithm type used by the solver.retcode: the return code from the solver. Used to determine whether the solver solved successfully or whether it exited due to an error. For more details, see the return code documentation.resid: the residual(s) of the computed eigenpairs, if provided by the solver.stats: statistics of the solver, if provided.
SciMLBase.NonlinearSolution — Type
struct NonlinearSolution{T, N, uType, R, P, A, O, uType2, S, Tr} <: SciMLBase.AbstractNonlinearSolution{T, N}Representation of the solution to a nonlinear equation defined by a NonlinearProblem, or the steady state solution to a differential equation defined by a SteadyStateProblem.
Fields
u: the representation of the nonlinear equation's solution.resid: the residual of the solution.prob: the original NonlinearProblem/SteadyStateProblem that was solved.alg: the algorithm type used by the solver.original: if the solver is wrapped from an alternative solver ecosystem, such as NLsolve.jl, then this is the original return from said solver library.retcode: the return code from the solver. Used to determine whether the solver solved successfully or whether it exited due to an error. For more details, see the return code documentation.left: if the solver is bracketing method, this is the final left bracket value.right: if the solver is bracketing method, this is the final right bracket value.stats: statistics of the solver, such as the number of function evaluations required.
SciMLBase.SteadyStateSolution — Type
SteadyStateSolutionAlias for NonlinearSolution, the concrete solution type returned for SteadyStateProblem solves. It follows the nonlinear solution field and array interfaces; the stored prob identifies the result as a steady-state solve.
SciMLBase.IntegralSolution — Type
struct IntegralSolution{T, N, uType, R, P, A, C, S} <: SciMLBase.AbstractIntegralSolution{T, N}Representation of the solution to an quadrature integral_lb^ub f(x) dx defined by a IntegralProblem
Fields
u: the representation of the optimization's solution.resid: the residual of the solver.alg: the algorithm type used by the solver.retcode: the return code from the solver. Used to determine whether the solver solved successfully or whether it exited due to an error. For more details, see the return code documentation.chi: the variance estimate of the estimator from Monte Carlo quadrature methods.stats: statistics of the solver, such as the number of function evaluations required.
SciMLBase.OptimizationSolution — Type
struct OptimizationSolution{T, N, uType, C<:SciMLBase.AbstractOptimizationCache, A, OV, O, ST, DType} <: SciMLBase.AbstractOptimizationSolution{T, N}Representation of the solution to a non-linear optimization defined by an OptimizationProblem.
Fields
u: the representation of the optimization's solution.alg: the algorithm type used by the solver.objective: Objective value of the solutionretcode: the return code from the solver. Used to determine whether the solver solved successfully or whether it exited due to an error. For more details, see the return code documentation.original: if the solver is wrapped from a external solver, e.g. Optim.jl, then this is the original return from said solver library.stats: statistics of the solver, such as the number of function evaluations required.dual: dual multipliers, one vector per constraint in constraint order, ornothing. GeneralOptimizationProblemsolves leave thisnothing; aConvexOptimizationProblemsolved by a conic backend populates it as the optimality certificate. Its type is fixed at solve time by thecalculate_dualkeyword (Val(true)/Val(false)/Val(nothing)) so switching problem types stays type-stable — seedefault_calculate_dual.
Internal Fields
cache::AbstractOptimizationCache: the optimization cache that was solved.
Interface
OptimizationSolution is a SciMLBase.AbstractNoTimeSolution. For more information on the SciML solution interfaces, check out the SciML Solution Interface documentation page
SciMLBase.default_calculate_dual — Function
default_calculate_dual(prob)Whether solve computes dual multipliers by default for problem prob, returned as a Val: Val(false) for a general OptimizationProblem (a local NLP solve has no duals to report), and Val(true) for a ConvexOptimizationProblem (convex duals are a first-class optimality certificate, so they are on by default). A DCP router that decides convex-vs-NLP at runtime should pass Val(nothing) to get the type-stable Union dual field.
Differential Equation Solutions
SciMLBase.ODESolution — Type
struct ODESolution{T, N, uType, uType2, DType, tType, rateType, discType, P, A, IType, S, AC<:Union{Nothing, Vector{Int64}}, R, O, V, GE} <: SciMLBase.AbstractODESolution{T, N, uType}Representation of the solution to an ordinary differential equation defined by an ODEProblem.
DESolution Interface
For more information on interacting with DESolution types, check out the Solution Handling page of the DifferentialEquations.jl documentation.
https://docs.sciml.ai/DiffEqDocs/stable/basics/solution/
Fields
u: the representation of the ODE solution. Given as an array of solutions, whereu[i]corresponds to the solution at timet[i]. It is recommended in most cases one does not accesssol.udirectly and instead use the array interface described in the Solution Handling page of the DifferentialEquations.jl documentation.t: the time points corresponding to the saved values of the ODE solution.prob: the original ODEProblem that was solved.alg: the algorithm type used by the solver.stats: statistics of the solver, such as the number of function evaluations required, number of Jacobians computed, and more.retcode: the return code from the solver. Used to determine whether the solver solved successfully, whether it terminated early due to a user-defined callback, or whether it exited due to an error. For more details, see the return code documentation.global_error: an estimate of the global (accumulated) error of the solution, ornothingwhen the algorithm does not compute one (seehas_global_error). When present it is an array matchingu, withglobal_error[i]the estimated global error ofu[i]att[i].
SciMLBase.RODESolution — Type
struct RODESolution{T, N, uType, uType2, DType, tType, randType, discType, P, A, IType, S, AC<:Union{Nothing, Vector{Int64}}, V} <: SciMLBase.AbstractRODESolution{T, N, uType}Representation of the solution to an stochastic differential equation defined by an SDEProblem, or of a random ordinary differential equation defined by an RODEProblem.
DESolution Interface
For more information on interacting with DESolution types, check out the Solution Handling page of the DifferentialEquations.jl documentation.
https://docs.sciml.ai/DiffEqDocs/stable/basics/solution
Fields
u: the representation of the SDE or RODE solution. Given as an array of solutions, whereu[i]corresponds to the solution at timet[i]. It is recommended in most cases one does not accesssol.udirectly and instead use the array interface described in the Solution Handling page of the DifferentialEquations.jl documentation.t: the time points corresponding to the saved values of the ODE solution.W: the representation of the saved noise process from the solution. See the Noise Processes page of the DifferentialEquations.jl. Note that this noise is only saved in full ifsave_noise=truein the solver.prob: the original SDEProblem/RODEProblem that was solved.alg: the algorithm type used by the solver.stats: statistics of the solver, such as the number of function evaluations required, number of Jacobians computed, and more.retcode: the return code from the solver. Used to determine whether the solver solved successfully, whether it terminated early due to a user-defined callback, or whether it exited due to an error. For more details, see the return code documentation.
SciMLBase.DAESolution — Type
struct DAESolution{T, N, uType, duType, uType2, DType, tType, P, A, ID, S, rateType, V} <: SciMLBase.AbstractDAESolution{T, N, uType}Representation of the solution to an differential-algebraic equation defined by an DAEProblem.
DESolution Interface
For more information on interacting with DESolution types, check out the Solution Handling page of the DifferentialEquations.jl documentation.
https://docs.sciml.ai/DiffEqDocs/stable/basics/solution/
Fields
u: the representation of the DAE solution. Given as an array of solutions, whereu[i]corresponds to the solution at timet[i]. It is recommended in most cases one does not accesssol.udirectly and instead use the array interface described in the Solution Handling page of the DifferentialEquations.jl documentation.du: the representation of the derivatives of the DAE solution.t: the time points corresponding to the saved values of the DAE solution.prob: the original DAEProblem that was solved.alg: the algorithm type used by the solver.stats: statistics of the solver, such as the number of function evaluations required, number of Jacobians computed, and more.retcode: the return code from the solver. Used to determine whether the solver solved successfully, whether it terminated early due to a user-defined callback, or whether it exited due to an error. For more details, see the return code documentation.