@@ -30,12 +30,12 @@ struct ObservableRecordFromSolution{S, T}
3030 p_vals) where {S, T}
3131 obs_eqs = observed (nsys)
3232 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))
3434 param_end_idxs = state_end_idxs + length (parameters (nsys))
3535
3636 bif_par_idx = state_end_idxs + bif_idx
3737 # 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)
3939 # Gets the (base) substitution values for parameters.
4040 subs_vals_params = Pair .(parameters (nsys), p_vals)
4141 # Gets the (base) substitution values for observables.
@@ -95,16 +95,16 @@ function BifurcationKit.BifurcationProblem(nsys::NonlinearSystem,
9595
9696 # Converts the input state guess.
9797 u0_bif_vals = ModelingToolkit. varmap_to_vars (u0_bif,
98- states (nsys);
98+ unknowns (nsys);
9999 defaults = nsys. defaults)
100100 p_vals = ModelingToolkit. varmap_to_vars (ps, parameters (nsys); defaults = nsys. defaults)
101101
102102 # Computes bifurcation parameter and the plotting function.
103103 bif_idx = findfirst (isequal (bif_par), parameters (nsys))
104104 if ! isnothing (plot_var)
105105 # 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))
108108 record_from_solution = (x, p) -> x[plot_idx]
109109
110110 # If the plot var is an observed state.
134134# When input is a ODESystem.
135135function BifurcationKit. BifurcationProblem (osys:: ODESystem , args... ; kwargs... )
136136 nsys = NonlinearSystem ([0 ~ eq. rhs for eq in equations (osys)],
137- states (osys),
137+ unknowns (osys),
138138 parameters (osys);
139139 name = nameof (osys))
140140 return BifurcationKit. BifurcationProblem (nsys, args... ; kwargs... )
0 commit comments