Skip to content

Commit

Permalink
clear lists, bump dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed May 12, 2024
1 parent 1fe470d commit 4439389
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -8,7 +8,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "highspy"
version = "1.7.1.dev1"
version = "1.7.1.dev2"
description = "A thin set of pybind11 wrappers to HiGHS"
authors = [{ name = "HiGHS developers", email = "highsopt@gmail.com" }]
readme = "README.md"
Expand Down
3 changes: 3 additions & 0 deletions src/highspy/highs.py
Expand Up @@ -121,6 +121,8 @@ def update(self):

self._batch = highs_batch(self)
print("DEBUG update(self): On exit - current_batch_size = ", len(self._batch.obj))
self._vars.clear()
self._cons.clear()

def val(self, var):
return super().getSolution().col_value[var.index]
Expand Down Expand Up @@ -218,6 +220,7 @@ def allConstrDuals(self):
# highspy binding to Highs::addVar
def addVariable(self, lb = 0, ub = kHighsInf, obj = 0, type=HighsVarType.kContinuous, name = None, update = False):
print("\nDEBUG addVariable: name = ", name, "; obj = ", obj, "; lb = ", lb, "; ub = ", ub, " with update = ", update)

var = self._batch.add(obj, lb, ub, type, name, self)
self._vars.append(var)
# No longer acumulate a batch of variables so that addVariable
Expand Down

0 comments on commit 4439389

Please sign in to comment.