Simulation Specs

Used to specify the simulation function, its inputs and outputs, and user data.

Can be constructed and passed to libEnsemble as a Python class or a dictionary.

 1...
 2from libensemble import SimSpecs
 3from simulator import sim_find_sine
 4
 5...
 6
 7sim_specs = SimSpecs(
 8    sim_f=sim_find_sine,
 9    inputs=["x"],
10    out=[("y", float)],
11    user={"batch": 1234},
12)
13...
pydantic model libensemble.specs.SimSpecs
Fields:

 1...
 2from simulator import six_hump_camel
 3
 4...
 5
 6sim_specs = {
 7    "sim_f": six_hump_camel,
 8    "in": ["x"],
 9    "out": [("y", float)],
10    "user": {"batch": 1234},
11}
12...
    sim_specs = {
        "sim_f": six_hump_camel,  # Function whose output is being minimized
        "in": ["x"],  # Keys to be given to sim_f
        "out": [("f", float)],  # Name of the outputs from sim_f
    }
    "sim_f": run_forces,  # Function whose output is being minimized
    "in": ["x"],  # Name of input for sim_f
    "out": [("energy", float)],  # Name, type of output from sim_f
    "user": {
        "keys": ["seed"],
        "cores": 2,
        "sim_particles": 1e3,
        "sim_timesteps": 5,
        "sim_kill_minutes": 10.0,
        "particle_variance": 0.2,
        "kill_rate": 0.5,
        "fail_on_sim": False,
        "fail_on_submit": False,  # Won't occur if 'fail_on_sim' True
    },
}