@@ -53,6 +53,23 @@ def __init__(
5353 solver : Optional [mip .Solver ] = None ,
5454 ):
5555 """Model constructor
56+ tests/unit/test_portfolio_optimisation/hs/execution/reports/test_aantal_ibn_report.py:29 (TestCaseAantalIBNReport.test_aantal_ibn_vraag_overview)
57+ 2 != 3
58+
59+ Expected :3
60+ Actual :2
61+ <Click to see difference>
62+
63+ cls = <class 'tests.unit.test_portfolio_optimisation.hs.execution.reports.test_aantal_ibn_report.TestCaseAantalIBNReport'>
64+
65+ @classmethod
66+ def setUp(cls):
67+ cls.portfolio = dummy_hs_portfolio()
68+ > model, result = optimize_plan(cls.portfolio)
69+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70+
71+ tests/unit/test_portfolio_optimisation/hs/execution/reports/test_aantal_ibn_report.py:27: AssertionError
72+
5673
5774 Creates a Mixed-Integer Linear Programming Model. The default model
5875 optimization direction is Minimization. To store and optimize the model
@@ -471,7 +488,7 @@ def constr_by_name(self: "Model", name: str) -> Optional["mip.Constr"]:
471488 constraint or None if not found
472489 """
473490 cidx = self .solver .constr_get_index (name )
474- if cidx < 0 or cidx > len (self .constrs ):
491+ if cidx < 0 or cidx >= len (self .constrs ):
475492 return None
476493 return self .constrs [cidx ]
477494
@@ -484,7 +501,7 @@ def var_by_name(self: "Model", name: str) -> Optional["mip.Var"]:
484501 Variable or None if not found
485502 """
486503 v = self .solver .var_get_index (name )
487- if v < 0 or v > len (self .vars ):
504+ if v < 0 or v >= len (self .vars ):
488505 return None
489506 return self .vars [v ]
490507
0 commit comments