Skip to content

Commit

Permalink
minor change to to get relevant vars more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
kpotomkin committed Jul 15, 2019
1 parent ea42af4 commit fe55b73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ReachSets/ContinuousPost/BFFPS19/BFFPS19.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function init!(𝒫::BFFPS19, 𝑆::AbstractSystem, 𝑂::Options)
out_vars = opD.options[:out_vars]
loc_id = 𝒫.options[:loc_id]
temp_vars = unique([out_vars; constrained_dims[loc_id]])
temp_vars = get_vars(𝑂validated[:partition], temp_vars)
temp_vars = get_variables_from_relevant_blocks(𝑂validated[:partition], temp_vars)
opD.options[:temp_vars] = temp_vars
guards_constraints = [guard(HS, trans) for trans in out_transitions(HS, loc_id)]
𝑂validated[:vars] = temp_vars
Expand Down Expand Up @@ -263,10 +263,10 @@ function post(𝒫::BFFPS19, 𝑆::AbstractSystem, 𝑂_input::Options)
return ReachSolution(RsetsProj, 𝑂_input)
end

function get_vars(partition, vars)
function get_variables_from_relevant_blocks(partition, vars)
result = Vector{Int}()
for ur in partition
if any(v vars for v in collect(ur))
if any(v ur for v in vars)
append!(result, collect(ur))
end
end
Expand Down

0 comments on commit fe55b73

Please sign in to comment.