Skip to content

Commit

Permalink
return input options from post
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Mar 13, 2019
1 parent b81c820 commit 45d01f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ReachSets/ContinuousPost/BFFPSV18/BFFPSV18.jl
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ Calculate the reachable states of the given initial value problem using `BFFPSV1
- `invariant` -- constraint invariant on the mode
- `𝑂` -- algorithm-specific options
"""
function post(𝒫::BFFPSV18, 𝑆::AbstractSystem, invariant, 𝑂::Options)
𝑂 = TwoLayerOptions(merge(𝑂, 𝒫.options.specified), 𝒫.options.defaults)
function post(𝒫::BFFPSV18, 𝑆::AbstractSystem, invariant, 𝑂_input::Options)
𝑂 = TwoLayerOptions(merge(𝑂_input, 𝒫.options.specified), 𝒫.options.defaults)

# convert matrix
system = matrix_conversion(𝑆, 𝑂)
Expand All @@ -265,7 +265,7 @@ function post(𝒫::BFFPSV18, 𝑆::AbstractSystem, invariant, 𝑂::Options)
RsetsProj = Rsets
end

return ReachSolution(RsetsProj, 𝑂)
return ReachSolution(RsetsProj, 𝑂_input)

elseif 𝑂[:mode] == "check"
info("invariants are currently not supported in 'check' mode")
Expand All @@ -284,11 +284,11 @@ function post(𝒫::BFFPSV18, 𝑆::AbstractSystem, invariant, 𝑂::Options)

if answer == 0
info("The property is satisfied!")
return CheckSolution(true, -1, 𝑂)
return CheckSolution(true, -1, 𝑂_input)
else
info("The property may be violated at index $answer," *
" (time point $(answer * 𝑂[]))!")
return CheckSolution(false, answer, 𝑂)
return CheckSolution(false, answer, 𝑂_input)
end
else
error("unsupported mode $(𝑂[:mode])")
Expand Down
1 change: 1 addition & 0 deletions test/Reachability/solve_continuous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ X0 = BallInf(ones(4), 0.1)
# default options (computes all variables)
s = solve(IVP(LCS(A), X0), :T=>0.1)
@test dim(s.Xk[1].X) == 4
@test s.options isa Options

# two variables and custom partition
s = solve(IVP(LCS(A), X0),
Expand Down

0 comments on commit 45d01f9

Please sign in to comment.