Skip to content

Commit

Permalink
Merge pull request #224 from JuliaReach/schillic/SP
Browse files Browse the repository at this point in the history
Use new SpaceExParser/LazySets interface
  • Loading branch information
schillic authored Jun 28, 2024
2 parents e471ca7 + e42453f commit 5bef061
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions models/ARCH/AFF/Powertrain/old/runSXDriveTrain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using ReachabilityBenchmarks
using HybridSystems, MathematicalSystems, LazySets, Plots
import Polyhedra
using SpaceExParser: is_halfspace, is_hyperplane, convert, parse_sxmath, Basic, readsxmodel
using SpaceExParser: parse_sxmath, Basic, readsxmodel

HS = readsxmodel(@current_path "drivetrain_theta1_5percent_flat_manually.xml")

Expand All @@ -25,10 +25,10 @@ expr = [x1, x2, x3, x4, x5, x6, x7, x8, x9, t]
x0sets = []
vars = Basic[:x1, :x2, :x3, :x4, :x5, :x6, :x7, :x8, :x9, :t]
for expr_i in expr_p
if is_halfspace(expr_i)
push!(x0sets, convert(HalfSpace, expr_i; vars=vars))
elseif is_hyperplane(expr_i)
push!(x0sets, convert(Hyperplane, expr_i; vars=vars))
if LazySets.is_halfspace(expr_i)
push!(x0sets, LazySets.convert(HalfSpace, expr_i; vars=vars))
elseif LazySets.is_hyperplane(expr_i)
push!(x0sets, LazySets.convert(Hyperplane, expr_i; vars=vars))
end
end

Expand Down
10 changes: 5 additions & 5 deletions models/FilteredOscillator/SX/runSX_filtered_oscillator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using ReachabilityBenchmarks
using HybridSystems, MathematicalSystems, LazySets, Plots
import Polyhedra
using SpaceExParser: is_halfspace, is_hyperplane, convert, parse_sxmath, Basic, readsxmodel
using SpaceExParser: parse_sxmath, Basic, readsxmodel

AFFINE_SYSTEM = ConstrainedLinearControlContinuousSystem
HS = readsxmodel(@current_path "filtered_oscillator_flattened.xml"; ST=AFFINE_SYSTEM)
Expand All @@ -14,10 +14,10 @@ expr_p = parse_sxmath("0.2<=x & x<=0.3 & -0.1<=y & y<=0.1 & z==0 & x1==0 & x2==0
x0sets = []
vars = Basic[:x, :y, :x1, :x2, :x3, :z]
for expr_i in expr_p
if is_halfspace(expr_i)
push!(x0sets, convert(HalfSpace, expr_i; vars=vars))
elseif is_hyperplane(expr_i)
push!(x0sets, convert(Hyperplane, expr_i; vars=vars))
if LazySets.is_halfspace(expr_i)
push!(x0sets, LazySets.convert(HalfSpace, expr_i; vars=vars))
elseif LazySets.is_hyperplane(expr_i)
push!(x0sets, LazySets.convert(Hyperplane, expr_i; vars=vars))
end
end

Expand Down

0 comments on commit 5bef061

Please sign in to comment.