From 4221647a7795c70ce4ebf5db340c176a6279a9fc Mon Sep 17 00:00:00 2001 From: Mahmoud Bentriou <mahmoud.bentriou@centralesupelec.fr> Date: Wed, 3 Feb 2021 02:35:05 +0100 Subject: [PATCH] small fix when x0 is absorbing for automaton G F --- automata/automaton_G_and_F.jl | 3 ++- tests/cosmos/distance_G_F/dist_G_F_ER.lha | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/automata/automaton_G_and_F.jl b/automata/automaton_G_and_F.jl index bb8c74a..a9f7311 100644 --- a/automata/automaton_G_and_F.jl +++ b/automata/automaton_G_and_F.jl @@ -268,7 +268,8 @@ function create_automaton_G_and_F(m::ContinuousTimeModel, x1::Float64, x2::Float @everywhere $(func_name(:cc, :l3F, :l2F, 1))(S::StateLHA, x::Vector{Int}, p::Vector{Float64}) = (getfield(S, :time) >= $t4 || istrue(getfield(S, :values)[$(idx_var_isabs)])) @everywhere $(func_name(:us, :l3F, :l2F, 1))(S::StateLHA, x::Vector{Int}, p::Vector{Float64}) = - (setfield!(S, :loc, Symbol("l2F"))) + (setfield!(S, :loc, Symbol("l2F")); + setindex!(getfield(S, :values), getfield(S, :values)[$(idx_var_d)] + getfield(S, :values)[$(idx_var_dprime)], $(idx_var_d))) end eval(meta_elementary_functions) diff --git a/tests/cosmos/distance_G_F/dist_G_F_ER.lha b/tests/cosmos/distance_G_F/dist_G_F_ER.lha index 52d478b..e7c71a3 100644 --- a/tests/cosmos/distance_G_F/dist_G_F_ER.lha +++ b/tests/cosmos/distance_G_F/dist_G_F_ER.lha @@ -76,8 +76,8 @@ Edges={ ((l3F,l1F), ALL, t>=0, {n=P,test_abs=k_1*(E*S)+(k_2+k_3)*ES}); -((l3F,l2F), #, t>=t4, {dprime=d+dprime}); -((l3F,l2F), #, test_abs=0, {dprime=d+dprime}); +((l3F,l2F), #, t>=t4, {d=d+dprime}); +((l3F,l2F), #, test_abs=0, {d=d+dprime}); %((l1G,l2G), #, in=1 & t>=t2, #); -- GitLab