DynamicBoundspODEsIneq.DifferentialInequality
— Typemutable struct DifferentialInequality{F, N, T<:McCormick.RelaxTag, PRB1<:SciMLBase.AbstractODEProblem, INT1, CB<:SciMLBase.AbstractContinuousCallback} <: DynamicBoundsBase.AbstractODERelaxIntegrator
The 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::Bool
calculate_subgradient::Bool
calculate_local_sensitivity::Bool
differentiable::Bool
event_soft_tol::Float64
params::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::Any
x0::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.AbstractODEProblem
relax_ode_integrator::Any
relax_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.AbstractContinuousCallback
integrator_state::DynamicBoundsBase.IntegratorStates
local_problem_storage::Any
np::Int64
nx::Int64
nt::Int64
relax_t_dict_flt::Dict{Float64, Int64}
relax_t_dict_indx::Dict{Int64, Int64}
polyhedral_constraint::Union{Nothing, DynamicBoundsBase.PolyhedralConstraint}
has_params::Bool
prob::DynamicBoundsBase.ODERelaxProb
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.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.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!::Any
Right-hand side function
nx::Int64
Number of state variables
nm::Int64
Dimensionality of polyhedral constraints.
np::Int64
Number of decision variables
p_mc::Vector{Z} where Z
Decision 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 Z
Input State Variable Temporary Storage
xout_mc::Vector{Z} where Z
Output 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::Bool
Indicates that relaxations should be computed.
calculate_subgradient::Bool
Indicates that subgradients should be computed (
calculate_relax
must betrue
).prng::UnitRange{Int64}
xrng::UnitRange{Int64}
polyhedral_constraint::Union{Nothing, DynamicBoundsBase.PolyhedralConstraint}
Polyhedral constraint used
has_apriori::Bool
Xapriori::Vector{IntervalArithmetic.Interval{Float64}}
params::Vector{Float64}
Constant value parameters
has_params::Bool
DynamicBoundspODEsIneq.polyhedral_contact!
— Methodpolyhedral_contact!
Contracts the state variable bounds based on the PolyhedralConstraint
.