Skip to content

For ensemble simulations, how do I set different parameter values for each run of the ensemble? #890

@TorkelE

Description

@TorkelE

I try just following the tutorial, but adding a vector for the parameters as well, unfortunately that doesn't work:

using Optimization, OptimizationBBO, Random

Random.seed!(100)

rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
x0 = zeros(2)

optf = OptimizationFunction(rosenbrock, Optimization.AutoForwardDiff())
prob = OptimizationProblem(optf, x0, [1.0, 100.0])

ensembleprob = Optimization.EnsembleProblem(prob, [x0, x0 .+ rand(2)]) # Works
ensembleprob = Optimization.EnsembleProblem(prob, [x0, x0 .+ rand(2)], [[1.0, 100.0], [1.0, 101.0]]) # Errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions