@@ -30,12 +30,12 @@ struct ObservableRecordFromSolution{S, T}
30
30
p_vals) where {S, T}
31
31
obs_eqs = observed (nsys)
32
32
target_obs_idx = findfirst (isequal (plot_var, eq. lhs) for eq in observed (nsys))
33
- state_end_idxs = length (states (nsys))
33
+ state_end_idxs = length (unknowns (nsys))
34
34
param_end_idxs = state_end_idxs + length (parameters (nsys))
35
35
36
36
bif_par_idx = state_end_idxs + bif_idx
37
37
# Gets the (base) substitution values for states.
38
- subs_vals_states = Pair .(states (nsys), u0_vals)
38
+ subs_vals_states = Pair .(unknowns (nsys), u0_vals)
39
39
# Gets the (base) substitution values for parameters.
40
40
subs_vals_params = Pair .(parameters (nsys), p_vals)
41
41
# Gets the (base) substitution values for observables.
@@ -95,16 +95,16 @@ function BifurcationKit.BifurcationProblem(nsys::NonlinearSystem,
95
95
96
96
# Converts the input state guess.
97
97
u0_bif_vals = ModelingToolkit. varmap_to_vars (u0_bif,
98
- states (nsys);
98
+ unknowns (nsys);
99
99
defaults = nsys. defaults)
100
100
p_vals = ModelingToolkit. varmap_to_vars (ps, parameters (nsys); defaults = nsys. defaults)
101
101
102
102
# Computes bifurcation parameter and the plotting function.
103
103
bif_idx = findfirst (isequal (bif_par), parameters (nsys))
104
104
if ! isnothing (plot_var)
105
105
# If the plot var is a normal state.
106
- if any (isequal (plot_var, var) for var in states (nsys))
107
- plot_idx = findfirst (isequal (plot_var), states (nsys))
106
+ if any (isequal (plot_var, var) for var in unknowns (nsys))
107
+ plot_idx = findfirst (isequal (plot_var), unknowns (nsys))
108
108
record_from_solution = (x, p) -> x[plot_idx]
109
109
110
110
# If the plot var is an observed state.
134
134
# When input is a ODESystem.
135
135
function BifurcationKit. BifurcationProblem (osys:: ODESystem , args... ; kwargs... )
136
136
nsys = NonlinearSystem ([0 ~ eq. rhs for eq in equations (osys)],
137
- states (osys),
137
+ unknowns (osys),
138
138
parameters (osys);
139
139
name = nameof (osys))
140
140
return BifurcationKit. BifurcationProblem (nsys, args... ; kwargs... )
0 commit comments