Invariant Sets

Given a system described with MathematicalSystems.jl and HybridSystems.jl, an invariant set can be computed using the following function:

SwitchOnSafety.invariant_setsFunction
invariant_sets(system::AbstractHybridSystem, optimizer_constructor,
               set_variables::AbstractVector{<:SetProg.AbstractVariable};
               volume_heuristic = nth_root,
               infeasibility_certificates = nothing,
               verbose=1,
               λ=Dict{transitiontype(system), Float64}(),
               enabled = states(system))

Compute maximal invariant sets of the family set_variables for the modes of system using the solver provided by optimizer_constructor. The volume of the sets is estimated using volume_heuristic. If the program is infeasible, the certificates for each transition are stored in infeasibility_certificates. For the containment of non-homogeneous, the S-procedure might be a Bilinear Matrix Inequality (BMI) which is NP-hard to solve. To avoid that, provides the value of λ to use in the dictionary λ. To ignore some state and the transitions involving these states in the computation, give an enabled vector without them.

source
SwitchOnSafety.invariant_sets!Function
invariant_sets!(sets, modes_to_compute, system::AbstractHybridSystem,
                args...; kwargs...)

Similar to invariant_sets(system, args...; kwargs...) but stores the result in sets and only compute the modes in modes_to_compute. The other sets in enabled that are not in modes_to_compute are assumed to have the value given in sets.

source