Commit 4293febb authored by Bentriou Mahmoud's avatar Bentriou Mahmoud

small change in flow automata

parent dc5689b5
......@@ -26,8 +26,8 @@ function create_automaton_F(m::ContinuousTimeModel, x1::Float64, x2::Float64, t1
## Invariant predicates
@everywhere true_inv_predicate(x::Vector{Int}) = true
Λ_F = Dict(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate),
:l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate))
Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate),
:l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate))
## Init and final loc
locations_init = [:l0]
......
......@@ -26,9 +26,9 @@ function create_automaton_G(m::ContinuousTimeModel, x1::Float64, x2::Float64, t1
# Invariant predicates
@everywhere true_inv_predicate(x::Vector{Int}) = true
Λ_F = Dict(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate),
:l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate),
:l4 => getfield(Main, :true_inv_predicate))
Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate),
:l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate),
:l4 => getfield(Main, :true_inv_predicate))
## Init and final loc
locations_init = [:l0]
......
......@@ -26,8 +26,8 @@ function create_euclidean_distance_automaton(m::ContinuousTimeModel, timeline::A
## Invariant predicates
@everywhere true_inv_predicate(x::Vector{Int}) = true
Λ_F = Dict{Symbol,Function}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate),
:l2 => getfield(Main, :true_inv_predicate))
Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate),
:l2 => getfield(Main, :true_inv_predicate))
## Init and final loc
locations_init = [:l0]
......
......@@ -29,7 +29,7 @@ function create_euclidean_distance_automaton_2(m::ContinuousTimeModel, timeline:
## Invariant predicates
@everywhere true_inv_predicate(x::Vector{Int}) = true
Λ_F = Dict{Location, Function}()
Λ_F = Dict{Location,InvariantPredicateFunction}()
for loc in locations
Λ_F[loc] = getfield(Main, :true_inv_predicate)
end
......
......@@ -48,9 +48,9 @@ function create_period_automaton(m::ContinuousTimeModel, L::Float64, H::Float64,
@everywhere mid_predicate(x::Vector{Int}) = $L < x[$(Meta.quot(idx_sym_obs))] < $H
@everywhere high_predicate(x::Vector{Int}) = x[$(Meta.quot(idx_sym_obs))] >= $H
Λ_F = Dict(:l0 => getfield(Main, :true_predicate), :l0prime => getfield(Main, :not_low_predicate),
:low => getfield(Main, :low_predicate), :mid => getfield(Main, :mid_predicate),
:high => getfield(Main, :high_predicate), :final => getfield(Main, :true_predicate))
Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_predicate), :l0prime => getfield(Main, :not_low_predicate),
:low => getfield(Main, :low_predicate), :mid => getfield(Main, :mid_predicate),
:high => getfield(Main, :high_predicate), :final => getfield(Main, :true_predicate))
## Init and final loc
locations_init = [:l0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment