Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions models/InvertedPendulum/InvertedPendulum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ function InvertedPendulum_spec(verification::Bool)

function predicate_set_safe(R)
t = tspan(R)
return t.hi <= 0.5 ||
return sup(t) <= 0.5 ||
isdisjoint(overapproximate(R, Hyperrectangle), unsafe_states)
end

function predicate_safe(sol; silent::Bool=false)
for F in sol
t = tspan(F)
if t.hi <= 0.5
if sup(t) <= 0.5
continue
end
for R in F
Expand All @@ -118,14 +118,14 @@ function InvertedPendulum_spec(verification::Bool)

function predicate_set_unsafe(R)
t = tspan(R)
return t.lo >= 0.5 && t.hi <= 1.0 &&
return inf(t) >= 0.5 && sup(t) <= 1.0 &&
overapproximate(R, Hyperrectangle) ⊆ unsafe_states
end

function predicate_unsafe(sol; silent::Bool=false)
for F in sol
t = tspan(F)
if t.hi < 0.5
if sup(t) < 0.5
continue
end
for R in F
Expand Down
2 changes: 1 addition & 1 deletion src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function _solve_one(R, X₀, W₀, S, t0, t1, algorithm_plant, reconstruction_me
# get new control inputs from the controller
U = controller_forward(algorithm_controller, controller, X₀, preprocessing, postprocessing)

dt = t0 .. t1
dt = interval(t0, t1)

# split control inputs
sols = Flowpipe[]
Expand Down
Loading