Simulation Functions

Below are example simulation functions available in libEnsemble. Most of these demonstrate an inexpensive algorithm and do not launch tasks (user applications). To see an example of a simulation function launching tasks, see the Electrostatic Forces tutorial.


See the API for simulation functions here.


This module contains various versions that evaluate the six hump camel function.

six_hump_camel.six_hump_camel(H, persis_info, sim_specs, _)

Evaluates the six hump camel function for a collection of points given in H['x']. Additionally evaluates the gradient if 'grad' is a field in sim_specs['out'] and pauses for sim_specs['user']['pause_time']] if defined.

six_hump_camel.six_hump_camel_simple(x, persis_info, sim_specs, _)

Evaluates the six hump camel function for a single point x.

See also # noqa

six_hump_camel.six_hump_camel_with_different_ranks_and_nodes(H, persis_info, sim_specs, libE_info)

Evaluates the six hump camel for a collection of points given in H['x'] but also performs a system call with a given number of nodes and ranks per node using a machinefile (to show one way of evaluating a compiled simulation).


chwirut1.chwirut_eval(H, persis_info, sim_specs, _)

Evaluates the chwirut objective function at a given set of points in H['x']. If 'obj_component' is a field in sim_specs['out'], only that component of the objective will be evaluated. Otherwise, all 214 components are evaluated and returned in the 'fvec' field.

See also for an example where the entire fvec is computed each call.

See also for an example where one component of fvec is computed per call


This module contains a test noisy function

noisy_vector_mapping.func_wrapper(H, persis_info, sim_specs, libE_info)

Wraps an objective function



This module contains a periodic test function

periodic_func.func_wrapper(H, persis_info, sim_specs, libE_info)

Wraps an objective function


This function is periodic


borehole.borehole(H, persis_info, sim_specs, _)

Wraps the borehole function


This evaluates the Borehole function for n-by-8 input matrix x, and returns the flow rate through the Borehole. (Harper and Gupta, 1983) input:


x (matrix of dimension (n, 8), where n is the number of input configurations:) –

x[:,0]: Tu, transmissivity of upper aquifer (m^2/year)
x[:,1]: Tl, transmissivity of lower aquifer (m^2/year)
x[:,2]: Hu, potentiometric head of upper aquifer (m)
x[:,3]: Hl, potentiometric head of lower aquifer (m)
x[:,4]: r, radius of influence (m)
x[:,5]: rw, radius of borehole (m)
x[:,6]: Kw, hydraulic conductivity of borehole (m/year)
x[:,7]: L, length of borehole (m)


flow rate through the Borehole (m^3/year)

Return type

vector of dimension (n, 1)


Generates and returns n inputs for the Borehole function, according to distributions outlined in Harper and Gupta (1983).


n: number of input to generate


matrix of (n, 8), input to borehole_func(x) function


executor_hworld.executor_hworld(H, persis_info, sim_specs, libE_info)

Tests launching and polling task and exiting on task finish