From 59cad4731b187496be4aa8542ac245dc466cc303 Mon Sep 17 00:00:00 2001 From: David Hadka Date: Mon, 9 Sep 2024 14:01:49 -0600 Subject: [PATCH] Use PlatypusConfig.default_variator (#369) Version `1.3.0` moved `default_variator` from a standalone method to part of `PlatypusConfig`. Thus, this updates the method reference and puts a minimum version on the dependency. --- ema_workbench/em_framework/outputspace_exploration.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ema_workbench/em_framework/outputspace_exploration.py b/ema_workbench/em_framework/outputspace_exploration.py index a27b5cc77..d2230c554 100644 --- a/ema_workbench/em_framework/outputspace_exploration.py +++ b/ema_workbench/em_framework/outputspace_exploration.py @@ -27,7 +27,6 @@ RandomGenerator, Dominance, AbstractGeneticAlgorithm, - default_variator, AdaptiveTimeContinuation, GAOperator, SBX, @@ -38,6 +37,7 @@ PCX, UNDX, Multimethod, + PlatypusConfig, ) @@ -186,7 +186,7 @@ def initialize(self): self.archive += self.population if self.variator is None: - self.variator = default_variator(self.problem) + self.variator = PlatypusConfig.default_variator(self.problem) def iterate(self): offspring = [] diff --git a/pyproject.toml b/pyproject.toml index baa4c0350..98c2231b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ "pandas", "scikit-learn", "salib>=1.4.6", - "platypus-opt", + "platypus-opt>=1.3.0", "matplotlib", "statsmodels", "seaborn",