@@ -102,6 +102,7 @@ Defines a structure to manage an ensemble (batch) of problems.
102102Each field controls how the ensemble behaves during simulation.
103103
104104## Arguments
105+
105106 - `prob`: The original base problem to replicate or modify.
106107 - `prob_func`: A function that defines how to generate each subproblem.
107108 - `output_func`: A function to post-process each individual simulation result.
@@ -144,11 +145,14 @@ $(TYPEDEF)
144145Constructor for deprecated usage where a vector of problems is passed directly.
145146
146147!!! warning
148+
147149 This constructor is deprecated. Use the standard ensemble syntax with `prob_func` instead.
148150"""
149151function EnsembleProblem (prob:: AbstractVector{<:AbstractSciMLProblem} ; kwargs... )
150- Base. depwarn (" This dispatch is deprecated for the standard ensemble syntax. See the Parallel \
151- Ensembles Simulations Interface page for more details" , :EnsembleProblem )
152+ Base. depwarn (
153+ " This dispatch is deprecated for the standard ensemble syntax. See the Parallel \
154+ Ensembles Simulations Interface page for more details" ,
155+ :EnsembleProblem )
152156 invoke (EnsembleProblem,
153157 Tuple{Any},
154158 prob;
@@ -163,12 +167,12 @@ Main constructor for `EnsembleProblem`.
163167
164168## Keyword Arguments
165169
166- - `prob`: The base problem.
167- - `prob_func`: Function to modify the base problem per trajectory.
168- - `output_func`: Function to extract output from a solution.
169- - `reduction`: Function to aggregate results.
170- - `u_init`: Initial value for aggregation.
171- - `safetycopy`: Whether to deepcopy the problem before modifying.
170+ - `prob`: The base problem.
171+ - `prob_func`: Function to modify the base problem per trajectory.
172+ - `output_func`: Function to extract output from a solution.
173+ - `reduction`: Function to aggregate results.
174+ - `u_init`: Initial value for aggregation.
175+ - `safetycopy`: Whether to deepcopy the problem before modifying.
172176"""
173177function EnsembleProblem (prob;
174178 prob_func = DEFAULT_PROB_FUNC,
@@ -203,12 +207,15 @@ $(TYPEDEF)
203207Constructor that is used for NOnlinearProblem.
204208
205209!!! warning
210+
206211 This dispatch is deprecated. See the Parallel Ensembles Simulations Interface page.
207212"""
208213function SciMLBase. EnsembleProblem (
209214 prob:: AbstractSciMLProblem , u0s:: Vector{Vector{T}} ; kwargs... ) where {T}
210- Base. depwarn (" This dispatch is deprecated for the standard ensemble syntax. See the Parallel \
211- Ensembles Simulations Interface page for more details" , :EnsembleProblem )
215+ Base. depwarn (
216+ " This dispatch is deprecated for the standard ensemble syntax. See the Parallel \
217+ Ensembles Simulations Interface page for more details" ,
218+ :EnsembleProblem )
212219 prob_func = (prob, i, repeat = nothing ) -> remake (prob, u0 = u0s[i])
213220 return SciMLBase. EnsembleProblem (prob; prob_func, kwargs... )
214221end
@@ -220,8 +227,8 @@ Defines a weighted version of an `EnsembleProblem`, where different simulations
220227
221228## Arguments
222229
223- - `ensembleprob`: The base ensemble problem.
224- - `weights`: A vector of weights corresponding to each simulation.
230+ - `ensembleprob`: The base ensemble problem.
231+ - `weights`: A vector of weights corresponding to each simulation.
225232"""
226233struct WeightedEnsembleProblem{T1 <: AbstractEnsembleProblem , T2 <: AbstractVector } < :
227234 AbstractEnsembleProblem
251258$(TYPEDEF)
252259
253260Constructor for `WeightedEnsembleProblem`. Ensures weights sum to 1 and matches problem count.
254-
255261"""
256262function WeightedEnsembleProblem (args... ; weights, kwargs... )
257263 # TODO : allow skipping checks?
@@ -260,4 +266,3 @@ function WeightedEnsembleProblem(args...; weights, kwargs...)
260266 @assert length (ep. prob) == length (weights)
261267 WeightedEnsembleProblem (ep, weights)
262268end
263-
0 commit comments