Skip to content

Commit 09699de

Browse files
authored
Remove high relative tolerance on VMCON QPP (#3964)
* Remove high relative tolerance on VMCON QPP * Allow use of PyVMCON 2.4.*
1 parent 0fdad95 commit 09699de

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

process/solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def _ineq_cons_satisfied(
217217
np.array(self.bndu),
218218
max_iter=global_variables.maxcal,
219219
epsilon=self.tolerance,
220-
qsp_options={"eps_rel": 1e-1, "adaptive_rho_interval": 25},
220+
qsp_options={"adaptive_rho_interval": 25},
221221
initial_B=bb,
222222
callback=_solver_callback,
223223
additional_convergence=_ineq_cons_satisfied

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
"install_requires": [
3131
"numpy>=1.23",
3232
"scipy>=1.10",
33-
"cvxpy!=1.3.0,!=1.3.1",
33+
"cvxpy~=1.7.3",
3434
"osqp>=1.0",
3535
"pandas>=2.0",
3636
"numba>=0.57",
37-
"PyVMCON>=2.3.1,<3.0.0",
37+
"PyVMCON>=2.4.0,<2.5.0",
3838
"CoolProp>=6.4",
3939
"matplotlib>=2.1.1",
4040
"seaborn>=0.12.2",

tests/integration/test_vmcon.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ def __init__(self, name, evaluator):
4444

4545

4646
class SolverArgs:
47-
def __init__(self):
47+
def __init__(self, n=2):
4848
"""Initialise some common arguments to the solver adapter.
4949
50+
:param n: number of input variables (default 2)
51+
:type n: int
52+
5053
These arguments are shared between some of the test cases.
5154
"""
5255
# No bounds on x values set
53-
n = 2
5456
self.x = np.zeros(n)
5557
self.ilower = np.zeros(n)
5658
self.iupper = np.zeros(n)
@@ -564,6 +566,7 @@ def get_case5():
564566
"""
565567
# Create a case-specific Vmcon object with overridden fcnvmc1 and 2
566568
case = Case("5", Evaluator5())
569+
case.solver_args = SolverArgs(n=1)
567570

568571
# Set up vmcon values for this case
569572
neqns = 1

0 commit comments

Comments
 (0)