@@ -22,7 +22,7 @@ struct NonLinModel{
2222 dname:: Vector{String}
2323 xname:: Vector{String}
2424 buffer:: SMB
25- function NonLinModel {NT, F, H, P, DS } (
25+ function NonLinModel {NT} (
2626 f!:: F , h!:: H , Ts, nu, nx, ny, nd, p:: P , solver:: DS , buffer:: SMB
2727 ) where {NT<: Real , F<: Function , H<: Function , P<: Any , DS<: DiffSolver , SMB<: SimModelBuffer }
2828 Ts > 0 || error (" Sampling time Ts must be positive" )
@@ -144,10 +144,9 @@ function NonLinModel{NT}(
144144 isnothing (solver) && (solver= EmptySolver ())
145145 f!, h! = get_mutating_functions (NT, f, h)
146146 f!, h! = get_solver_functions (NT, solver, f!, h!, Ts, nu, nx, ny, nd)
147- F, H, P, DS = get_types (f!, h!, p, solver)
148147 jacobian = JacobianBuffer {NT} (f!, h!, nu, nx, ny, nd)
149148 buffer = SimModelBuffer {NT} (nu, nx, ny, nd, jacobian)
150- return NonLinModel {NT, F, H, P, DS } (f!, h!, Ts, nu, nx, ny, nd, p, solver, buffer)
149+ return NonLinModel {NT} (f!, h!, Ts, nu, nx, ny, nd, p, solver, buffer)
151150end
152151
153152function NonLinModel (
@@ -225,13 +224,6 @@ function validate_h(NT, h)
225224 return ismutating
226225end
227226
228- " Get the types of `f!`, `h!` and `solver` to construct a `NonLinModel`."
229- function get_types (
230- :: F , :: H , :: P , :: DS
231- ) where {F<: Function , H<: Function , P<: Any , DS<: DiffSolver }
232- return F, H, P, DS
233- end
234-
235227" Do nothing if `model` is a [`NonLinModel`](@ref)."
236228steadystate! (:: SimModel , _ , _ ) = nothing
237229
0 commit comments