easyiec.problems.BeerFermentation#

class easyiec.problems.BeerFermentation(n_knots=6, horizon=150.0, dt=0.25, S0=130.0, diacetyl_limit=0.5, ethyl_acetate_band=(0.5, 1.5))[source]#

Bases: Problem

Design of a fermentation temperature profile.

Parameters:
n_knotsint

Knots of the piecewise-linear profile (equally spaced in time).

horizonfloat

Batch horizon in hours.

dtfloat

Integration step (h) of the fourth-order Runge–Kutta scheme.

diacetyl_limit, ethyl_acetate_bandfloat, tuple

Flavour specifications used by the default utility (illustrative values in the model’s concentration units; set them for a given beer).

apply_edit(x, handles)[source]#

Genome after the knots were moved to handles.

describe(x)[source]#

Text description of a candidate (for text-only judges).

edit_handles(x)[source]#

Knot points (k, 2) a person can drag (problems with editable curves).

features(x)[source]#

Phenotype features in psychological space (default: image features).

objectives(x)[source]#

Key performance indicators (engineering problems); empty by default.

presets()[source]#

Named, hand-picked genomes ({name: genome}) for seeding and demos.

render_plot(x, ax)[source]#

Plot-type phenotypes (curves, layouts) draw here; used by _image().

simulate(x)[source]#

Time grid and states [X_A, X_L, X_D, S, E, DY, EA] (RK4).

utility(x, target=None)[source]#

Default hidden utility in [0, 1] (ground truth of benchmarks).

With a target genome it is a Gaussian similarity of standardized phenotype features; subclasses with explicit objectives override it.

Examples using easyiec.problems.BeerFermentation#

Designing a beer fermentation temperature profile

Designing a beer fermentation temperature profile