From 5c69715103c303285475bb72f6d398cc64c59812 Mon Sep 17 00:00:00 2001 From: Dave Hadka Date: Wed, 18 Sep 2024 17:50:42 -0600 Subject: [PATCH] Fix examples --- examples/Basic/dps_example.py | 7 ++++--- examples/Basic/example.py | 1 + examples/Eijgenraam/eijgenraam.py | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/Basic/dps_example.py b/examples/Basic/dps_example.py index b9ada35..010e0d4 100644 --- a/examples/Basic/dps_example.py +++ b/examples/Basic/dps_example.py @@ -1,4 +1,5 @@ import math +import platypus import numpy as np import matplotlib.pyplot as plt from scipy.optimize import brentq as root @@ -28,9 +29,9 @@ def to_variables(self): result = [] for _ in range(self.length): - result += [Real(self.c_bounds[0], self.c_bounds[1])] # the center - result += [Real(self.r_bounds[0], self.r_bounds[1])] # the radius - result += [Real(0, 1)] # the weight + result += [platypus.Real(self.c_bounds[0], self.c_bounds[1])] # the center + result += [platypus.Real(self.r_bounds[0], self.r_bounds[1])] # the radius + result += [platypus.Real(0, 1)] # the weight return result diff --git a/examples/Basic/example.py b/examples/Basic/example.py index 22047be..1aefd72 100644 --- a/examples/Basic/example.py +++ b/examples/Basic/example.py @@ -2,6 +2,7 @@ import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt +import seaborn as sns from scipy.optimize import brentq as root from rhodium import * diff --git a/examples/Eijgenraam/eijgenraam.py b/examples/Eijgenraam/eijgenraam.py index c6195a5..fd7d8ac 100644 --- a/examples/Eijgenraam/eijgenraam.py +++ b/examples/Eijgenraam/eijgenraam.py @@ -1,6 +1,7 @@ import math import bisect import numbers +import functools import numpy as np import matplotlib.pyplot as plt from rhodium import *