@@ -6,7 +6,7 @@ using MathOptInterface
6
6
using Optimization. SciMLBase
7
7
using SymbolicIndexingInterface
8
8
using SparseArrays
9
- import ModelingToolkit: parameters, states , varmap_to_vars, mergedefaults, toexpr
9
+ import ModelingToolkit: parameters, unknowns , varmap_to_vars, mergedefaults, toexpr
10
10
import ModelingToolkit
11
11
const MTK = ModelingToolkit
12
12
using Symbolics
@@ -182,12 +182,12 @@ end
182
182
"""
183
183
convert_to_expr(eq, sys; expand_expr = false, pairs_arr = expr_map(sys))
184
184
185
- Converts the given symbolic expression to a Julia `Expr` and replaces all symbols, i.e. states and
185
+ Converts the given symbolic expression to a Julia `Expr` and replaces all symbols, i.e. unknowns and
186
186
parameters with `x[i]` and `p[i]`.
187
187
188
188
# Arguments:
189
189
- `eq`: Expression to convert
190
- - `sys`: Reference to the system holding the parameters and states
190
+ - `sys`: Reference to the system holding the parameters and unknowns
191
191
- `expand_expr=false`: If `true` the symbolic expression is expanded first.
192
192
"""
193
193
function convert_to_expr (eq, expr_map; expand_expr = false )
@@ -206,7 +206,7 @@ function convert_to_expr(eq, expr_map; expand_expr = false)
206
206
end
207
207
208
208
function get_expr_map (sys)
209
- dvs = ModelingToolkit. states (sys)
209
+ dvs = ModelingToolkit. unknowns (sys)
210
210
ps = ModelingToolkit. parameters (sys)
211
211
return vcat ([ModelingToolkit. toexpr (_s) => Expr (:ref , :x , i)
212
212
for (i, _s) in enumerate (dvs)],
0 commit comments