You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take dictionaries with initial conditions and parameters and convert them to numeric arrays `u0` and `p`. Also return the merged dictionary `defs` containing the entire operating point.
709
-
"""
710
-
functionget_u0_p(sys,
711
-
u0map,
712
-
parammap =nothing;
713
-
t0 =nothing,
714
-
use_union =true,
715
-
tofloat =true,
716
-
symbolic_u0 =false)
717
-
dvs =unknowns(sys)
718
-
ps =parameters(sys)
719
-
720
-
defs =defaults(sys)
721
-
if t0 !==nothing
722
-
defs[get_iv(sys)] = t0
723
-
end
724
-
if parammap !==nothing
725
-
defs =mergedefaults(defs, parammap, ps)
726
-
end
727
-
if u0map isa Vector &&eltype(u0map) <:Pair
728
-
u0map =Dict(u0map)
729
-
end
730
-
if u0map isa Dict
731
-
allobs =Set(getproperty.(observed(sys), :lhs))
732
-
ifany(in(allobs), keys(u0map))
733
-
u0s_in_obs =filter(in(allobs), keys(u0map))
734
-
@warn"Observed variables cannot be assigned initial values. Initial values for $u0s_in_obs will be ignored."
Take dictionaries with initial conditions and parameters and convert them to numeric arrays `u0` and `p`. Also return the merged dictionary `defs` containing the entire operating point.
513
+
"""
514
+
functionget_u0_p(sys,
515
+
u0map,
516
+
parammap =nothing;
517
+
t0 =nothing,
518
+
use_union =true,
519
+
tofloat =true,
520
+
symbolic_u0 =false)
521
+
dvs =unknowns(sys)
522
+
ps =parameters(sys)
523
+
524
+
defs =defaults(sys)
525
+
if t0 !==nothing
526
+
defs[get_iv(sys)] = t0
527
+
end
528
+
if parammap !==nothing
529
+
defs =mergedefaults(defs, parammap, ps)
530
+
end
531
+
if u0map isa Vector &&eltype(u0map) <:Pair
532
+
u0map =Dict(u0map)
533
+
end
534
+
if u0map isa Dict
535
+
allobs =Set(getproperty.(observed(sys), :lhs))
536
+
ifany(in(allobs), keys(u0map))
537
+
u0s_in_obs =filter(in(allobs), keys(u0map))
538
+
@warn"Observed variables cannot be assigned initial values. Initial values for $u0s_in_obs will be ignored."
0 commit comments