ommx-openjij-adapter 2.0.3__tar.gz → 2.0.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ommx_openjij_adapter
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: OMMX Adapter for OpenJij.
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 :: MIT License
15
15
  Requires-Python: <3.13,>=3.9
16
16
  Description-Content-Type: text/markdown
17
17
  Requires-Dist: ommx<3.0.0,>=2.0.0rc1
18
- Requires-Dist: openjij<0.10.0,>=0.9.2
18
+ Requires-Dist: openjij<1.0.0,>=0.9.2
19
19
 
20
20
  OMMX Adapter for OpenJij
21
21
  =========================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ommx_openjij_adapter
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: OMMX Adapter for OpenJij.
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 :: MIT License
15
15
  Requires-Python: <3.13,>=3.9
16
16
  Description-Content-Type: text/markdown
17
17
  Requires-Dist: ommx<3.0.0,>=2.0.0rc1
18
- Requires-Dist: openjij<0.10.0,>=0.9.2
18
+ Requires-Dist: openjij<1.0.0,>=0.9.2
19
19
 
20
20
  OMMX Adapter for OpenJij
21
21
  =========================
@@ -0,0 +1,2 @@
1
+ ommx<3.0.0,>=2.0.0rc1
2
+ openjij<1.0.0,>=0.9.2
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ommx_openjij_adapter"
7
- version = "2.0.3"
7
+ version = "2.0.4"
8
8
 
9
9
  description = "OMMX Adapter for OpenJij."
10
10
  authors = [{ name = "Jij Inc.", email = "info@j-ij.com" }]
@@ -22,7 +22,7 @@ classifiers = [
22
22
  "License :: OSI Approved :: Apache Software License",
23
23
  "License :: OSI Approved :: MIT License",
24
24
  ]
25
- dependencies = ["ommx >= 2.0.0rc1, < 3.0.0", "openjij >= 0.9.2, < 0.10.0"]
25
+ dependencies = ["ommx >= 2.0.0rc1, < 3.0.0", "openjij >= 0.9.2, < 1.0.0"]
26
26
 
27
27
  [project.urls]
28
28
  Repository = "https://github.com/Jij-Inc/ommx"
@@ -101,7 +101,7 @@ def hubo_binary_no_constraint_minimize():
101
101
  x2 = DecisionVariable.binary(2, name="x", subscripts=[2])
102
102
  instance = Instance.from_components(
103
103
  decision_variables=[x0, x1, x2],
104
- objective=x0 + x0 * x1 * x2,
104
+ objective=x0 + x1 + x2 + x0 * x1 * x2,
105
105
  constraints=[],
106
106
  sense=Instance.MINIMIZE,
107
107
  )
@@ -173,8 +173,11 @@ def hubo_binary_inequality():
173
173
  ],
174
174
  )
175
175
  def test_sample(instance, ans):
176
+ # The uniform_penalty_weight of 3.1 was chosen to resolve multiple optimal solutions
177
+ # effectively. This value was determined based on prior experimentation and ensures
178
+ # that constraints are sufficiently penalized without overwhelming the objective.
176
179
  sample_set = OMMXOpenJijSAAdapter.sample(
177
- instance, num_reads=1, uniform_penalty_weight=3.0, seed=999
180
+ instance, num_reads=1, uniform_penalty_weight=3.1, seed=999
178
181
  )
179
182
  assert sample_set.extract_decision_variables("x", 0) == ans
180
183
 
@@ -196,7 +199,7 @@ def test_sample(instance, ans):
196
199
  )
197
200
  def test_solve(instance, ans):
198
201
  solution = OMMXOpenJijSAAdapter.solve(
199
- instance, num_reads=1, uniform_penalty_weight=3.0, seed=999
202
+ instance, num_reads=1, uniform_penalty_weight=3.1, seed=999
200
203
  )
201
204
  assert solution.extract_decision_variables("x") == ans
202
205
 
@@ -1,2 +0,0 @@
1
- ommx<3.0.0,>=2.0.0rc1
2
- openjij<0.10.0,>=0.9.2