Skip to content

pymoo Interface API Reference

Installation and usage

sb_arch_opt.algo.pymoo_interface.api.get_nsga2(pop_size: int, results_folder=None, **kwargs)

Returns a NSGA2 algorithm preconfigured to work with mixed-discrete variables and other architecture optimization measures

sb_arch_opt.algo.pymoo_interface.api.get_doe_algo(doe_size: int, results_folder=None, **kwargs)

Returns an algorithm preconfigured for architecture optimization that will only run a DOE. Useful when evaluations is expensive and more inspection is needed before continuing with optimization

sb_arch_opt.algo.pymoo_interface.api.initialize_from_previous_results(algorithm: Algorithm, problem: ArchOptProblemBase, result_folder: str, **kwargs) -> bool

Initialize an Algorithm from previously stored results

sb_arch_opt.algo.pymoo_interface.api.load_from_previous_results(problem: ArchOptProblemBase, result_folder: str, load_from_problem=True, cumulative=True) -> Optional[Population]

Load a (cumulative) Population from previously-stored results

sb_arch_opt.algo.pymoo_interface.api.provision_pymoo(algorithm: Algorithm, set_init=True, results_folder=None)

Provisions a pymoo Algorithm to work correctly for architecture optimization: - Sets initializer using a repaired sampler (if set_init = True) - Sets a repair operator - Optionally stores intermediate and final results in some results folder - Replace NaN outputs with Inf

sb_arch_opt.algo.pymoo_interface.api.ArchOptNSGA2(pop_size=100, sampling=HierarchicalSampling(), repair=ArchOptRepair(), mating=MixedDiscreteMating(repair=(ArchOptRepair()), eliminate_duplicates=(LargeDuplicateElimination())), eliminate_duplicates=LargeDuplicateElimination(), survival=RankAndCrowdingSurvival(), output=EHVMultiObjectiveOutput(), results_folder=None, **kwargs)

NSGA2 preconfigured with mixed-variable operators and other architecture optimization measures

sb_arch_opt.algo.pymoo_interface.api.DOEAlgorithm(*args, **kwargs)

Algorithm that stops after initialization

set_doe_size(problem, doe_size: int, **kwargs) -> bool

Set the DOE size, also if the algo is already initialized with a prior population. Returns whether the DOE size was increased.