diff --git a/src/ACME.jl b/src/ACME.jl index 615fa6fb..8ff63b6f 100644 --- a/src/ACME.jl +++ b/src/ACME.jl @@ -563,11 +563,11 @@ function run!(model::DiscreteModel, u::AbstractMatrix{Float64}) if size(u, 1) ≠ nu(model) throw(DimensionMismatch("input matrix has $(size(u,1)) rows, but model requires $(nu(model)) inputs")) end - y = Array(Float64, ny(model), size(u)[2]) - ucur = Array(Float64, nu(model)) - p = Array(Float64, np(model)) - ycur = Array(Float64, ny(model)) - xnew = Array(Float64, nx(model)) + y = Array{Float64,2}(ny(model), size(u)[2]) + ucur = Array{Float64,1}(nu(model)) + p = Array{Float64,1}(np(model)) + ycur = Array{Float64,1}(ny(model)) + xnew = Array{Float64,1}(nx(model)) @showprogress 1 "Running model: " for n = 1:size(u)[2] # copy!(p, model.dq * model.x + model.eq * u[:,n]) copy!(ucur, 1, u, (n-1)*nu(model)+1, nu(model))