@@ -6,7 +6,7 @@ using MathOptInterface
66using Optimization. SciMLBase
77using SymbolicIndexingInterface
88using SparseArrays
9- import ModelingToolkit: parameters, states , varmap_to_vars, mergedefaults, toexpr
9+ import ModelingToolkit: parameters, unknowns , varmap_to_vars, mergedefaults, toexpr
1010import ModelingToolkit
1111const MTK = ModelingToolkit
1212using Symbolics
@@ -183,13 +183,13 @@ end
183183"""
184184 convert_to_expr(eq, sys; expand_expr = false, pairs_arr = expr_map(sys))
185185
186- Converts the given symbolic expression to a Julia `Expr` and replaces all symbols, i.e. states and
186+ Converts the given symbolic expression to a Julia `Expr` and replaces all symbols, i.e. unknowns and
187187parameters with `x[i]` and `p[i]`.
188188
189189# Arguments:
190190
191191 - `eq`: Expression to convert
192- - `sys`: Reference to the system holding the parameters and states
192+ - `sys`: Reference to the system holding the parameters and unknowns
193193 - `expand_expr=false`: If `true` the symbolic expression is expanded first.
194194"""
195195function convert_to_expr (eq, expr_map; expand_expr = false )
@@ -208,7 +208,7 @@ function convert_to_expr(eq, expr_map; expand_expr = false)
208208end
209209
210210function get_expr_map (sys)
211- dvs = ModelingToolkit. states (sys)
211+ dvs = ModelingToolkit. unknowns (sys)
212212 ps = ModelingToolkit. parameters (sys)
213213 return vcat (
214214 [ModelingToolkit. toexpr (_s) => Expr (:ref , :x , i)
0 commit comments