ema workbench

Other Sub Sites

ema_optimization

Created on 21 okt. 2012

Helper module with functions used by the model ensemble when perfomring an optimization.

Code author: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>

ema_optimization.mut_polynomial_bounded(individual, eta, policy_levers, keys, indpb)

Polynomial mutation as implemented in original NSGA-II algorithm in C by Deb. Modified to cope with categories, next to continuous variables.

Parameters:
  • individual – Individual to be mutated.
  • eta – Crowding degree of the mutation. A high eta will produce a mutant resembling its parent, while a small eta will produce a solution much more different.
  • policy_levers
  • keys
Returns:

A tuple of one individual.

class ema_optimization.NSGA2StatisticsCallback(weights=(), nr_of_generations=None, crossover_rate=None, mutation_rate=None, pop_size=None, caching=False)

Helper class for tracking statistics about the progression of the optimization

ema_optimization.generate_individual_outcome(icls, attr_list, keys)

Helper function for generating an individual in case of outcome optimization

Parameters:
  • icls – class of the individual
  • attr_list – list of initializers for each attribute
  • keys – the name of each attribute
Returns:

an instantiated individual

ema_optimization.generate_individual_robust(icls, attr_list, keys)

Helper function for generating an individual in case of robust optimization

Parameters:
  • icls – class of the individual
  • attr_list – list of initializers for each attribute
  • keys – the name of each attribute
Returns:

an instantiated individual

ema_optimization.evaluate_population_outcome(population, ri, toolbox, ensemble)

Helper function for evaluating a population in case of outcome optimization

Parameters:
  • population – the population to evaluate
  • ri – reporting interval
  • toolbox – deap toolbox instance
  • ensemble – the ensemble instance running the optimization
ema_optimization.evaluate_population_robust(population, ri, toolbox, ensemble, cases=None, **kwargs)

Helper function for evaluating a population in case of robust optimization

Parameters:
  • population – the population to evaluate
  • ri – reporinting interval
  • toolbox – deap toolbox instance
  • ensemble – the ensemble instance running the optimization
  • cases – the cases to use in the robust optimization
ema_optimization.closest_multiple_of_four(number)

Helper function for transforming the population size to the closest multiple of four. Is necessary because of implementation issues of the NSGA2 algorithm in deap.