SimulationFramework.Modules.optimisation package

Submodules

SimulationFramework.Modules.optimisation.constraints module

class constraintsClass[source]

Bases: object

constraints(constraints={})[source]
constraintsList(constraints={})[source]
equalto(type, value, limit, weight=1)[source]
formatDict(d, tab=0)[source]
greaterthan(type, value, limit, weight=1)[source]
lessthan(type, value, limit, weight=1)[source]

SimulationFramework.Modules.optimisation.nelder_mead module

Pure Python/Numpy implementation of the Nelder-Mead algorithm. Taken from fchollet; also see Wikipedia entry

nelder_mead(func, x_start, step=0.1, no_improve_thr=1e-05, no_improv_break=10, max_iter=0, alpha=1.0, gamma=2.0, rho=-0.5, sigma=0.5, converged=None, *args, **kwargs)[source]
@param f (function): function to optimize, must return a scalar score

and operate over a numpy array of the same dimensions as x_start

@param x_start (numpy array): initial position @param step (float): look-around radius in initial step @no_improv_thr, no_improv_break (float, int): break after no_improv_break iterations with

an improvement lower than no_improv_thr

@max_iter (int): always break after this number of iterations.

Set it to 0 to loop indefinitely.

@alpha, gamma, rho, sigma (floats): parameters of the algorithm

(see Wikipedia page for reference)

return: tuple (best parameter array, best score)

SimulationFramework.Modules.optimisation.optimiser module

class optimiser[source]

Bases: object

eaMuPlusLambda(population, toolbox, mu, lambda_, cxpb, mutpb, ngen, stats=None, halloffame=None, hoffile=None, verbose=True)[source]
eaSimple(population, toolbox, cxpb, mutpb, ngen, stats=None, halloffame=None, hoffile=None, verbose=True)[source]
finish_running(signal, frame)[source]
gaSimple(pop, toolbox, nSelect=None, CXPB=0.5, MUTPB=0.2, ngen=100, stats=None, halloffame=None, hoffile=None, verbose=True)[source]
interrupt = False

Module contents