Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/sim_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,6 @@ function preparestate!(model::SimModel)
return x
end

function preparestate!(model::SimModel, ::Any , ::Any=model.buffer.empty)
Base.depwarn(
"The method preparestate!(model::SimModel, u, d=[]) is deprecated. Use "*
" preparestate!(model::SimModel) instead.",
:preparestate!,
)
return preparestate!(model)
end

@doc raw"""
updatestate!(model::SimModel, u, d=[]) -> xnext

Expand Down
3 changes: 1 addition & 2 deletions test/1_test_sim_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ end
@test evaloutput(linmodel1, Float64[]) ≈ linmodel1(Float64[]) ≈ [50,30]
x = initstate!(linmodel1, [10, 60])
@test evaloutput(linmodel1) ≈ [50 + 19.0, 30 + 7.4]
@test preparestate!(linmodel1) ≈ x # new method
@test preparestate!(linmodel1, [10, 60]) ≈ x # deprecated method
@test preparestate!(linmodel1) ≈ x
@test updatestate!(linmodel1, [10, 60]) ≈ x
linmodel2 = LinModel(append(tf(1, [1, 0]), tf(2, [10, 1])), 1.0)
x = initstate!(linmodel2, [10, 3])
Expand Down