DynamicBoundspODEsIneq.jl: Continuous-time relaxations/bounds of nonlinear parametric differential equations
Callback functions used in constructing the continuous time differential inequalities.
DynamicBoundspODEsIneq.DifferentialInequalityCond — TypeDifferentialInequalityCond <: Function
A functor (<: Function) used to check for an event were a relaxation ODE crosses the an interval bound ODE. The functor is called using (d::DifferentialInequalityCond)(g, x, t, integrator). The p field of the integrator hold parameter values in components 1, ..., np. Components np + 1, ..., 2np are a flag is indicating a positive crossing. Components 2np + 1, ..., 3*np are a flag is indicating a negative crossing.
DynamicBoundspODEsIneq.DifferentialInequalityAffect — TypeDifferentialInequalityAffect <: Function
A functor (<: Function) that sets an indicator parameter to zero if a positive event crossing occurs.
DynamicBoundspODEsIneq.DifferentialInequalityAffectNeg — TypeDifferentialInequalityAffectNeg <: Function
A functor (<: Function) that sets an indicator parameter to zero if a negative event crossing occurs.
DynamicBoundspODEsIneq.DifferentialInequalityf — TypeDifferentialInequalityf{Z, F} <: Function
A functor (<: Function) used to evaluate the r.h.s of the differential inequality. The following constructor is used to initialize it: DifferentialInequalityf(f!, Z, nx, np, P, relax, subgrad, polyhedral_constraint, Xapriori).
f!::AnyRight-hand side function
nx::Int64Number of state variables
nm::Int64Dimensionality of polyhedral constraints.
np::Int64Number of decision variables
p_mc::Vector{Z} where ZDecision variable relaxation storage
P::Vector{IntervalArithmetic.Interval{Float64}}Decision variable interval bounds
X::Vector{IntervalArithmetic.Interval{Float64}}Constraint state variable interval bounds
x_mc::Vector{Z} where ZInput State Variable Temporary Storage
xout_mc::Vector{Z} where ZOutput State Variable Temporary Storage
BetaL::Vector{IntervalArithmetic.Interval{Float64}}Temporary Storage for Lower Beta
BetaU::Vector{IntervalArithmetic.Interval{Float64}}Temporary Storage for Upper Beta
xout_intv1::Vector{IntervalArithmetic.Interval{Float64}}Temporary Storage
xout_intv2::Vector{IntervalArithmetic.Interval{Float64}}Temporary Storage
calculate_relax::BoolIndicates that relaxations should be computed.
calculate_subgradient::BoolIndicates that subgradients should be computed (
calculate_relaxmust betrue).prng::UnitRange{Int64}xrng::UnitRange{Int64}polyhedral_constraint::Union{Nothing, PolyhedralConstraint}Polyhedral constraint used
has_apriori::BoolXapriori::Vector{IntervalArithmetic.Interval{Float64}}params::Vector{Float64}Constant value parameters
has_params::Bool
Integrator used for constructing continuous time differential inequality bounds/relaxations.
DynamicBoundspODEsIneq.DifferentialInequality — Typemutable struct DifferentialInequality{F, N, T<:McCormick.RelaxTag, PRB1<:SciMLBase.AbstractODEProblem, INT1, CB<:SciMLBase.AbstractContinuousCallback} <: AbstractODERelaxIntegratorThe DifferentialInequality type integrator represents the relaxed pODE problem as a 2nx dimension ODE problem if calculate_relax is false, a 4nx dimension ODE problem if calculate_relax is true and 4*nx + 4*np*nx if calculate_subgradients is also set to true.
x[1:nx]are the lower interval boundsx[(1+nx):2*nx]are upper interval boundsx[(1+2*nx):3*nx]are convex relaxations (computed if calculate_relax = true)x[(1+3*nx):4*nx]are concave relaxations (computed if calculate_relax = true)x[(1+4*nx):(4+np)*nx]are subgradients of the convex relaxations (computed if calculate_subgradients = true)x[(1+(4+np)*nx):(4+2*np)*nx]are subgradients of the concave relaxations (computed if calculate_subgradients = true)
The first np parameter values correspond to the parameter values in the original problem. If (calculate_relax == true) then (np+1):(np+nx) parameter values correspond to the b_i^c variables used to detect a relaxation crossing a lower state bound. The (np+nx+1):(np+nx) parameter values correspond to the b_i^C variables used to detect a relaxation crossing a upper state bound. The variables are floats but are valued 0.0 and 1.0 and can be intepreted as the corresponding 0-1 Boolean values. Otherwise, only np parameter values are used.
calculate_relax::Boolcalculate_subgradient::Boolcalculate_local_sensitivity::Booldifferentiable::Boolevent_soft_tol::Float64params::Vector{Float64}p::Vector{Float64}pL::Vector{Float64}pU::Vector{Float64}p_mc::Array{McCormick.MC{N, T}, 1} where {N, T<:McCormick.RelaxTag}x0f::Anyx0::Vector{Float64}x0_mc::Array{McCormick.MC{N, T}, 1} where {N, T<:McCormick.RelaxTag}xL::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}xU::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}relax_ode_prob::SciMLBase.AbstractODEProblemrelax_ode_integrator::Anyrelax_t::Vector{Float64}relax_lo::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}relax_hi::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}relax_cv::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}relax_cc::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}relax_cv_grad::ElasticArrays.ElasticArray{StaticArrays.SVector{N, Float64}, 2, 1, V} where {N, V<:DenseArray{StaticArrays.SVector{N, Float64}, 1}}relax_cc_grad::ElasticArrays.ElasticArray{StaticArrays.SVector{N, Float64}, 2, 1, V} where {N, V<:DenseArray{StaticArrays.SVector{N, Float64}, 1}}relax_mc::ElasticArrays.ElasticArray{McCormick.MC{N, T}, 2, 1, V} where {N, T<:McCormick.RelaxTag, V<:DenseArray{McCormick.MC{N, T}, 1}}vector_callback::SciMLBase.AbstractContinuousCallbackintegrator_state::IntegratorStateslocal_problem_storage::Anynp::Int64nx::Int64nt::Int64relax_t_dict_flt::Dict{Float64, Int64}relax_t_dict_indx::Dict{Int64, Int64}polyhedral_constraint::Union{Nothing, PolyhedralConstraint}has_params::Boolprob::ODERelaxProb