jijmodeling 0.13.2__cp39-cp39-win_amd64.whl → 1.12.0__cp39-cp39-win_amd64.whl

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.

Potentially problematic release.


This version of jijmodeling might be problematic. Click here for more details.

Files changed (234) hide show
  1. jijmodeling/__init__.py +1 -154
  2. jijmodeling/__init__.pyi +5152 -0
  3. jijmodeling/_jijmodeling.cp39-win_amd64.pyd +0 -0
  4. jijmodeling/dataset.py +5 -0
  5. jijmodeling/dataset.pyi +106 -0
  6. jijmodeling/experimental.py +13 -0
  7. jijmodeling/experimental.pyi +302 -0
  8. jijmodeling/py.typed +0 -0
  9. jijmodeling/range/__init__.py +14 -0
  10. jijmodeling/range/__init__.pyi +56 -0
  11. jijmodeling/range/size.py +14 -0
  12. jijmodeling/range/size.pyi +54 -0
  13. jijmodeling/range/value.py +14 -0
  14. jijmodeling/range/value.pyi +54 -0
  15. jijmodeling-1.12.0.dist-info/METADATA +235 -0
  16. jijmodeling-1.12.0.dist-info/RECORD +18 -0
  17. {jijmodeling-0.13.2.dist-info → jijmodeling-1.12.0.dist-info}/WHEEL +1 -2
  18. {jijmodeling-0.13.2.dist-info → jijmodeling-1.12.0.dist-info/licenses}/LICENSE.txt +1 -1
  19. jijmodeling/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  20. jijmodeling/__pycache__/__init__.cpython-39.pyc +0 -0
  21. jijmodeling/__pycache__/_version.cpython-39.opt-1.pyc +0 -0
  22. jijmodeling/__pycache__/_version.cpython-39.pyc +0 -0
  23. jijmodeling/_version.py +0 -4
  24. jijmodeling/deprecation/__init__.py +0 -11
  25. jijmodeling/deprecation/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  26. jijmodeling/deprecation/__pycache__/__init__.cpython-39.pyc +0 -0
  27. jijmodeling/deprecation/__pycache__/deprecation.cpython-39.opt-1.pyc +0 -0
  28. jijmodeling/deprecation/__pycache__/deprecation.cpython-39.pyc +0 -0
  29. jijmodeling/deprecation/deprecation.py +0 -108
  30. jijmodeling/exceptions/__init__.py +0 -26
  31. jijmodeling/exceptions/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  32. jijmodeling/exceptions/__pycache__/__init__.cpython-39.pyc +0 -0
  33. jijmodeling/exceptions/__pycache__/exceptions.cpython-39.opt-1.pyc +0 -0
  34. jijmodeling/exceptions/__pycache__/exceptions.cpython-39.pyc +0 -0
  35. jijmodeling/exceptions/exceptions.py +0 -37
  36. jijmodeling/expression/__init__.py +0 -76
  37. jijmodeling/expression/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  38. jijmodeling/expression/__pycache__/__init__.cpython-39.pyc +0 -0
  39. jijmodeling/expression/__pycache__/condition.cpython-39.opt-1.pyc +0 -0
  40. jijmodeling/expression/__pycache__/condition.cpython-39.pyc +0 -0
  41. jijmodeling/expression/__pycache__/constraint.cpython-39.opt-1.pyc +0 -0
  42. jijmodeling/expression/__pycache__/constraint.cpython-39.pyc +0 -0
  43. jijmodeling/expression/__pycache__/expression.cpython-39.opt-1.pyc +0 -0
  44. jijmodeling/expression/__pycache__/expression.cpython-39.pyc +0 -0
  45. jijmodeling/expression/__pycache__/extract.cpython-39.opt-1.pyc +0 -0
  46. jijmodeling/expression/__pycache__/extract.cpython-39.pyc +0 -0
  47. jijmodeling/expression/__pycache__/from_old_serializable.cpython-39.opt-1.pyc +0 -0
  48. jijmodeling/expression/__pycache__/from_old_serializable.cpython-39.pyc +0 -0
  49. jijmodeling/expression/__pycache__/mathfunc.cpython-39.opt-1.pyc +0 -0
  50. jijmodeling/expression/__pycache__/mathfunc.cpython-39.pyc +0 -0
  51. jijmodeling/expression/__pycache__/prod.cpython-39.opt-1.pyc +0 -0
  52. jijmodeling/expression/__pycache__/prod.cpython-39.pyc +0 -0
  53. jijmodeling/expression/__pycache__/serializable.cpython-39.opt-1.pyc +0 -0
  54. jijmodeling/expression/__pycache__/serializable.cpython-39.pyc +0 -0
  55. jijmodeling/expression/__pycache__/sum.cpython-39.opt-1.pyc +0 -0
  56. jijmodeling/expression/__pycache__/sum.cpython-39.pyc +0 -0
  57. jijmodeling/expression/__pycache__/type_annotations.cpython-39.opt-1.pyc +0 -0
  58. jijmodeling/expression/__pycache__/type_annotations.cpython-39.pyc +0 -0
  59. jijmodeling/expression/__pycache__/utils.cpython-39.opt-1.pyc +0 -0
  60. jijmodeling/expression/__pycache__/utils.cpython-39.pyc +0 -0
  61. jijmodeling/expression/condition.py +0 -378
  62. jijmodeling/expression/constraint.py +0 -428
  63. jijmodeling/expression/expression.py +0 -768
  64. jijmodeling/expression/extract.py +0 -186
  65. jijmodeling/expression/from_old_serializable.py +0 -137
  66. jijmodeling/expression/mathfunc.py +0 -335
  67. jijmodeling/expression/prod.py +0 -172
  68. jijmodeling/expression/serializable.py +0 -142
  69. jijmodeling/expression/sum.py +0 -261
  70. jijmodeling/expression/type_annotations.py +0 -50
  71. jijmodeling/expression/utils.py +0 -202
  72. jijmodeling/expression/variables/__init__.py +0 -39
  73. jijmodeling/expression/variables/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  74. jijmodeling/expression/variables/__pycache__/__init__.cpython-39.pyc +0 -0
  75. jijmodeling/expression/variables/__pycache__/deci_vars.cpython-39.opt-1.pyc +0 -0
  76. jijmodeling/expression/variables/__pycache__/deci_vars.cpython-39.pyc +0 -0
  77. jijmodeling/expression/variables/__pycache__/jagged_array.cpython-39.opt-1.pyc +0 -0
  78. jijmodeling/expression/variables/__pycache__/jagged_array.cpython-39.pyc +0 -0
  79. jijmodeling/expression/variables/__pycache__/placeholders.cpython-39.opt-1.pyc +0 -0
  80. jijmodeling/expression/variables/__pycache__/placeholders.cpython-39.pyc +0 -0
  81. jijmodeling/expression/variables/__pycache__/variable.cpython-39.opt-1.pyc +0 -0
  82. jijmodeling/expression/variables/__pycache__/variable.cpython-39.pyc +0 -0
  83. jijmodeling/expression/variables/deci_vars.py +0 -212
  84. jijmodeling/expression/variables/jagged_array.py +0 -81
  85. jijmodeling/expression/variables/placeholders.py +0 -132
  86. jijmodeling/expression/variables/variable.py +0 -524
  87. jijmodeling/latex_repr/__init__.py +0 -11
  88. jijmodeling/latex_repr/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  89. jijmodeling/latex_repr/__pycache__/__init__.cpython-39.pyc +0 -0
  90. jijmodeling/latex_repr/__pycache__/latex_repr.cpython-39.opt-1.pyc +0 -0
  91. jijmodeling/latex_repr/__pycache__/latex_repr.cpython-39.pyc +0 -0
  92. jijmodeling/latex_repr/__pycache__/problem_latex_repr.cpython-39.opt-1.pyc +0 -0
  93. jijmodeling/latex_repr/__pycache__/problem_latex_repr.cpython-39.pyc +0 -0
  94. jijmodeling/latex_repr/latex_repr.py +0 -243
  95. jijmodeling/latex_repr/problem_latex_repr.py +0 -210
  96. jijmodeling/marker/__marker__.cp39-win_amd64.pyd +0 -0
  97. jijmodeling/match/__init__.py +0 -19
  98. jijmodeling/match/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  99. jijmodeling/match/__pycache__/__init__.cpython-39.pyc +0 -0
  100. jijmodeling/match/__pycache__/condition_same.cpython-39.opt-1.pyc +0 -0
  101. jijmodeling/match/__pycache__/condition_same.cpython-39.pyc +0 -0
  102. jijmodeling/match/__pycache__/constraint_same.cpython-39.opt-1.pyc +0 -0
  103. jijmodeling/match/__pycache__/constraint_same.cpython-39.pyc +0 -0
  104. jijmodeling/match/__pycache__/expand.cpython-39.opt-1.pyc +0 -0
  105. jijmodeling/match/__pycache__/expand.cpython-39.pyc +0 -0
  106. jijmodeling/match/__pycache__/expr_same.cpython-39.opt-1.pyc +0 -0
  107. jijmodeling/match/__pycache__/expr_same.cpython-39.pyc +0 -0
  108. jijmodeling/match/__pycache__/is_same_expr.cpython-39.opt-1.pyc +0 -0
  109. jijmodeling/match/__pycache__/is_same_expr.cpython-39.pyc +0 -0
  110. jijmodeling/match/__pycache__/penalty_same.cpython-39.opt-1.pyc +0 -0
  111. jijmodeling/match/__pycache__/penalty_same.cpython-39.pyc +0 -0
  112. jijmodeling/match/__pycache__/problem_same.cpython-39.opt-1.pyc +0 -0
  113. jijmodeling/match/__pycache__/problem_same.cpython-39.pyc +0 -0
  114. jijmodeling/match/__pycache__/replace.cpython-39.opt-1.pyc +0 -0
  115. jijmodeling/match/__pycache__/replace.cpython-39.pyc +0 -0
  116. jijmodeling/match/condition_same.py +0 -44
  117. jijmodeling/match/constraint_same.py +0 -53
  118. jijmodeling/match/expand.py +0 -84
  119. jijmodeling/match/expr_same.py +0 -32
  120. jijmodeling/match/is_same_expr.py +0 -306
  121. jijmodeling/match/penalty_same.py +0 -31
  122. jijmodeling/match/problem_same.py +0 -44
  123. jijmodeling/match/replace.py +0 -249
  124. jijmodeling/problem/__init__.py +0 -9
  125. jijmodeling/problem/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  126. jijmodeling/problem/__pycache__/__init__.cpython-39.pyc +0 -0
  127. jijmodeling/problem/__pycache__/problem.cpython-39.opt-1.pyc +0 -0
  128. jijmodeling/problem/__pycache__/problem.cpython-39.pyc +0 -0
  129. jijmodeling/problem/problem.py +0 -186
  130. jijmodeling/protobuf/__init__.py +0 -8
  131. jijmodeling/protobuf/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  132. jijmodeling/protobuf/__pycache__/__init__.cpython-39.pyc +0 -0
  133. jijmodeling/protobuf/__pycache__/from_protobuf.cpython-39.opt-1.pyc +0 -0
  134. jijmodeling/protobuf/__pycache__/from_protobuf.cpython-39.pyc +0 -0
  135. jijmodeling/protobuf/__pycache__/to_protobuf.cpython-39.opt-1.pyc +0 -0
  136. jijmodeling/protobuf/__pycache__/to_protobuf.cpython-39.pyc +0 -0
  137. jijmodeling/protobuf/__pycache__/type_annotations.cpython-39.opt-1.pyc +0 -0
  138. jijmodeling/protobuf/__pycache__/type_annotations.cpython-39.pyc +0 -0
  139. jijmodeling/protobuf/from_protobuf.py +0 -336
  140. jijmodeling/protobuf/pb2/__init__.py +0 -42
  141. jijmodeling/protobuf/pb2/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  142. jijmodeling/protobuf/pb2/__pycache__/__init__.cpython-39.pyc +0 -0
  143. jijmodeling/protobuf/pb2/__pycache__/array_length_pb2.cpython-39.opt-1.pyc +0 -0
  144. jijmodeling/protobuf/pb2/__pycache__/array_length_pb2.cpython-39.pyc +0 -0
  145. jijmodeling/protobuf/pb2/__pycache__/binary_op_pb2.cpython-39.opt-1.pyc +0 -0
  146. jijmodeling/protobuf/pb2/__pycache__/binary_op_pb2.cpython-39.pyc +0 -0
  147. jijmodeling/protobuf/pb2/__pycache__/commutative_op_pb2.cpython-39.opt-1.pyc +0 -0
  148. jijmodeling/protobuf/pb2/__pycache__/commutative_op_pb2.cpython-39.pyc +0 -0
  149. jijmodeling/protobuf/pb2/__pycache__/constraint_pb2.cpython-39.opt-1.pyc +0 -0
  150. jijmodeling/protobuf/pb2/__pycache__/constraint_pb2.cpython-39.pyc +0 -0
  151. jijmodeling/protobuf/pb2/__pycache__/custom_penalty_term_pb2.cpython-39.opt-1.pyc +0 -0
  152. jijmodeling/protobuf/pb2/__pycache__/custom_penalty_term_pb2.cpython-39.pyc +0 -0
  153. jijmodeling/protobuf/pb2/__pycache__/decision_var_pb2.cpython-39.opt-1.pyc +0 -0
  154. jijmodeling/protobuf/pb2/__pycache__/decision_var_pb2.cpython-39.pyc +0 -0
  155. jijmodeling/protobuf/pb2/__pycache__/element_pb2.cpython-39.opt-1.pyc +0 -0
  156. jijmodeling/protobuf/pb2/__pycache__/element_pb2.cpython-39.pyc +0 -0
  157. jijmodeling/protobuf/pb2/__pycache__/expression_pb2.cpython-39.opt-1.pyc +0 -0
  158. jijmodeling/protobuf/pb2/__pycache__/expression_pb2.cpython-39.pyc +0 -0
  159. jijmodeling/protobuf/pb2/__pycache__/forall_pb2.cpython-39.opt-1.pyc +0 -0
  160. jijmodeling/protobuf/pb2/__pycache__/forall_pb2.cpython-39.pyc +0 -0
  161. jijmodeling/protobuf/pb2/__pycache__/header_pb2.cpython-39.opt-1.pyc +0 -0
  162. jijmodeling/protobuf/pb2/__pycache__/header_pb2.cpython-39.pyc +0 -0
  163. jijmodeling/protobuf/pb2/__pycache__/index_pb2.cpython-39.opt-1.pyc +0 -0
  164. jijmodeling/protobuf/pb2/__pycache__/index_pb2.cpython-39.pyc +0 -0
  165. jijmodeling/protobuf/pb2/__pycache__/number_lit_pb2.cpython-39.opt-1.pyc +0 -0
  166. jijmodeling/protobuf/pb2/__pycache__/number_lit_pb2.cpython-39.pyc +0 -0
  167. jijmodeling/protobuf/pb2/__pycache__/placeholder_pb2.cpython-39.opt-1.pyc +0 -0
  168. jijmodeling/protobuf/pb2/__pycache__/placeholder_pb2.cpython-39.pyc +0 -0
  169. jijmodeling/protobuf/pb2/__pycache__/problem_pb2.cpython-39.opt-1.pyc +0 -0
  170. jijmodeling/protobuf/pb2/__pycache__/problem_pb2.cpython-39.pyc +0 -0
  171. jijmodeling/protobuf/pb2/__pycache__/reduction_op_pb2.cpython-39.opt-1.pyc +0 -0
  172. jijmodeling/protobuf/pb2/__pycache__/reduction_op_pb2.cpython-39.pyc +0 -0
  173. jijmodeling/protobuf/pb2/__pycache__/subscript_pb2.cpython-39.opt-1.pyc +0 -0
  174. jijmodeling/protobuf/pb2/__pycache__/subscript_pb2.cpython-39.pyc +0 -0
  175. jijmodeling/protobuf/pb2/__pycache__/unary_op_pb2.cpython-39.opt-1.pyc +0 -0
  176. jijmodeling/protobuf/pb2/__pycache__/unary_op_pb2.cpython-39.pyc +0 -0
  177. jijmodeling/protobuf/pb2/array_length_pb2.py +0 -27
  178. jijmodeling/protobuf/pb2/binary_op_pb2.py +0 -27
  179. jijmodeling/protobuf/pb2/commutative_op_pb2.py +0 -27
  180. jijmodeling/protobuf/pb2/constraint_pb2.py +0 -31
  181. jijmodeling/protobuf/pb2/custom_penalty_term_pb2.py +0 -31
  182. jijmodeling/protobuf/pb2/decision_var_pb2.py +0 -31
  183. jijmodeling/protobuf/pb2/element_pb2.py +0 -31
  184. jijmodeling/protobuf/pb2/expression_pb2.py +0 -39
  185. jijmodeling/protobuf/pb2/forall_pb2.py +0 -29
  186. jijmodeling/protobuf/pb2/header_pb2.py +0 -31
  187. jijmodeling/protobuf/pb2/index_pb2.py +0 -25
  188. jijmodeling/protobuf/pb2/number_lit_pb2.py +0 -27
  189. jijmodeling/protobuf/pb2/placeholder_pb2.py +0 -25
  190. jijmodeling/protobuf/pb2/problem_pb2.py +0 -40
  191. jijmodeling/protobuf/pb2/reduction_op_pb2.py +0 -30
  192. jijmodeling/protobuf/pb2/subscript_pb2.py +0 -27
  193. jijmodeling/protobuf/pb2/unary_op_pb2.py +0 -27
  194. jijmodeling/protobuf/to_protobuf.py +0 -631
  195. jijmodeling/protobuf/type_annotations.py +0 -52
  196. jijmodeling/sampleset/__init__.py +0 -33
  197. jijmodeling/sampleset/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  198. jijmodeling/sampleset/__pycache__/__init__.cpython-39.pyc +0 -0
  199. jijmodeling/sampleset/__pycache__/evaluation.cpython-39.opt-1.pyc +0 -0
  200. jijmodeling/sampleset/__pycache__/evaluation.cpython-39.pyc +0 -0
  201. jijmodeling/sampleset/__pycache__/measuring_time.cpython-39.opt-1.pyc +0 -0
  202. jijmodeling/sampleset/__pycache__/measuring_time.cpython-39.pyc +0 -0
  203. jijmodeling/sampleset/__pycache__/record.cpython-39.opt-1.pyc +0 -0
  204. jijmodeling/sampleset/__pycache__/record.cpython-39.pyc +0 -0
  205. jijmodeling/sampleset/__pycache__/sampleset.cpython-39.opt-1.pyc +0 -0
  206. jijmodeling/sampleset/__pycache__/sampleset.cpython-39.pyc +0 -0
  207. jijmodeling/sampleset/__pycache__/solving_time.cpython-39.opt-1.pyc +0 -0
  208. jijmodeling/sampleset/__pycache__/solving_time.cpython-39.pyc +0 -0
  209. jijmodeling/sampleset/__pycache__/system_time.cpython-39.opt-1.pyc +0 -0
  210. jijmodeling/sampleset/__pycache__/system_time.cpython-39.pyc +0 -0
  211. jijmodeling/sampleset/evaluation.py +0 -289
  212. jijmodeling/sampleset/measuring_time.py +0 -59
  213. jijmodeling/sampleset/record.py +0 -158
  214. jijmodeling/sampleset/sampleset.py +0 -389
  215. jijmodeling/sampleset/solving_time.py +0 -38
  216. jijmodeling/sampleset/system_time.py +0 -48
  217. jijmodeling/type_annotations/__init__.py +0 -44
  218. jijmodeling/type_annotations/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  219. jijmodeling/type_annotations/__pycache__/__init__.cpython-39.pyc +0 -0
  220. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-39.opt-1.pyc +0 -0
  221. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-39.pyc +0 -0
  222. jijmodeling/type_annotations/type_annotations.py +0 -54
  223. jijmodeling/utils/__init__.py +0 -28
  224. jijmodeling/utils/__pycache__/__init__.cpython-39.opt-1.pyc +0 -0
  225. jijmodeling/utils/__pycache__/__init__.cpython-39.pyc +0 -0
  226. jijmodeling/utils/__pycache__/deprecated.cpython-39.opt-1.pyc +0 -0
  227. jijmodeling/utils/__pycache__/deprecated.cpython-39.pyc +0 -0
  228. jijmodeling/utils/__pycache__/utils.cpython-39.opt-1.pyc +0 -0
  229. jijmodeling/utils/__pycache__/utils.cpython-39.pyc +0 -0
  230. jijmodeling/utils/deprecated.py +0 -17
  231. jijmodeling/utils/utils.py +0 -146
  232. jijmodeling-0.13.2.dist-info/METADATA +0 -60
  233. jijmodeling-0.13.2.dist-info/RECORD +0 -219
  234. jijmodeling-0.13.2.dist-info/top_level.txt +0 -1
@@ -1,336 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import struct
4
- from functools import reduce
5
- from dataclasses import dataclass
6
- import warnings
7
-
8
- from jijmodeling.deprecation.deprecation import JijFutureWarning
9
- import jijmodeling.protobuf.pb2 as pb2
10
-
11
- from jijmodeling.expression.expression import (
12
- DataType,
13
- Expression,
14
- Number,
15
- )
16
- from jijmodeling.expression.mathfunc import (
17
- abs,
18
- ceil,
19
- floor,
20
- log2,
21
- min,
22
- max,
23
- )
24
- from jijmodeling.expression.prod import prod
25
- from jijmodeling.expression.sum import sum
26
- from jijmodeling.expression.variables.deci_vars import (
27
- BinaryVar,
28
- IntegerVar,
29
- DecisionVariable,
30
- )
31
- from jijmodeling.expression.variables.placeholders import ArrayShape, Placeholder
32
- from jijmodeling.expression.variables.variable import Element, Subscripts
33
- from jijmodeling.problem import Problem, ProblemSense
34
- from jijmodeling.expression.constraint import Constraint, Penalty, CustomPenaltyTerm
35
-
36
- # The minimum supported version of the schema.
37
- # If the schema version of the input is less than this version, an error will be returned.
38
- # The version of the schema would be bumped when the schema is changed.
39
- #
40
- # NOTE: If we support backward compatibility, this would be unnecessary, or alternatively, should be set to 0.
41
- MINIMUM_SUPPORTED_VERSION = 1
42
-
43
- # The maximum supported version of the schema.
44
- # If the schema version of the input is greater than this version, an error will be returned.
45
- # The version of the schema would be bumped when the schema is changed.
46
- MAXIMUM_SUPPORTED_VERSION = 1
47
-
48
-
49
- def from_protobuf(buf: bytes):
50
- """
51
- Convert a bytes object in protobuf to a Problem object.
52
-
53
- Args:
54
- bytes (bytes): a bytes object in protobuf
55
-
56
- Returns:
57
- Problem: a Problem object
58
- """
59
- # Convert the bytes object into the `Header` message object.
60
- header = pb2.Header.FromString(buf)
61
-
62
- # Check the schema version.
63
- check_version(header.version)
64
-
65
- body = header.WhichOneof("body")
66
- if body == "expression":
67
- return deserialize_expr(header.expression)
68
- elif body == "problem":
69
- return deserialize_problem(header.problem)
70
- elif body == "constraint":
71
- return deserialize_constraint(header.constraint)
72
- elif body == "custom_penalty_term":
73
- return deserialize_custom_penalty_term(header.custom_penalty_term)
74
-
75
-
76
- def check_version(version: int):
77
- if version < MINIMUM_SUPPORTED_VERSION:
78
- raise ValueError(
79
- f"The schema version {version} is less than the minimum supported version {MINIMUM_SUPPORTED_VERSION}."
80
- )
81
- elif version > MAXIMUM_SUPPORTED_VERSION:
82
- raise ValueError(
83
- f"The schema version {version} is greater than the maximum supported version {MAXIMUM_SUPPORTED_VERSION}."
84
- )
85
-
86
-
87
- def deserialize_problem(message: pb2.Problem) -> Problem:
88
- if message.sense == pb2.Problem.Sense.SENSE_MINIMIZE:
89
- sense = ProblemSense.MINIMUM
90
- elif message.sense == pb2.Problem.Sense.SENSE_MAXIMIZE:
91
- sense = ProblemSense.MAXIMUM
92
- with warnings.catch_warnings():
93
- warnings.simplefilter("ignore", category=JijFutureWarning)
94
- return Problem(
95
- name=message.name,
96
- sense=sense,
97
- objective=deserialize_expr(message.objective_function),
98
- constraints={
99
- name: deserialize_constraint(constraint)
100
- for name, constraint in message.constraints.items()
101
- },
102
- penalties={
103
- name: deserialize_custom_penalty_term(term)
104
- for name, term in message.custom_penalty_terms.items()
105
- },
106
- )
107
-
108
-
109
- def deserialize_constraint(message: pb2.Constraint) -> Constraint:
110
- left = deserialize_expr(message.left)
111
- right = deserialize_expr(message.right)
112
-
113
- if message.sense == pb2.Constraint.Sense.SENSE_EQUAL:
114
- expression = left == right
115
- elif message.sense == pb2.Constraint.Sense.SENSE_LESS_THAN_EQUAL:
116
- expression = left <= right
117
- elif message.sense == pb2.Constraint.Sense.SENSE_GREATER_THAN_EQUAL:
118
- expression = left >= right
119
-
120
- forall_list = deserialize_forall_list(message.forall_list)
121
-
122
- return Constraint(name=message.name, expression=expression, forall=forall_list)
123
-
124
-
125
- def deserialize_forall_list(message: pb2.ForallList):
126
- deserializer = ProtobufExprDeserializer(message.expr_nodes)
127
-
128
- return [deserializer.deserialize_index(index) for index in message.indices]
129
-
130
-
131
- def deserialize_custom_penalty_term(message: pb2.CustomPenaltyTerm) -> Penalty:
132
- term = deserialize_expr(message.term)
133
- forall_list = deserialize_forall_list(message.forall_list)
134
-
135
- return CustomPenaltyTerm(name=message.name, expression=term, forall=forall_list)
136
-
137
-
138
- def deserialize_expr(
139
- message: pb2.Expr,
140
- ) -> Expression:
141
- """
142
- Convert a message object to a `Expression` object.
143
-
144
- Args:
145
- expression (pb.Expression): a `Expression` message
146
-
147
- Returns:
148
- Expression: an instance object that is a subclass of the `Expression` class
149
- """
150
- deserializer = ProtobufExprDeserializer(message.expr_nodes)
151
- root = message.expr_nodes[message.root_id]
152
- return deserializer.deserialize_expr_node(root)
153
-
154
-
155
- @dataclass
156
- class ProtobufExprDeserializer:
157
- expr_nodes: list
158
-
159
- def get_node(self, id: int):
160
- return self.deserialize_expr_node(self.expr_nodes[id])
161
-
162
- def deserialize_number_lit(self, message: pb2.NumberLit) -> Number:
163
- if message.type == pb2.NumberLit.Type.TYPE_INTEGER:
164
- dtype = DataType.INT
165
- # Convert the bits to the integer value.
166
- value = struct.unpack(
167
- ">q",
168
- message.value.to_bytes(length=struct.calcsize(">q"), byteorder="big"),
169
- )[0]
170
- # Case: float
171
- elif message.type == pb2.NumberLit.Type.TYPE_FLOAT:
172
- dtype = DataType.FLOAT
173
- # Convert the bits to the float value.
174
- value = struct.unpack(
175
- ">d",
176
- message.value.to_bytes(length=struct.calcsize(">d"), byteorder="big"),
177
- )[0]
178
-
179
- return Number(value=value, dtype=dtype)
180
-
181
- def deserialize_placeholder(self, message: pb2.Placeholder) -> Placeholder:
182
- return Placeholder(name=message.name, ndim=message.ndim)
183
-
184
- def deserialize_element(self, message: pb2.Element) -> Element:
185
- belong_to = message.WhichOneof("belong_to")
186
- if belong_to == "range":
187
- start = self.get_node(message.range.start_id)
188
- end = self.get_node(message.range.end_id)
189
- return Element(name=message.name, belong_to=(start, end))
190
- elif belong_to == "bound":
191
- bound = self.get_node(message.bound.bound_id)
192
- return Element(name=message.name, belong_to=bound)
193
- else:
194
- raise ValueError(
195
- f"fail to deserialize the {belong_to} message as a parent of the Element."
196
- )
197
-
198
- def deserialize_decision_var(self, message: pb2.DecisionVar) -> DecisionVariable:
199
- name = message.name
200
- shape = [self.get_node(id) for id in message.shape_ids]
201
- if message.type == pb2.DecisionVar.Type.TYPE_BINARY:
202
- return BinaryVar(name, shape=shape)
203
- elif message.type == pb2.DecisionVar.Type.TYPE_INTEGER:
204
- lower_bound = self.get_node(message.lower_bound.bound_id)
205
- upper_bound = self.get_node(message.upper_bound.bound_id)
206
- # NOTE:
207
- # After setting dummy values to the lower and upper bounds,
208
- # set the correct values to them.
209
- var = IntegerVar(name, shape=shape, lower_bound=0, upper_bound=1)
210
- var._lower = lower_bound
211
- var._upper = upper_bound
212
- return var
213
- elif message.type == pb2.DecisionVar.Type.TYPE_CONTINUOUS:
214
- raise ValueError("continuous variable is not supported")
215
- elif message.type == pb2.DecisionVar.Type.TYPE_SEMI_INTEGER:
216
- raise ValueError("semi-integer variable is not supported")
217
- elif message.type == pb2.DecisionVar.Type.TYPE_SEMI_CONTINUOUS:
218
- raise ValueError("semi-continuous variable is not supported")
219
- else:
220
- raise ValueError(
221
- f"unsupported decision variable type (type: {message.type})"
222
- )
223
-
224
- def deserialize_subscript(self, message: pb2.Subscript) -> Subscripts:
225
- subscripts = [self.get_node(id) for id in message.subscript_ids]
226
- var = self.get_node(message.variable_id)
227
- return var[subscripts]
228
-
229
- def deserialize_array_length(self, message: pb2.ArrayLength) -> ArrayShape:
230
- array = self.get_node(message.array_id)
231
- axis = message.axis
232
- return array.shape[axis]
233
-
234
- def deserialize_unary_op(self, message: pb2.UnaryOp):
235
- operand = self.get_node(message.operand_id)
236
- kind = message.kind
237
- if kind == pb2.UnaryOp.Kind.KIND_ABS:
238
- return abs(operand)
239
- elif kind == pb2.UnaryOp.Kind.KIND_CEIL:
240
- return ceil(operand)
241
- elif kind == pb2.UnaryOp.Kind.KIND_FLOOR:
242
- return floor(operand)
243
- elif kind == pb2.UnaryOp.Kind.KIND_LOG_2:
244
- return log2(operand)
245
- elif kind == pb2.UnaryOp.Kind.KIND_LOG_10:
246
- raise ValueError("log10 is not supported")
247
- elif kind == pb2.UnaryOp.Kind.KIND_LOG_E:
248
- raise ValueError("ln is not supported")
249
- else:
250
- raise ValueError(f"unsupported unary operator (kind: {kind}))")
251
-
252
- def deserialize_binary_op(self, message: pb2.BinaryOp):
253
- left = self.get_node(message.left_id)
254
- right = self.get_node(message.right_id)
255
- kind = message.kind
256
- if kind == pb2.BinaryOp.Kind.KIND_POW:
257
- return left**right
258
- elif kind == pb2.BinaryOp.Kind.KIND_MOD:
259
- return left % right
260
- elif kind == pb2.BinaryOp.Kind.KIND_EQ:
261
- return left == right
262
- elif kind == pb2.BinaryOp.Kind.KIND_NOT_EQ:
263
- return left != right
264
- elif kind == pb2.BinaryOp.Kind.KIND_LESS_THAN:
265
- return left < right
266
- elif kind == pb2.BinaryOp.Kind.KIND_LESS_THAN_EQ:
267
- return left <= right
268
- elif kind == pb2.BinaryOp.Kind.KIND_GREATER_THAN:
269
- return left > right
270
- elif kind == pb2.BinaryOp.Kind.KIND_GREATER_THAN_EQ:
271
- return left >= right
272
- else:
273
- raise ValueError(f"unsupported binary operator (kind: {kind})")
274
-
275
- def deserialize_commutative_op(self, message: pb2.CommutativeOp):
276
- first, *rest = message.term_ids
277
- kind = message.kind
278
- if kind == pb2.CommutativeOp.KIND_ADD:
279
- op = lambda acc, id: acc + self.get_node(id)
280
- elif kind == pb2.CommutativeOp.KIND_MUL:
281
- op = lambda acc, id: acc * self.get_node(id)
282
- elif kind == pb2.CommutativeOp.KIND_MIN:
283
- op = lambda acc, id: min(acc, self.get_node(id))
284
- elif kind == pb2.CommutativeOp.KIND_MAX:
285
- op = lambda acc, id: max(acc, self.get_node(id))
286
- elif kind == pb2.CommutativeOp.KIND_AND:
287
- op = lambda acc, id: acc & self.get_node(id)
288
- elif kind == pb2.CommutativeOp.KIND_OR:
289
- op = lambda acc, id: acc | self.get_node(id)
290
- elif kind == pb2.CommutativeOp.KIND_XOR:
291
- op = lambda acc, id: acc ^ self.get_node(id)
292
- else:
293
- raise ValueError(f"unsupported commutative operator (kind: {kind})")
294
- return reduce(op, rest, self.get_node(first))
295
-
296
- def deserialize_index(self, message: pb2.Index):
297
- elt = self.get_node(message.element_id)
298
- if message.HasField("condition_id"):
299
- condition = self.get_node(message.condition_id)
300
- else:
301
- condition = None
302
- return (elt, condition)
303
-
304
- def deserialize_reduction_op(self, message: pb2.ReductionOp):
305
- index, condition = self.deserialize_index(message.index)
306
- operand = self.get_node(message.operand_id)
307
- kind = message.kind
308
- if kind == pb2.ReductionOp.Kind.KIND_SUM:
309
- return sum((index, condition), operand)
310
- elif kind == pb2.ReductionOp.Kind.KIND_PROD:
311
- return prod((index, condition), operand)
312
- else:
313
- raise ValueError(f"unsupported reduction operator (kind: {kind})")
314
-
315
- def deserialize_expr_node(self, message: pb2.ExprNode):
316
- kind = message.WhichOneof("kind")
317
- if kind == "number_lit":
318
- return self.deserialize_number_lit(message.number_lit)
319
- elif kind == "placeholder":
320
- return self.deserialize_placeholder(message.placeholder)
321
- elif kind == "element":
322
- return self.deserialize_element(message.element)
323
- elif kind == "decision_var":
324
- return self.deserialize_decision_var(message.decision_var)
325
- elif kind == "subscript":
326
- return self.deserialize_subscript(message.subscript)
327
- elif kind == "array_length":
328
- return self.deserialize_array_length(message.array_length)
329
- elif kind == "unary_op":
330
- return self.deserialize_unary_op(message.unary_op)
331
- elif kind == "binary_op":
332
- return self.deserialize_binary_op(message.binary_op)
333
- elif kind == "commutative_op":
334
- return self.deserialize_commutative_op(message.commutative_op)
335
- elif kind == "reduction_op":
336
- return self.deserialize_reduction_op(message.reduction_op)
@@ -1,42 +0,0 @@
1
- from pkgutil import extend_path
2
-
3
- __path__ = extend_path(__path__, __name__)
4
-
5
- from jijmodeling.protobuf.pb2.array_length_pb2 import ArrayLength
6
- from jijmodeling.protobuf.pb2.binary_op_pb2 import BinaryOp
7
- from jijmodeling.protobuf.pb2.commutative_op_pb2 import CommutativeOp
8
- from jijmodeling.protobuf.pb2.constraint_pb2 import Constraint
9
- from jijmodeling.protobuf.pb2.custom_penalty_term_pb2 import CustomPenaltyTerm
10
- from jijmodeling.protobuf.pb2.decision_var_pb2 import DecisionVar
11
- from jijmodeling.protobuf.pb2.element_pb2 import Element
12
- from jijmodeling.protobuf.pb2.expression_pb2 import Expr, ExprNode
13
- from jijmodeling.protobuf.pb2.forall_pb2 import ForallList
14
- from jijmodeling.protobuf.pb2.header_pb2 import Header
15
- from jijmodeling.protobuf.pb2.index_pb2 import Index
16
- from jijmodeling.protobuf.pb2.number_lit_pb2 import NumberLit
17
- from jijmodeling.protobuf.pb2.placeholder_pb2 import Placeholder
18
- from jijmodeling.protobuf.pb2.problem_pb2 import Problem
19
- from jijmodeling.protobuf.pb2.reduction_op_pb2 import ReductionOp
20
- from jijmodeling.protobuf.pb2.subscript_pb2 import Subscript
21
- from jijmodeling.protobuf.pb2.unary_op_pb2 import UnaryOp
22
-
23
- __all__ = [
24
- "ArrayLength",
25
- "BinaryOp",
26
- "CommutativeOp",
27
- "Constraint",
28
- "CustomPenaltyTerm",
29
- "DecisionVar",
30
- "Element",
31
- "Expr",
32
- "ExprNode",
33
- "ForallList",
34
- "Header",
35
- "Index",
36
- "NumberLit",
37
- "Placeholder",
38
- "Problem",
39
- "ReductionOp",
40
- "Subscript",
41
- "UnaryOp",
42
- ]
@@ -1,27 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: array_length.proto
4
- """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
- from google.protobuf import descriptor as _descriptor
7
- from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import symbol_database as _symbol_database
9
-
10
- # @@protoc_insertion_point(imports)
11
-
12
- _sym_db = _symbol_database.Default()
13
-
14
-
15
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
16
- b'\n\x12\x61rray_length.proto\x12\x0bjijmodeling"\xe1\x01\n\x0b\x41rrayLength\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.jijmodeling.ArrayLength.Type\x12\x10\n\x08\x61rray_id\x18\x02 \x01(\x04\x12\x0c\n\x04\x61xis\x18\x03 \x01(\x04"\x84\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10TYPE_PLACEHOLDER\x10\x01\x12\x10\n\x0cTYPE_ELEMENT\x10\x02\x12 \n\x1cTYPE_SUBSCRIPTED_PLACEHOLDER\x10\x03\x12\x1c\n\x18TYPE_SUBSCRIPTED_ELEMENT\x10\x04\x62\x06proto3'
17
- )
18
-
19
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
20
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "array_length_pb2", globals())
21
- if _descriptor._USE_C_DESCRIPTORS == False:
22
- DESCRIPTOR._options = None
23
- _ARRAYLENGTH._serialized_start = 36
24
- _ARRAYLENGTH._serialized_end = 261
25
- _ARRAYLENGTH_TYPE._serialized_start = 129
26
- _ARRAYLENGTH_TYPE._serialized_end = 261
27
- # @@protoc_insertion_point(module_scope)
@@ -1,27 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: binary_op.proto
4
- """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
- from google.protobuf import descriptor as _descriptor
7
- from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import symbol_database as _symbol_database
9
-
10
- # @@protoc_insertion_point(imports)
11
-
12
- _sym_db = _symbol_database.Default()
13
-
14
-
15
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
16
- b'\n\x0f\x62inary_op.proto\x12\x0bjijmodeling"\x8c\x02\n\x08\x42inaryOp\x12(\n\x04kind\x18\x01 \x01(\x0e\x32\x1a.jijmodeling.BinaryOp.Kind\x12\x0f\n\x07left_id\x18\x02 \x01(\x04\x12\x10\n\x08right_id\x18\x03 \x01(\x04"\xb2\x01\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_POW\x10\x01\x12\x0c\n\x08KIND_MOD\x10\x02\x12\x0b\n\x07KIND_EQ\x10\x03\x12\x0f\n\x0bKIND_NOT_EQ\x10\x04\x12\x12\n\x0eKIND_LESS_THAN\x10\x05\x12\x15\n\x11KIND_LESS_THAN_EQ\x10\x06\x12\x15\n\x11KIND_GREATER_THAN\x10\x07\x12\x18\n\x14KIND_GREATER_THAN_EQ\x10\x08\x62\x06proto3'
17
- )
18
-
19
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
20
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "binary_op_pb2", globals())
21
- if _descriptor._USE_C_DESCRIPTORS == False:
22
- DESCRIPTOR._options = None
23
- _BINARYOP._serialized_start = 33
24
- _BINARYOP._serialized_end = 301
25
- _BINARYOP_KIND._serialized_start = 123
26
- _BINARYOP_KIND._serialized_end = 301
27
- # @@protoc_insertion_point(module_scope)
@@ -1,27 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: commutative_op.proto
4
- """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
- from google.protobuf import descriptor as _descriptor
7
- from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import symbol_database as _symbol_database
9
-
10
- # @@protoc_insertion_point(imports)
11
-
12
- _sym_db = _symbol_database.Default()
13
-
14
-
15
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
16
- b'\n\x14\x63ommutative_op.proto\x12\x0bjijmodeling"\xcf\x01\n\rCommutativeOp\x12-\n\x04kind\x18\x01 \x01(\x0e\x32\x1f.jijmodeling.CommutativeOp.Kind\x12\x10\n\x08term_ids\x18\x02 \x03(\x04"}\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_ADD\x10\x01\x12\x0c\n\x08KIND_MUL\x10\x02\x12\x0c\n\x08KIND_MIN\x10\x03\x12\x0c\n\x08KIND_MAX\x10\x04\x12\x0c\n\x08KIND_AND\x10\x05\x12\x0b\n\x07KIND_OR\x10\x06\x12\x0c\n\x08KIND_XOR\x10\x07\x62\x06proto3'
17
- )
18
-
19
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
20
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "commutative_op_pb2", globals())
21
- if _descriptor._USE_C_DESCRIPTORS == False:
22
- DESCRIPTOR._options = None
23
- _COMMUTATIVEOP._serialized_start = 38
24
- _COMMUTATIVEOP._serialized_end = 245
25
- _COMMUTATIVEOP_KIND._serialized_start = 120
26
- _COMMUTATIVEOP_KIND._serialized_end = 245
27
- # @@protoc_insertion_point(module_scope)
@@ -1,31 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: constraint.proto
4
- """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
- from google.protobuf import descriptor as _descriptor
7
- from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import symbol_database as _symbol_database
9
-
10
- # @@protoc_insertion_point(imports)
11
-
12
- _sym_db = _symbol_database.Default()
13
-
14
-
15
- import jijmodeling.protobuf.pb2.expression_pb2 as expression__pb2
16
- import jijmodeling.protobuf.pb2.forall_pb2 as forall__pb2
17
-
18
-
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
20
- b'\n\x10\x63onstraint.proto\x12\x0bjijmodeling\x1a\x10\x65xpression.proto\x1a\x0c\x66orall.proto"\xaf\x02\n\nConstraint\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12,\n\x05sense\x18\x03 \x01(\x0e\x32\x1d.jijmodeling.Constraint.Sense\x12\x1f\n\x04left\x18\x04 \x01(\x0b\x32\x11.jijmodeling.Expr\x12 \n\x05right\x18\x05 \x01(\x0b\x32\x11.jijmodeling.Expr\x12,\n\x0b\x66orall_list\x18\x06 \x01(\x0b\x32\x17.jijmodeling.ForallList"h\n\x05Sense\x12\x15\n\x11SENSE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSENSE_EQUAL\x10\x01\x12\x19\n\x15SENSE_LESS_THAN_EQUAL\x10\x02\x12\x1c\n\x18SENSE_GREATER_THAN_EQUAL\x10\x03\x62\x06proto3'
21
- )
22
-
23
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
24
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "constraint_pb2", globals())
25
- if _descriptor._USE_C_DESCRIPTORS == False:
26
- DESCRIPTOR._options = None
27
- _CONSTRAINT._serialized_start = 66
28
- _CONSTRAINT._serialized_end = 369
29
- _CONSTRAINT_SENSE._serialized_start = 265
30
- _CONSTRAINT_SENSE._serialized_end = 369
31
- # @@protoc_insertion_point(module_scope)
@@ -1,31 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: custom_penalty_term.proto
4
- """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
- from google.protobuf import descriptor as _descriptor
7
- from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import symbol_database as _symbol_database
9
-
10
- # @@protoc_insertion_point(imports)
11
-
12
- _sym_db = _symbol_database.Default()
13
-
14
-
15
- import jijmodeling.protobuf.pb2.expression_pb2 as expression__pb2
16
- import jijmodeling.protobuf.pb2.forall_pb2 as forall__pb2
17
-
18
-
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
20
- b'\n\x19\x63ustom_penalty_term.proto\x12\x0bjijmodeling\x1a\x10\x65xpression.proto\x1a\x0c\x66orall.proto"|\n\x11\x43ustomPenaltyTerm\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1f\n\x04term\x18\x03 \x01(\x0b\x32\x11.jijmodeling.Expr\x12,\n\x0b\x66orall_list\x18\x04 \x01(\x0b\x32\x17.jijmodeling.ForallListb\x06proto3'
21
- )
22
-
23
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
24
- _builder.BuildTopDescriptorsAndMessages(
25
- DESCRIPTOR, "custom_penalty_term_pb2", globals()
26
- )
27
- if _descriptor._USE_C_DESCRIPTORS == False:
28
- DESCRIPTOR._options = None
29
- _CUSTOMPENALTYTERM._serialized_start = 74
30
- _CUSTOMPENALTYTERM._serialized_end = 198
31
- # @@protoc_insertion_point(module_scope)
@@ -1,31 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # source: decision_var.proto
4
- """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
- from google.protobuf import descriptor as _descriptor
7
- from google.protobuf import descriptor_pool as _descriptor_pool
8
- from google.protobuf import symbol_database as _symbol_database
9
-
10
- # @@protoc_insertion_point(imports)
11
-
12
- _sym_db = _symbol_database.Default()
13
-
14
-
15
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
16
- b'\n\x12\x64\x65\x63ision_var.proto\x12\x0bjijmodeling"\x87\x04\n\x0b\x44\x65\x63isionVar\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.jijmodeling.DecisionVar.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tshape_ids\x18\x03 \x03(\x04\x12\x33\n\x0blower_bound\x18\x04 \x01(\x0b\x32\x1e.jijmodeling.DecisionVar.Bound\x12\x33\n\x0bupper_bound\x18\x05 \x01(\x0b\x32\x1e.jijmodeling.DecisionVar.Bound\x1a\xb7\x01\n\x05\x42ound\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.jijmodeling.DecisionVar.Bound.Type\x12\x10\n\x08\x62ound_id\x18\x02 \x01(\x04"i\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fTYPE_EXPRESSION\x10\x01\x12\x14\n\x10TYPE_PLACEHOLDER\x10\x02\x12 \n\x1cTYPE_SUBSCRIPTED_PLACEHOLDER\x10\x03"\x85\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTYPE_BINARY\x10\x01\x12\x10\n\x0cTYPE_INTEGER\x10\x02\x12\x13\n\x0fTYPE_CONTINUOUS\x10\x03\x12\x15\n\x11TYPE_SEMI_INTEGER\x10\x04\x12\x18\n\x14TYPE_SEMI_CONTINUOUS\x10\x05\x62\x06proto3'
17
- )
18
-
19
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
20
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "decision_var_pb2", globals())
21
- if _descriptor._USE_C_DESCRIPTORS == False:
22
- DESCRIPTOR._options = None
23
- _DECISIONVAR._serialized_start = 36
24
- _DECISIONVAR._serialized_end = 555
25
- _DECISIONVAR_BOUND._serialized_start = 236
26
- _DECISIONVAR_BOUND._serialized_end = 419
27
- _DECISIONVAR_BOUND_TYPE._serialized_start = 314
28
- _DECISIONVAR_BOUND_TYPE._serialized_end = 419
29
- _DECISIONVAR_TYPE._serialized_start = 422
30
- _DECISIONVAR_TYPE._serialized_end = 555
31
- # @@protoc_insertion_point(module_scope)