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