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.
521
+
"""
522
+
functionget_u0_p(sys,
523
+
u0map,
524
+
parammap =nothing;
525
+
t0 =nothing,
526
+
use_union =true,
527
+
tofloat =true,
528
+
symbolic_u0 =false)
529
+
dvs =unknowns(sys)
530
+
ps =parameters(sys)
531
+
532
+
defs =defaults(sys)
533
+
if t0 !==nothing
534
+
defs[get_iv(sys)] = t0
535
+
end
536
+
if parammap !==nothing
537
+
defs =mergedefaults(defs, parammap, ps)
538
+
end
539
+
if u0map isa Vector &&eltype(u0map) <:Pair
540
+
u0map =Dict(u0map)
541
+
end
542
+
if u0map isa Dict
543
+
allobs =Set(getproperty.(observed(sys), :lhs))
544
+
ifany(in(allobs), keys(u0map))
545
+
u0s_in_obs =filter(in(allobs), keys(u0map))
546
+
@warn"Observed variables cannot be assigned initial values. Initial values for $u0s_in_obs will be ignored."
0 commit comments