ommx-python-mip-adapter 3.0.0b8__tar.gz → 3.0.0b9__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.
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/PKG-INFO +2 -2
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter/adapter.py +4 -4
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter.egg-info/PKG-INFO +2 -2
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter.egg-info/requires.txt +1 -1
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/pyproject.toml +2 -2
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_model_to_instance.py +6 -6
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/README.md +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter/__init__.py +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter/exception.py +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter/python_mip_to_ommx.py +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter.egg-info/SOURCES.txt +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter.egg-info/dependency_links.txt +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/ommx_python_mip_adapter.egg-info/top_level.txt +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/setup.cfg +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_adapter.py +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_constant_constraint.py +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_integration.py +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_tracing.py +0 -0
- {ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_unknown_constraint_family.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ommx_python_mip_adapter
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b9
|
|
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
|
|
@@ -15,7 +15,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: ommx<4.0.0,>=3.0.
|
|
18
|
+
Requires-Dist: ommx<4.0.0,>=3.0.0b9
|
|
19
19
|
Requires-Dist: mip<2.0.0,>=1.17.0
|
|
20
20
|
Requires-Dist: cffi<2.0.0,>=1.15.0
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@ from ommx import (
|
|
|
25
25
|
PreparationPolicy,
|
|
26
26
|
Sense,
|
|
27
27
|
Solution,
|
|
28
|
-
|
|
28
|
+
ConstraintKind,
|
|
29
29
|
SpecialConstraintPreparation,
|
|
30
30
|
State,
|
|
31
31
|
)
|
|
@@ -68,9 +68,9 @@ class OMMXPythonMIPAdapter(SolverAdapter):
|
|
|
68
68
|
return PreparationPolicy(
|
|
69
69
|
special_constraints=SpecialConstraintPreparation.lower_special_constraints(
|
|
70
70
|
kinds={
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
ConstraintKind.Indicator,
|
|
72
|
+
ConstraintKind.OneHot,
|
|
73
|
+
ConstraintKind.Sos1,
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ommx_python_mip_adapter
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b9
|
|
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
|
|
@@ -15,7 +15,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: ommx<4.0.0,>=3.0.
|
|
18
|
+
Requires-Dist: ommx<4.0.0,>=3.0.0b9
|
|
19
19
|
Requires-Dist: mip<2.0.0,>=1.17.0
|
|
20
20
|
Requires-Dist: cffi<2.0.0,>=1.15.0
|
|
21
21
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ommx_python_mip_adapter"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.0b9"
|
|
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" }]
|
|
@@ -23,7 +23,7 @@ classifiers = [
|
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
dependencies = [
|
|
26
|
-
"ommx >= 3.0.
|
|
26
|
+
"ommx >= 3.0.0b9, < 4.0.0",
|
|
27
27
|
"mip >= 1.17.0, < 2.0.0",
|
|
28
28
|
"cffi >= 1.15.0, < 2.0.0",
|
|
29
29
|
]
|
{ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_model_to_instance.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import mip
|
|
2
2
|
|
|
3
|
-
from ommx import Equality, Kind, Sense
|
|
3
|
+
from ommx import ConstraintKind, Equality, Kind, Sense
|
|
4
4
|
|
|
5
5
|
from ommx_python_mip_adapter import model_to_instance
|
|
6
6
|
|
|
@@ -80,7 +80,7 @@ def test_milp():
|
|
|
80
80
|
# Check the constraints
|
|
81
81
|
assert len(ommx_instance.constraints) == 3
|
|
82
82
|
|
|
83
|
-
constraint1 = ommx_instance.constraints.of_kind(
|
|
83
|
+
constraint1 = ommx_instance.constraints.of_kind(ConstraintKind.Regular)[0]
|
|
84
84
|
assert constraint1.equality == Equality.EqualToZero
|
|
85
85
|
assert constraint1.function.degree() == 1
|
|
86
86
|
assert constraint1.function.constant_term == 6
|
|
@@ -89,7 +89,7 @@ def test_milp():
|
|
|
89
89
|
assert constraint1_terms[0] == 4
|
|
90
90
|
assert constraint1_terms[1] == -5
|
|
91
91
|
|
|
92
|
-
constraint2 = ommx_instance.constraints.of_kind(
|
|
92
|
+
constraint2 = ommx_instance.constraints.of_kind(ConstraintKind.Regular)[1]
|
|
93
93
|
assert constraint2.equality == Equality.LessThanOrEqualToZero
|
|
94
94
|
assert constraint2.function.degree() == 1
|
|
95
95
|
assert constraint2.function.constant_term == -9
|
|
@@ -98,7 +98,7 @@ def test_milp():
|
|
|
98
98
|
assert constraint2_terms[0] == -7
|
|
99
99
|
assert constraint2_terms[2] == 8
|
|
100
100
|
|
|
101
|
-
constraint3 = ommx_instance.constraints.of_kind(
|
|
101
|
+
constraint3 = ommx_instance.constraints.of_kind(ConstraintKind.Regular)[2]
|
|
102
102
|
assert constraint3.equality == Equality.LessThanOrEqualToZero
|
|
103
103
|
assert constraint3.function.degree() == 1
|
|
104
104
|
assert constraint3.function.constant_term == -12
|
|
@@ -162,7 +162,7 @@ def test_no_objective_model():
|
|
|
162
162
|
# Check the constraints
|
|
163
163
|
assert len(ommx_instance.constraints) == 2
|
|
164
164
|
|
|
165
|
-
constraint1 = ommx_instance.constraints.of_kind(
|
|
165
|
+
constraint1 = ommx_instance.constraints.of_kind(ConstraintKind.Regular)[0]
|
|
166
166
|
assert constraint1.equality == Equality.EqualToZero
|
|
167
167
|
assert constraint1.function.degree() == 1
|
|
168
168
|
assert constraint1.function.constant_term == -5
|
|
@@ -171,7 +171,7 @@ def test_no_objective_model():
|
|
|
171
171
|
assert constraint1_terms[0] == 1
|
|
172
172
|
assert constraint1_terms[1] == 2
|
|
173
173
|
|
|
174
|
-
constraint2 = ommx_instance.constraints.of_kind(
|
|
174
|
+
constraint2 = ommx_instance.constraints.of_kind(ConstraintKind.Regular)[1]
|
|
175
175
|
assert constraint2.equality == Equality.EqualToZero
|
|
176
176
|
assert constraint2.function.degree() == 1
|
|
177
177
|
assert constraint2.function.constant_term == -10
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ommx_python_mip_adapter-3.0.0b8 → ommx_python_mip_adapter-3.0.0b9}/tests/test_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|