From 2cab2c4f6dd412758034b88c79838e0324e802ed Mon Sep 17 00:00:00 2001 From: Christoph Hansknecht Date: Mon, 13 May 2024 15:01:15 +0200 Subject: [PATCH 1/2] Fix error in detection of nonlinear equations --- pygradflow/runners/cutest_runner.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pygradflow/runners/cutest_runner.py b/pygradflow/runners/cutest_runner.py index 7853a79..4d16558 100644 --- a/pygradflow/runners/cutest_runner.py +++ b/pygradflow/runners/cutest_runner.py @@ -89,7 +89,10 @@ def y0(self): return self.instance.v0 -class LSQCUTEstProblem(Problem): +# Nonlinear equations: Goal is to minimize the violation +# 1/2 ||c(x)||^2 subject to problem bounds. Constraint +# functions are used to access the residuals and their derivatives +class NECUTEstProblem(Problem): def __init__(self, instance): self.instance = instance var_lb = cutest_map_inf(instance.bl) @@ -151,8 +154,10 @@ def solve(self, params): props = pycutest.problem_properties(self.instance) - if props["objective"] == "none": - problem = LSQCUTEstProblem(problem) + is_ne = self.name.endswith("NE") + + if is_ne: + problem = NECUTEstProblem(problem) elif problem.m == 0: problem = UnconstrainedCUTEstProblem(problem) else: From 3669ba70b093e12d9a39b8de26a58f7ba61582f1 Mon Sep 17 00:00:00 2001 From: Christoph Hansknecht Date: Mon, 13 May 2024 15:02:01 +0200 Subject: [PATCH 2/2] Bump version --- docs/conf.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9ac11ab..27a8412 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,7 +14,7 @@ project = "pygradflow" copyright = "2023, Christoph Hansknecht" author = "Christoph Hansknecht" -release = "0.4.12" +release = "0.4.13" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyproject.toml b/pyproject.toml index 2c3c722..12e5a6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pygradflow" -version = "0.4.12" +version = "0.4.13" description = "PyGradFlow is a simple implementation of the sequential homotopy method to be used to solve general nonlinear programs." authors = ["Christoph Hansknecht "] readme = "README.md"