@@ -898,13 +898,9 @@ $(TYPEDFIELDS)
898
898
"""
899
899
struct InitializationMetadata{R <: ReconstructInitializeprob , GUU, SIU}
900
900
"""
901
- The `u0map` used to construct the initialization.
901
+ The operating point used to construct the initialization.
902
902
"""
903
- u0map:: Dict{Any, Any}
904
- """
905
- The `pmap` used to construct the initialization.
906
- """
907
- pmap:: Dict{Any, Any}
903
+ op:: Dict{Any, Any}
908
904
"""
909
905
The `guesses` used to construct the initialization.
910
906
"""
@@ -1019,14 +1015,14 @@ end
1019
1015
$(TYPEDSIGNATURES)
1020
1016
1021
1017
Build and return the initialization problem and associated data as a `NamedTuple` to be passed
1022
- to the `SciMLFunction` constructor. Requires the system `sys`, operating point `op`,
1023
- user-provided `u0map` and `pmap`, initial time `t`, system defaults `defs`, user-provided
1024
- `guesses`, and list of unknowns which don't have a value in `op`. The keyword `implicit_dae`
1025
- denotes whether the `SciMLProblem` being constructed is in implicit DAE form (`DAEProblem`).
1026
- All other keyword arguments are forwarded to `InitializationProblem`.
1018
+ to the `SciMLFunction` constructor. Requires the system `sys`, operating point `op`, initial
1019
+ time `t`, system defaults `defs`, user-provided `guesses`, and list of unknowns which don't
1020
+ have a value in `op`. The keyword `implicit_dae` denotes whether the `SciMLProblem` being
1021
+ constructed is in implicit DAE form (`DAEProblem`). All other keyword arguments are forwarded
1022
+ to `InitializationProblem`.
1027
1023
"""
1028
1024
function maybe_build_initialization_problem (
1029
- sys:: AbstractSystem , iip, op:: AbstractDict , u0map, pmap, t, defs,
1025
+ sys:: AbstractSystem , iip, op:: AbstractDict , t, defs,
1030
1026
guesses, missing_unknowns; implicit_dae = false ,
1031
1027
time_dependent_init = is_time_dependent (sys), u0_constructor = identity,
1032
1028
p_constructor = identity, floatT = Float64, initialization_eqs = [],
@@ -1038,7 +1034,7 @@ function maybe_build_initialization_problem(
1038
1034
end
1039
1035
1040
1036
initializeprob = ModelingToolkit. InitializationProblem {iip} (
1041
- sys, t, u0map, pmap ; guesses, time_dependent_init, initialization_eqs,
1037
+ sys, t, op ; guesses, time_dependent_init, initialization_eqs,
1042
1038
use_scc, u0_constructor, p_constructor, kwargs... )
1043
1039
if state_values (initializeprob) != = nothing
1044
1040
_u0 = state_values (initializeprob)
@@ -1072,7 +1068,7 @@ function maybe_build_initialization_problem(
1072
1068
nothing
1073
1069
end
1074
1070
meta = InitializationMetadata (
1075
- u0map, pmap, guesses, Vector {Equation} (initialization_eqs),
1071
+ copy (op), copy ( guesses) , Vector {Equation} (initialization_eqs),
1076
1072
use_scc, time_dependent_init,
1077
1073
ReconstructInitializeprob (
1078
1074
sys, initializeprob. f. sys; u0_constructor, p_constructor),
@@ -1108,7 +1104,7 @@ function maybe_build_initialization_problem(
1108
1104
end
1109
1105
1110
1106
for p in punknowns
1111
- is_parameter_solvable (p, pmap , defs, guesses) || continue
1107
+ is_parameter_solvable (p, op , defs, guesses) || continue
1112
1108
get (op, p, missing ) === missing || continue
1113
1109
p = unwrap (p)
1114
1110
op[p] = getu (initializeprob, p)(initializeprob)
@@ -1281,7 +1277,7 @@ function process_SciMLProblem(
1281
1277
u0_eltype = something (u0_eltype, floatT)
1282
1278
1283
1279
if ! is_time_dependent (sys) || is_initializesystem (sys)
1284
- add_observed_equations! (u0map , obs)
1280
+ add_observed_equations! (op , obs)
1285
1281
end
1286
1282
if u0_constructor === identity && u0Type <: StaticArray
1287
1283
u0_constructor = vals -> SymbolicUtils. Code. create_array (
@@ -1295,7 +1291,7 @@ function process_SciMLProblem(
1295
1291
if build_initializeprob
1296
1292
kws = maybe_build_initialization_problem (
1297
1293
sys, constructor <: SciMLBase.AbstractSciMLFunction{true} ,
1298
- op, u0map, pmap, t, defs, guesses, missing_unknowns;
1294
+ op, t, defs, guesses, missing_unknowns;
1299
1295
implicit_dae, warn_initialize_determined, initialization_eqs,
1300
1296
eval_expression, eval_module, fully_determined,
1301
1297
warn_cyclic_dependency, check_units = check_initialization_units,
0 commit comments