Skip to content
Snippets Groups Projects
Commit c6e0cefc authored by Bentriou Mahmoud's avatar Bentriou Mahmoud
Browse files

small fix in synchronisation

parent dbaccafa
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,7 @@ function _get_edge_index(edge_candidates::Vector{Edge}, nbr_candidates::Int, ...@@ -135,7 +135,7 @@ function _get_edge_index(edge_candidates::Vector{Edge}, nbr_candidates::Int,
edge = edge_candidates[i] edge = edge_candidates[i]
# Asynchronous edge detection: we fire it # Asynchronous edge detection: we fire it
if getfield(edge, :transitions)[1] == nothing if getfield(edge, :transitions)[1] == nothing
return (i, bool_event) return (i, detected_event)
end end
# Synchronous detection # Synchronous detection
if !detected_event && tr_nplus1 != nothing if !detected_event && tr_nplus1 != nothing
...@@ -269,10 +269,11 @@ function next_state!(Snplus1::StateLHA, A::LHA, ...@@ -269,10 +269,11 @@ function next_state!(Snplus1::StateLHA, A::LHA,
end end
# For tests purposes # For tests purposes
function read_trajectory(A::LHA, σ::Trajectory; verbose = false) function read_trajectory(A::LHA, σ::AbstractTrajectory; verbose = false)
@assert (σ.m).dim_state == σ.m.dim_obs_state # Model should be entirely obserbed proba_model = get_proba_model(σ.m)
A_new = LHA(A, (σ.m)._map_obs_var_idx) @assert proba_model.dim_state == proba_model.dim_obs_state # Model should be entirely obserbed
p_sim = (σ.m).p A_new = LHA(A, proba_model._map_obs_var_idx)
p_sim = proba_model.p
l_t = times(σ) l_t = times(σ)
l_tr = transitions(σ) l_tr = transitions(σ)
Sn = init_state(A_new, σ[1], l_t[1]) Sn = init_state(A_new, σ[1], l_t[1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment