From 122c626bf2bda9b194bb7cd26b90dc72b18a4908 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Thu, 30 Oct 2025 14:04:47 +0000 Subject: [PATCH 1/2] Remove high relative tolerance on VMCON QPP --- process/solver.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/process/solver.py b/process/solver.py index 95afd7b822..6a6d90e255 100644 --- a/process/solver.py +++ b/process/solver.py @@ -217,7 +217,7 @@ def _ineq_cons_satisfied( np.array(self.bndu), max_iter=global_variables.maxcal, epsilon=self.tolerance, - qsp_options={"eps_rel": 1e-1, "adaptive_rho_interval": 25}, + qsp_options={"adaptive_rho_interval": 25}, initial_B=bb, callback=_solver_callback, additional_convergence=_ineq_cons_satisfied diff --git a/setup.py b/setup.py index 1c0daae28d..81c9ed86e7 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ "install_requires": [ "numpy>=1.23", "scipy>=1.10", - "cvxpy!=1.3.0,!=1.3.1", + "cvxpy~=1.7.3", "osqp>=1.0", "pandas>=2.0", "numba>=0.57", From da49b7bf50b021d09d2a7e36084d3c594f497caa Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Mon, 3 Nov 2025 13:52:44 +0000 Subject: [PATCH 2/2] Allow use of PyVMCON 2.4.* --- setup.py | 2 +- tests/integration/test_vmcon.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 81c9ed86e7..12a10b6379 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ "osqp>=1.0", "pandas>=2.0", "numba>=0.57", - "PyVMCON>=2.3.1,<3.0.0", + "PyVMCON>=2.4.0,<2.5.0", "CoolProp>=6.4", "matplotlib>=2.1.1", "seaborn>=0.12.2", diff --git a/tests/integration/test_vmcon.py b/tests/integration/test_vmcon.py index abe636239f..3b0760dade 100644 --- a/tests/integration/test_vmcon.py +++ b/tests/integration/test_vmcon.py @@ -44,13 +44,15 @@ def __init__(self, name, evaluator): class SolverArgs: - def __init__(self): + def __init__(self, n=2): """Initialise some common arguments to the solver adapter. + :param n: number of input variables (default 2) + :type n: int + These arguments are shared between some of the test cases. """ # No bounds on x values set - n = 2 self.x = np.zeros(n) self.ilower = np.zeros(n) self.iupper = np.zeros(n) @@ -564,6 +566,7 @@ def get_case5(): """ # Create a case-specific Vmcon object with overridden fcnvmc1 and 2 case = Case("5", Evaluator5()) + case.solver_args = SolverArgs(n=1) # Set up vmcon values for this case neqns = 1