From b5ed9acf2ee32deddd26c6933d8ad067745805c0 Mon Sep 17 00:00:00 2001
From: Mahmoud Bentriou <mahmoud.bentriou@centralesupelec.fr>
Date: Tue, 17 Nov 2020 16:20:04 +0100
Subject: [PATCH] Fix: add init values in a simulated trajectory

---
 core/model.jl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/core/model.jl b/core/model.jl
index 8aa7b2e..6867206 100644
--- a/core/model.jl
+++ b/core/model.jl
@@ -47,9 +47,10 @@ end
 
 function simulate(m::ContinuousTimeModel)
     # trajectory fields
-    full_values = zeros(0, m.d)
-    times = zeros(0)
-    transitions = Vector{Union{String,Nothing}}(undef,0)
+    full_values = zeros(1, m.d)
+    full_values[1,:] = m.x0
+    times = Float64[m.t0]
+    transitions = Union{String,Nothing}[nothing]
     # values at time n
     n = 0
     xn = m.x0
-- 
GitLab