ommx-python-mip-adapter 1.8.4__tar.gz → 1.8.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/PKG-INFO +2 -2
  2. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter/adapter.py +3 -2
  3. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter.egg-info/PKG-INFO +2 -2
  4. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter.egg-info/requires.txt +1 -1
  5. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/pyproject.toml +2 -2
  6. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/tests/test_integration.py +3 -1
  7. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/README.md +0 -0
  8. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter/__init__.py +0 -0
  9. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter/exception.py +0 -0
  10. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter/python_mip_to_ommx.py +0 -0
  11. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter.egg-info/SOURCES.txt +0 -0
  12. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter.egg-info/dependency_links.txt +0 -0
  13. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/ommx_python_mip_adapter.egg-info/top_level.txt +0 -0
  14. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/setup.cfg +0 -0
  15. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/tests/test_adapter.py +0 -0
  16. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/tests/test_constant_constraint.py +0 -0
  17. {ommx_python_mip_adapter-1.8.4 → ommx_python_mip_adapter-1.8.5}/tests/test_model_to_instance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ommx_python_mip_adapter
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary: An adapter for the Python-MIP from/to OMMX.
5
5
  Author-email: "Jij Inc." <info@j-ij.com>
6
6
  Project-URL: Repository, https://github.com/Jij-Inc/ommx
@@ -13,7 +13,7 @@ Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Requires-Python: >=3.9
15
15
  Description-Content-Type: text/markdown
16
- Requires-Dist: ommx<2.0.0,>=1.8.4
16
+ Requires-Dist: ommx<2.0.0,>=1.8.5
17
17
  Requires-Dist: mip<2.0.0,>=1.15.0
18
18
 
19
19
  OMMX adapter for Python-MIP
@@ -58,8 +58,9 @@ class OMMXPythonMIPAdapter(SolverAdapter):
58
58
  else:
59
59
  self._relax = False
60
60
 
61
- @staticmethod
61
+ @classmethod
62
62
  def solve(
63
+ cls,
63
64
  ommx_instance: Instance,
64
65
  relax: bool = False,
65
66
  verbose: bool = False,
@@ -173,7 +174,7 @@ class OMMXPythonMIPAdapter(SolverAdapter):
173
174
  1.0
174
175
 
175
176
  """
176
- adapter = OMMXPythonMIPAdapter(ommx_instance, relax=relax, verbose=verbose)
177
+ adapter = cls(ommx_instance, relax=relax, verbose=verbose)
177
178
  model = adapter.solver_input
178
179
  model.optimize(relax=relax)
179
180
  return adapter.decode(model)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ommx_python_mip_adapter
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary: An adapter for the Python-MIP from/to OMMX.
5
5
  Author-email: "Jij Inc." <info@j-ij.com>
6
6
  Project-URL: Repository, https://github.com/Jij-Inc/ommx
@@ -13,7 +13,7 @@ Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Requires-Python: >=3.9
15
15
  Description-Content-Type: text/markdown
16
- Requires-Dist: ommx<2.0.0,>=1.8.4
16
+ Requires-Dist: ommx<2.0.0,>=1.8.5
17
17
  Requires-Dist: mip<2.0.0,>=1.15.0
18
18
 
19
19
  OMMX adapter for Python-MIP
@@ -1,2 +1,2 @@
1
- ommx<2.0.0,>=1.8.4
1
+ ommx<2.0.0,>=1.8.5
2
2
  mip<2.0.0,>=1.15.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ommx_python_mip_adapter"
7
- version = "1.8.4"
7
+ version = "1.8.5"
8
8
 
9
9
  description = "An adapter for the Python-MIP from/to OMMX."
10
10
  authors = [{ name = "Jij Inc.", email = "info@j-ij.com" }]
@@ -25,7 +25,7 @@ classifiers = [
25
25
  # To support Python 3.12 and Apple silicon systems, this requires latest version of Python-MIP (will be 1.16.0?),
26
26
  # which does not release yet. https://github.com/coin-or/python-mip/issues/384
27
27
  # This project uses dev-dependency to use the latest version of Python-MIP not to include pre-release version in the release.
28
- dependencies = ["ommx >= 1.8.4, < 2.0.0", "mip >= 1.15.0, < 2.0.0"]
28
+ dependencies = ["ommx >= 1.8.5, < 2.0.0","mip >= 1.15.0, < 2.0.0"]
29
29
 
30
30
  [project.urls]
31
31
  Repository = "https://github.com/Jij-Inc/ommx"
@@ -27,7 +27,9 @@ def test_integration_lp(generater):
27
27
  expected_solution = generater.get_v1_state()
28
28
  assert ommx_state.entries.keys() == expected_solution.entries.keys()
29
29
  for key in ommx_state.entries.keys():
30
- assert ommx_state.entries[key] == pytest.approx(expected_solution.entries[key])
30
+ assert ommx_state.entries[key] == pytest.approx(
31
+ expected_solution.entries[key], abs=1e-6
32
+ )
31
33
 
32
34
 
33
35
  def test_integration_milp():