Relaxation of Implicit Functions
High-Level Functions
McCormick.implicit_relax_h!
— Functionimplicit_relax_h!(d)
implicit_relax_h!(d, interval_bnds)
Compute relaxations of x(p)
defined by h(x,p) = 0
where h
is specifed as h(out, x, p)
.
Data Structures
McCormick.AbstractContractorMC
— Typeabstract type AbstractContractorMC
An abstract type for each manner of contractor using in the implicit function relaxation algorithms.
McCormick.NewtonGS
— Typestruct NewtonGS <: McCormick.AbstractContractorMC
The Gauss-Seidel implementation of the Newton contractor used in the implicit relaxation scheme.
McCormick.KrawczykCW
— Typestruct KrawczykCW <: McCormick.AbstractContractorMC
The componentwise implementation of the Krawczyk contractor used in the implicit relaxation scheme.
McCormick.AbstractPreconditionerMC
— Typeabstract type AbstractPreconditionerMC
An abstract type for each manner of preconditioner used in the implicit function relaxation algorithms.
McCormick.DenseMidInv
— Typestruct DenseMidInv{S<:VecOrMat{Float64}} <: McCormick.AbstractPreconditionerMC
A dense LU preconditioner for implicit McCormick relaxation.
McCormick.AbstractMCCallback
— Typeabstract type AbstractMCCallback
An abstract type for each manner of callback functions used in the implicit function relaxation algorithms.
McCormick.MCCallback
— Typemutable struct MCCallback{FH, FJ, C<:McCormick.AbstractContractorMC, PRE<:McCormick.AbstractPreconditionerMC, N, T<:RelaxTag, AMAT<:(AbstractMatrix)} <: AbstractMCCallback
A structure used to compute implicit relaxations.
h!::Any
: Function h(x,p) = 0 defined in place by h!(out,x,p)hj!::Any
: Jacobian of h(x,p) w.r.t xH::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
: Intermediate inplace storage for output of h!J::AbstractMatrix
: Intermediate inplace storage for output of hj!J0::Vector{AMAT} where AMAT<:(AbstractMatrix)
xz0::Vector{AMAT} where AMAT<:(AbstractMatrix)
xmid::Vector{Float64}
X::Vector{Interval{Float64}}
: State spacex
interval boundsP::Vector{Interval{Float64}}
: Decision spacep
interval boundsnx::Int64
: State space dimensionnp::Int64
: Decision space dimensionλ::Float64
: Convex combination parametereps::Float64
: Tolerance for interval equalitykmax::Int64
: Number of contractor steps to takepref_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
: Reference decision point at which affine relaxations are calculated (and used in subsequent calculations).p_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
: Decision point at which relaxation is evaluated.p_temp_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
: Vector used to temporarily store p in genexpansionparams! routine.x0_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
x_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
xa_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
xA_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
aff_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
z_mc::Array{MC{N, T}, 1} where {N, T<:RelaxTag}
contractor::McCormick.AbstractContractorMC
: Type of contractor used in implicit relaxation routine.preconditioner::McCormick.AbstractPreconditionerMC
: Preconditioner used in the implicit relaxation routine.apply_precond::Bool
: Boolean indicating that the preconditioner should be appliedparam::Array{Array{MC{N, T}, 1}, 1} where {N, T<:RelaxTag}
: Vector of relaxations ofx
at each iteration used to generated affine relaxations used in intermediate calculation.use_apriori::Bool
: Indicates that subgradient-based apriori relaxations of multiplication should be used.
Subroutines
McCormick.preconditioner_storage
— Functionpreconditioner_storage(x, t)
Creates storage corresponding to x::AbstractPreconditionerMC
and t::T where T<:RelaxTag
.
McCormick.affine_exp!
— Functionaffine_exp!(x, p, d)
Computates the affine relaxations of the state variable.
McCormick.correct_exp!
— Functioncorrect_exp!(d)
Corrects the relaxation of the state variable x_mc
if the affine relaxation,
McCormick.contract!
— FunctionPerforms a single step of the parametric method associated with t
assumes that the inputs have been preconditioned.
McCormick.precond_and_contract!
— Functionprecond_and_contract!(d!, k, b)
McCormick.final_cut
— Functionfinal_cut(x, y)
An operator that cuts the x
object using the y bounds
in a differentiable or nonsmooth fashion to achieve a composite relaxation within y
.
McCormick.gen_expansion_params!
— Functiongen_expansion_params!(d)
gen_expansion_params!(d, interval_bnds)
Constructs parameters need to compute relaxations of h
.
McCormick.populate_affine!
— Functionpopulate_affine!(d, interval_bnds)
Populates x_mc
, xa_mc
, xA_mc
, and z_mc
with affine bounds.