diff --git a/core/MarkovProcesses.jl b/core/MarkovProcesses.jl
index 26aafb06fa0cedf3dbc14fe4c75dbf59ee489f08..d971b8013d6ccaa4d7352ec195d0066b7737d3b7 100644
--- a/core/MarkovProcesses.jl
+++ b/core/MarkovProcesses.jl
@@ -30,7 +30,7 @@ export get_index, get_value, length_var, isaccepted
 export simulate, volatile_simulate
 export distribute_mean_value_lha, mean_value_lha, distribute_prob_accept_lha
 export set_param!, set_x0!, set_time_bound!, set_observed_var!, observe_all!
-export get_param, getproperty, get_proba_model, get_observed_var
+export get_param, get_x0, getproperty, get_proba_model, get_observed_var
 export isbounded, isaccepted, check_consistency
 export draw_model!, draw!, fill!, prior_pdf!, prior_pdf, insupport
 
diff --git a/core/model.jl b/core/model.jl
index f4a117b3e5d94563ed85be86df0ce763522a7262..7857f9387ad28a9ed1f6e8f2da35f3f0b684626c 100644
--- a/core/model.jl
+++ b/core/model.jl
@@ -465,6 +465,17 @@ function set_param!(am::Model, l_name_p::Vector{ParameterModel}, p::Vector{Float
         set_param!(m, l_name_p[i], p[i])
     end
 end
+function set_x0!(am::Model, l_name_var::Vector{VariableModel}, x0::Vector{Int})
+    m = get_proba_model(am)
+    @assert length(l_name_var) == length(x0) "State names vector state values haven't the same dimensions"
+    for i = eachindex(l_name_var)
+        set_x0!(m, l_name_var[i], x0[i])
+    end
+end
+function set_x0!(am::Model, name_var::VariableModel, var_i::Int) 
+    m = get_proba_model(am)
+    m.x0[m.map_var_idx[name_var]] = var_i
+end
 function set_x0!(am::Model, new_x0::Vector{Int})
     m = get_proba_model(am)
     @assert length(new_x0) == m.dim_state "New x0 vector hasn't the dimension of state space"
@@ -472,8 +483,8 @@ function set_x0!(am::Model, new_x0::Vector{Int})
 end
 set_time_bound!(am::Model, b::Float64) = (get_proba_model(am).time_bound = b)
 
-
 get_param(am::Model) = get_proba_model(am).p
+get_x0(am::Model) = get_proba_model(am).x0
 function getindex(am::Model, name_p::ParameterModel)
     m = get_proba_model(am)
     m.p[m.map_param_idx[name_p]]