Skip to content

Commit 2e8e074

Browse files
authored
Merge pull request #431 from JuliaReach/schillic/interval
More robustness to IntervalArithmetic changes
2 parents 6f73d46 + 26b2d89 commit 2e8e074

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

models/InvertedPendulum/InvertedPendulum.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ function InvertedPendulum_spec(verification::Bool)
9696

9797
function predicate_set_safe(R)
9898
t = tspan(R)
99-
return t.hi <= 0.5 ||
99+
return sup(t) <= 0.5 ||
100100
isdisjoint(overapproximate(R, Hyperrectangle), unsafe_states)
101101
end
102102

103103
function predicate_safe(sol; silent::Bool=false)
104104
for F in sol
105105
t = tspan(F)
106-
if t.hi <= 0.5
106+
if sup(t) <= 0.5
107107
continue
108108
end
109109
for R in F
@@ -118,14 +118,14 @@ function InvertedPendulum_spec(verification::Bool)
118118

119119
function predicate_set_unsafe(R)
120120
t = tspan(R)
121-
return t.lo >= 0.5 && t.hi <= 1.0 &&
121+
return inf(t) >= 0.5 && sup(t) <= 1.0 &&
122122
overapproximate(R, Hyperrectangle) unsafe_states
123123
end
124124

125125
function predicate_unsafe(sol; silent::Bool=false)
126126
for F in sol
127127
t = tspan(F)
128-
if t.hi < 0.5
128+
if sup(t) < 0.5
129129
continue
130130
end
131131
for R in F

src/solve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function _solve_one(R, X₀, W₀, S, t0, t1, algorithm_plant, reconstruction_me
225225
# get new control inputs from the controller
226226
U = controller_forward(algorithm_controller, controller, X₀, preprocessing, postprocessing)
227227

228-
dt = t0 .. t1
228+
dt = interval(t0, t1)
229229

230230
# split control inputs
231231
sols = Flowpipe[]

0 commit comments

Comments
 (0)