Skip to content

Commit

Permalink
add an nsga2 test to rosenbrock
Browse files Browse the repository at this point in the history
  • Loading branch information
ewu63 committed Aug 15, 2023
1 parent c94ac05 commit 283c21b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/test_rosenbrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class TestRosenbrock(OptTest):
"CONMIN": 1e-9,
"PSQP": 1e-8,
"ParOpt": 1e-8,
"NSGA2": 1e-6,
}
optOptions = {
"SLSQP": {"ACC": 1e-10},
Expand Down Expand Up @@ -146,7 +147,7 @@ def test_snopt_hotstart_starting_from_grad(self):
# The first is from a call we deleted and the second is the call after 'last'
self.assertEqual(self.ng, 2)

@parameterized.expand(["IPOPT", "SLSQP", "PSQP", "CONMIN", "NLPQLP", "ParOpt"])
@parameterized.expand(["IPOPT", "SLSQP", "PSQP", "CONMIN", "NLPQLP", "ParOpt", "NSGA2"])
def test_optimization(self, optName):
self.optName = optName
if optName == "IPOPT" and sys.platform == "win32":
Expand Down
2 changes: 1 addition & 1 deletion tests/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get_dict_distance(d, d2):
}

# these are optimizers which are installed by default
DEFAULT_OPTIMIZERS = {"SLSQP", "PSQP", "CONMIN", "ALPSO", "NSGA2"}
DEFAULT_OPTIMIZERS = {"SLSQP", "PSQP", "CONMIN", "ALPSO"}

# Define gradient-based optimizers
GRAD_BASED_OPTIMIZERS = {"CONMIN", "IPOPT", "NLPQLP", "ParOpt", "PSQP", "SLSQP", "SNOPT"}
Expand Down

0 comments on commit 283c21b

Please sign in to comment.