@@ -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
@@ -183,13 +183,13 @@ end
183
183
"""
184
184
convert_to_expr(eq, sys; expand_expr = false, pairs_arr = expr_map(sys))
185
185
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
187
187
parameters with `x[i]` and `p[i]`.
188
188
189
189
# Arguments:
190
190
191
191
- `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
193
193
- `expand_expr=false`: If `true` the symbolic expression is expanded first.
194
194
"""
195
195
function convert_to_expr (eq, expr_map; expand_expr = false )
@@ -208,7 +208,7 @@ function convert_to_expr(eq, expr_map; expand_expr = false)
208
208
end
209
209
210
210
function get_expr_map (sys)
211
- dvs = ModelingToolkit. states (sys)
211
+ dvs = ModelingToolkit. unknowns (sys)
212
212
ps = ModelingToolkit. parameters (sys)
213
213
return vcat (
214
214
[ModelingToolkit. toexpr (_s) => Expr (:ref , :x , i)
0 commit comments