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
`repeat` is the iteration of the repeat. At first, it is `1`, but if
29
29
`rerun` was true this will be `2`, `3`, etc. counting the number of times
30
30
problem `i` has been repeated.
31
-
- `reduction`: This function is used to aggregate the results in each simulation batch. By default, it appends the `data` from the batch to `u`, which is initialized via `u_data`. The `I` is a range of indices corresponding to the trajectories for the current batch.
32
31
33
-
### Arguments:
34
-
- `u`: The solution from the current ensemble run. This is the accumulated data that gets updated in each batch.
35
-
- `data`: The results from the current batch of simulations. This is typically some data (e.g., variable values, time steps) that is merged with `u`.
36
-
- `I`: A range of indices corresponding to the simulations in the current batch. This provides the trajectory indices for the batch.
37
-
38
-
### Returns:
39
-
- `(new_data, has_converged)`: A tuple where:
40
-
- `new_data`: The updated accumulated data, typically the result of appending `data` to `u`.
41
-
- `has_converged`: A boolean indicating whether the simulation has converged and should terminate early. If `true`, the simulation will stop early. If `false`, the simulation will continue. By default, this is `false`, meaning the simulation will not stop early.
32
+
- `reduction`: This function is used to aggregate the results in each simulation batch.
33
+
By default, it appends the `data` from the batch to `u`, which is initialized via `u_data`.
34
+
The `I` is a range of indices corresponding to the trajectories for the current batch.
35
+
### Arguments:
36
+
- `u`: The solution from the current ensemble run. This is the accumulated data that gets
37
+
updated in each batch.
38
+
- `data`: The results from the current batch of simulations. This is typically some data
39
+
(e.g., variable values, time steps) that is merged with `u`.
40
+
- `I`: A range of indices corresponding to the simulations in the current batch. This provides
41
+
the trajectory indices for the batch.
42
+
43
+
### Returns:
44
+
- `(new_data, has_converged)`: A tuple where:
45
+
- `new_data`: The updated accumulated data, typically the result of appending `data` to `u`.
46
+
- `has_converged`: A boolean indicating whether the simulation has converged and should terminate early.
47
+
If `true`, the simulation will stop early. If `false`, the simulation will continue. By default, this is
48
+
`false`, meaning the simulation will not stop early.
42
49
43
50
- `u_init`: The initial form of the object that gets updated in-place inside the
44
51
`reduction` function.
@@ -88,59 +95,19 @@ Thus, the ensemble simulation would return as its data an array which is the
88
95
end value of the 2nd dependent variable for each of the runs.
89
96
"""
90
97
91
-
# Defines a structure to manage an ensemble (batch) of problems.
92
-
# Each field controls how the ensemble behaves during simulation.
Base.depwarn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel Ensembles Simulations Interface page for more details", :EnsembleProblem)
150
+
Base.depwarn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel \
151
+
Ensembles Simulations Interface page for more details", :EnsembleProblem)
188
152
invoke(EnsembleProblem,
189
153
Tuple{Any},
190
154
prob;
@@ -197,15 +161,14 @@ $(TYPEDEF)
197
161
198
162
Main constructor for `EnsembleProblem`.
199
163
200
-
## Arguments:
164
+
## Keyword Arguments
201
165
202
166
- `prob`: The base problem.
203
167
- `prob_func`: Function to modify the base problem per trajectory.
204
168
- `output_func`: Function to extract output from a solution.
205
169
- `reduction`: Function to aggregate results.
206
170
- `u_init`: Initial value for aggregation.
207
171
- `safetycopy`: Whether to deepcopy the problem before modifying.
208
-
209
172
"""
210
173
functionEnsembleProblem(prob;
211
174
prob_func = DEFAULT_PROB_FUNC,
@@ -224,7 +187,6 @@ end
224
187
$(TYPEDEF)
225
188
226
189
Alternate constructor that uses only keyword arguments.
227
-
228
190
"""
229
191
functionEnsembleProblem(; prob,
230
192
prob_func = DEFAULT_PROB_FUNC,
@@ -238,15 +200,15 @@ end
238
200
"""
239
201
$(TYPEDEF)
240
202
241
-
Constructor for NonlinearProblem.
203
+
Constructor that is used for NOnlinearProblem.
242
204
243
205
!!! warning
244
206
This dispatch is deprecated. See the Parallel Ensembles Simulations Interface page.
245
-
246
207
"""
247
208
function SciMLBase.EnsembleProblem(
248
209
prob::AbstractSciMLProblem, u0s::Vector{Vector{T}}; kwargs...) where {T}
249
-
Base.depwarn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel Ensembles Simulations Interface page for more details", :EnsembleProblem)
210
+
Base.depwarn("This dispatch is deprecated for the standard ensemble syntax. See the Parallel \
211
+
Ensembles Simulations Interface page for more details", :EnsembleProblem)
250
212
prob_func = (prob, i, repeat =nothing) ->remake(prob, u0 = u0s[i])
0 commit comments