jijmodeling 0.10.18__cp310-cp310-win_amd64.whl → 1.11.0__cp310-cp310-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 (273) hide show
  1. jijmodeling/__init__.py +1 -148
  2. jijmodeling/__init__.pyi +5152 -0
  3. jijmodeling/_jijmodeling.cp310-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.11.0.dist-info/METADATA +235 -0
  16. jijmodeling-1.11.0.dist-info/RECORD +18 -0
  17. {jijmodeling-0.10.18.dist-info → jijmodeling-1.11.0.dist-info}/WHEEL +1 -2
  18. {jijmodeling-0.10.18.dist-info → jijmodeling-1.11.0.dist-info/licenses}/LICENSE.txt +1 -1
  19. jijmodeling/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  20. jijmodeling/__pycache__/__init__.cpython-310.pyc +0 -0
  21. jijmodeling/__pycache__/_version.cpython-310.opt-1.pyc +0 -0
  22. jijmodeling/__pycache__/_version.cpython-310.pyc +0 -0
  23. jijmodeling/_version.py +0 -4
  24. jijmodeling/exceptions/__init__.py +0 -26
  25. jijmodeling/exceptions/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  26. jijmodeling/exceptions/__pycache__/__init__.cpython-310.pyc +0 -0
  27. jijmodeling/exceptions/__pycache__/exceptions.cpython-310.opt-1.pyc +0 -0
  28. jijmodeling/exceptions/__pycache__/exceptions.cpython-310.pyc +0 -0
  29. jijmodeling/exceptions/exceptions.py +0 -37
  30. jijmodeling/expression/__init__.py +0 -74
  31. jijmodeling/expression/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  32. jijmodeling/expression/__pycache__/__init__.cpython-310.pyc +0 -0
  33. jijmodeling/expression/__pycache__/condition.cpython-310.opt-1.pyc +0 -0
  34. jijmodeling/expression/__pycache__/condition.cpython-310.pyc +0 -0
  35. jijmodeling/expression/__pycache__/constraint.cpython-310.opt-1.pyc +0 -0
  36. jijmodeling/expression/__pycache__/constraint.cpython-310.pyc +0 -0
  37. jijmodeling/expression/__pycache__/expression.cpython-310.opt-1.pyc +0 -0
  38. jijmodeling/expression/__pycache__/expression.cpython-310.pyc +0 -0
  39. jijmodeling/expression/__pycache__/extract.cpython-310.opt-1.pyc +0 -0
  40. jijmodeling/expression/__pycache__/extract.cpython-310.pyc +0 -0
  41. jijmodeling/expression/__pycache__/from_old_serializable.cpython-310.opt-1.pyc +0 -0
  42. jijmodeling/expression/__pycache__/from_old_serializable.cpython-310.pyc +0 -0
  43. jijmodeling/expression/__pycache__/mathfunc.cpython-310.opt-1.pyc +0 -0
  44. jijmodeling/expression/__pycache__/mathfunc.cpython-310.pyc +0 -0
  45. jijmodeling/expression/__pycache__/prod.cpython-310.opt-1.pyc +0 -0
  46. jijmodeling/expression/__pycache__/prod.cpython-310.pyc +0 -0
  47. jijmodeling/expression/__pycache__/serializable.cpython-310.opt-1.pyc +0 -0
  48. jijmodeling/expression/__pycache__/serializable.cpython-310.pyc +0 -0
  49. jijmodeling/expression/__pycache__/sum.cpython-310.opt-1.pyc +0 -0
  50. jijmodeling/expression/__pycache__/sum.cpython-310.pyc +0 -0
  51. jijmodeling/expression/__pycache__/type_annotations.cpython-310.opt-1.pyc +0 -0
  52. jijmodeling/expression/__pycache__/type_annotations.cpython-310.pyc +0 -0
  53. jijmodeling/expression/__pycache__/utils.cpython-310.opt-1.pyc +0 -0
  54. jijmodeling/expression/__pycache__/utils.cpython-310.pyc +0 -0
  55. jijmodeling/expression/condition.py +0 -362
  56. jijmodeling/expression/constraint.py +0 -340
  57. jijmodeling/expression/expression.py +0 -706
  58. jijmodeling/expression/extract.py +0 -139
  59. jijmodeling/expression/from_old_serializable.py +0 -133
  60. jijmodeling/expression/mathfunc.py +0 -269
  61. jijmodeling/expression/prod.py +0 -117
  62. jijmodeling/expression/serializable.py +0 -132
  63. jijmodeling/expression/sum.py +0 -197
  64. jijmodeling/expression/type_annotations.py +0 -50
  65. jijmodeling/expression/utils.py +0 -201
  66. jijmodeling/expression/variables/__init__.py +0 -35
  67. jijmodeling/expression/variables/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  68. jijmodeling/expression/variables/__pycache__/__init__.cpython-310.pyc +0 -0
  69. jijmodeling/expression/variables/__pycache__/deci_vars.cpython-310.opt-1.pyc +0 -0
  70. jijmodeling/expression/variables/__pycache__/deci_vars.cpython-310.pyc +0 -0
  71. jijmodeling/expression/variables/__pycache__/jagged_array.cpython-310.opt-1.pyc +0 -0
  72. jijmodeling/expression/variables/__pycache__/jagged_array.cpython-310.pyc +0 -0
  73. jijmodeling/expression/variables/__pycache__/placeholders.cpython-310.opt-1.pyc +0 -0
  74. jijmodeling/expression/variables/__pycache__/placeholders.cpython-310.pyc +0 -0
  75. jijmodeling/expression/variables/__pycache__/variable.cpython-310.opt-1.pyc +0 -0
  76. jijmodeling/expression/variables/__pycache__/variable.cpython-310.pyc +0 -0
  77. jijmodeling/expression/variables/deci_vars.py +0 -136
  78. jijmodeling/expression/variables/jagged_array.py +0 -73
  79. jijmodeling/expression/variables/placeholders.py +0 -107
  80. jijmodeling/expression/variables/variable.py +0 -485
  81. jijmodeling/latex_repr/__init__.py +0 -11
  82. jijmodeling/latex_repr/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  83. jijmodeling/latex_repr/__pycache__/__init__.cpython-310.pyc +0 -0
  84. jijmodeling/latex_repr/__pycache__/latex_repr.cpython-310.opt-1.pyc +0 -0
  85. jijmodeling/latex_repr/__pycache__/latex_repr.cpython-310.pyc +0 -0
  86. jijmodeling/latex_repr/__pycache__/problem_latex_repr.cpython-310.opt-1.pyc +0 -0
  87. jijmodeling/latex_repr/__pycache__/problem_latex_repr.cpython-310.pyc +0 -0
  88. jijmodeling/latex_repr/latex_repr.py +0 -243
  89. jijmodeling/latex_repr/problem_latex_repr.py +0 -209
  90. jijmodeling/marker/__marker__.cp310-win_amd64.pyd +0 -0
  91. jijmodeling/match/__init__.py +0 -19
  92. jijmodeling/match/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  93. jijmodeling/match/__pycache__/__init__.cpython-310.pyc +0 -0
  94. jijmodeling/match/__pycache__/condition_same.cpython-310.opt-1.pyc +0 -0
  95. jijmodeling/match/__pycache__/condition_same.cpython-310.pyc +0 -0
  96. jijmodeling/match/__pycache__/constraint_same.cpython-310.opt-1.pyc +0 -0
  97. jijmodeling/match/__pycache__/constraint_same.cpython-310.pyc +0 -0
  98. jijmodeling/match/__pycache__/expr_same.cpython-310.opt-1.pyc +0 -0
  99. jijmodeling/match/__pycache__/expr_same.cpython-310.pyc +0 -0
  100. jijmodeling/match/__pycache__/is_same_expr.cpython-310.opt-1.pyc +0 -0
  101. jijmodeling/match/__pycache__/is_same_expr.cpython-310.pyc +0 -0
  102. jijmodeling/match/__pycache__/penalty_same.cpython-310.opt-1.pyc +0 -0
  103. jijmodeling/match/__pycache__/penalty_same.cpython-310.pyc +0 -0
  104. jijmodeling/match/__pycache__/problem_same.cpython-310.opt-1.pyc +0 -0
  105. jijmodeling/match/__pycache__/problem_same.cpython-310.pyc +0 -0
  106. jijmodeling/match/__pycache__/replace.cpython-310.opt-1.pyc +0 -0
  107. jijmodeling/match/__pycache__/replace.cpython-310.pyc +0 -0
  108. jijmodeling/match/condition_same.py +0 -44
  109. jijmodeling/match/constraint_same.py +0 -53
  110. jijmodeling/match/expr_same.py +0 -32
  111. jijmodeling/match/is_same_expr.py +0 -304
  112. jijmodeling/match/penalty_same.py +0 -31
  113. jijmodeling/match/problem_same.py +0 -44
  114. jijmodeling/match/replace.py +0 -210
  115. jijmodeling/problem/__init__.py +0 -9
  116. jijmodeling/problem/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  117. jijmodeling/problem/__pycache__/__init__.cpython-310.pyc +0 -0
  118. jijmodeling/problem/__pycache__/problem.cpython-310.opt-1.pyc +0 -0
  119. jijmodeling/problem/__pycache__/problem.cpython-310.pyc +0 -0
  120. jijmodeling/problem/problem.py +0 -166
  121. jijmodeling/protobuf/__init__.py +0 -8
  122. jijmodeling/protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  123. jijmodeling/protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  124. jijmodeling/protobuf/from_protobuf/__init__.py +0 -47
  125. jijmodeling/protobuf/from_protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  126. jijmodeling/protobuf/from_protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  127. jijmodeling/protobuf/from_protobuf/__pycache__/extract_attribute_value_from_header.cpython-310.opt-1.pyc +0 -0
  128. jijmodeling/protobuf/from_protobuf/__pycache__/extract_attribute_value_from_header.cpython-310.pyc +0 -0
  129. jijmodeling/protobuf/from_protobuf/__pycache__/from_protobuf.cpython-310.opt-1.pyc +0 -0
  130. jijmodeling/protobuf/from_protobuf/__pycache__/from_protobuf.cpython-310.pyc +0 -0
  131. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_array_shape.cpython-310.opt-1.pyc +0 -0
  132. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_array_shape.cpython-310.pyc +0 -0
  133. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_op.cpython-310.opt-1.pyc +0 -0
  134. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_op.cpython-310.pyc +0 -0
  135. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_var.cpython-310.opt-1.pyc +0 -0
  136. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_var.cpython-310.pyc +0 -0
  137. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_constraint.cpython-310.opt-1.pyc +0 -0
  138. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_constraint.cpython-310.pyc +0 -0
  139. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_element.cpython-310.opt-1.pyc +0 -0
  140. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_element.cpython-310.pyc +0 -0
  141. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_expression.cpython-310.opt-1.pyc +0 -0
  142. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_expression.cpython-310.pyc +0 -0
  143. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_forall.cpython-310.opt-1.pyc +0 -0
  144. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_forall.cpython-310.pyc +0 -0
  145. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_integer_var.cpython-310.opt-1.pyc +0 -0
  146. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_integer_var.cpython-310.pyc +0 -0
  147. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_jagged_array.cpython-310.opt-1.pyc +0 -0
  148. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_jagged_array.cpython-310.pyc +0 -0
  149. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_number_lit.cpython-310.opt-1.pyc +0 -0
  150. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_number_lit.cpython-310.pyc +0 -0
  151. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_penalty.cpython-310.opt-1.pyc +0 -0
  152. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_penalty.cpython-310.pyc +0 -0
  153. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_placeholder.cpython-310.opt-1.pyc +0 -0
  154. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_placeholder.cpython-310.pyc +0 -0
  155. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_problem.cpython-310.opt-1.pyc +0 -0
  156. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_problem.cpython-310.pyc +0 -0
  157. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_reduction_op.cpython-310.opt-1.pyc +0 -0
  158. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_reduction_op.cpython-310.pyc +0 -0
  159. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_subscript_op.cpython-310.opt-1.pyc +0 -0
  160. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_subscript_op.cpython-310.pyc +0 -0
  161. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_unary_op.cpython-310.opt-1.pyc +0 -0
  162. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_unary_op.cpython-310.pyc +0 -0
  163. jijmodeling/protobuf/from_protobuf/extract_attribute_value_from_header.py +0 -26
  164. jijmodeling/protobuf/from_protobuf/from_protobuf.py +0 -38
  165. jijmodeling/protobuf/from_protobuf/message_to_array_shape.py +0 -35
  166. jijmodeling/protobuf/from_protobuf/message_to_binary_op.py +0 -83
  167. jijmodeling/protobuf/from_protobuf/message_to_binary_var.py +0 -46
  168. jijmodeling/protobuf/from_protobuf/message_to_constraint.py +0 -48
  169. jijmodeling/protobuf/from_protobuf/message_to_element.py +0 -30
  170. jijmodeling/protobuf/from_protobuf/message_to_expression.py +0 -92
  171. jijmodeling/protobuf/from_protobuf/message_to_forall.py +0 -33
  172. jijmodeling/protobuf/from_protobuf/message_to_integer_var.py +0 -54
  173. jijmodeling/protobuf/from_protobuf/message_to_jagged_array.py +0 -25
  174. jijmodeling/protobuf/from_protobuf/message_to_number_lit.py +0 -41
  175. jijmodeling/protobuf/from_protobuf/message_to_penalty.py +0 -36
  176. jijmodeling/protobuf/from_protobuf/message_to_placeholder.py +0 -47
  177. jijmodeling/protobuf/from_protobuf/message_to_problem.py +0 -51
  178. jijmodeling/protobuf/from_protobuf/message_to_reduction_op.py +0 -52
  179. jijmodeling/protobuf/from_protobuf/message_to_subscript_op.py +0 -46
  180. jijmodeling/protobuf/from_protobuf/message_to_unary_op.py +0 -47
  181. jijmodeling/protobuf/to_protobuf/__init__.py +0 -43
  182. jijmodeling/protobuf/to_protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  183. jijmodeling/protobuf/to_protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  184. jijmodeling/protobuf/to_protobuf/__pycache__/add_header_to_message.cpython-310.opt-1.pyc +0 -0
  185. jijmodeling/protobuf/to_protobuf/__pycache__/add_header_to_message.cpython-310.pyc +0 -0
  186. jijmodeling/protobuf/to_protobuf/__pycache__/array_shape_to_message.cpython-310.opt-1.pyc +0 -0
  187. jijmodeling/protobuf/to_protobuf/__pycache__/array_shape_to_message.cpython-310.pyc +0 -0
  188. jijmodeling/protobuf/to_protobuf/__pycache__/binary_op_to_message.cpython-310.opt-1.pyc +0 -0
  189. jijmodeling/protobuf/to_protobuf/__pycache__/binary_op_to_message.cpython-310.pyc +0 -0
  190. jijmodeling/protobuf/to_protobuf/__pycache__/binary_var_to_message.cpython-310.opt-1.pyc +0 -0
  191. jijmodeling/protobuf/to_protobuf/__pycache__/binary_var_to_message.cpython-310.pyc +0 -0
  192. jijmodeling/protobuf/to_protobuf/__pycache__/constraint_to_message.cpython-310.opt-1.pyc +0 -0
  193. jijmodeling/protobuf/to_protobuf/__pycache__/constraint_to_message.cpython-310.pyc +0 -0
  194. jijmodeling/protobuf/to_protobuf/__pycache__/element_to_message.cpython-310.opt-1.pyc +0 -0
  195. jijmodeling/protobuf/to_protobuf/__pycache__/element_to_message.cpython-310.pyc +0 -0
  196. jijmodeling/protobuf/to_protobuf/__pycache__/expression_to_message.cpython-310.opt-1.pyc +0 -0
  197. jijmodeling/protobuf/to_protobuf/__pycache__/expression_to_message.cpython-310.pyc +0 -0
  198. jijmodeling/protobuf/to_protobuf/__pycache__/forall_to_message.cpython-310.opt-1.pyc +0 -0
  199. jijmodeling/protobuf/to_protobuf/__pycache__/forall_to_message.cpython-310.pyc +0 -0
  200. jijmodeling/protobuf/to_protobuf/__pycache__/integer_var_to_message.cpython-310.opt-1.pyc +0 -0
  201. jijmodeling/protobuf/to_protobuf/__pycache__/integer_var_to_message.cpython-310.pyc +0 -0
  202. jijmodeling/protobuf/to_protobuf/__pycache__/jagged_array_to_message.cpython-310.opt-1.pyc +0 -0
  203. jijmodeling/protobuf/to_protobuf/__pycache__/jagged_array_to_message.cpython-310.pyc +0 -0
  204. jijmodeling/protobuf/to_protobuf/__pycache__/number_lit_to_message.cpython-310.opt-1.pyc +0 -0
  205. jijmodeling/protobuf/to_protobuf/__pycache__/number_lit_to_message.cpython-310.pyc +0 -0
  206. jijmodeling/protobuf/to_protobuf/__pycache__/penalty_to_message.cpython-310.opt-1.pyc +0 -0
  207. jijmodeling/protobuf/to_protobuf/__pycache__/penalty_to_message.cpython-310.pyc +0 -0
  208. jijmodeling/protobuf/to_protobuf/__pycache__/placeholder_to_message.cpython-310.opt-1.pyc +0 -0
  209. jijmodeling/protobuf/to_protobuf/__pycache__/placeholder_to_message.cpython-310.pyc +0 -0
  210. jijmodeling/protobuf/to_protobuf/__pycache__/problem_to_message.cpython-310.opt-1.pyc +0 -0
  211. jijmodeling/protobuf/to_protobuf/__pycache__/problem_to_message.cpython-310.pyc +0 -0
  212. jijmodeling/protobuf/to_protobuf/__pycache__/reduction_op_to_message.cpython-310.opt-1.pyc +0 -0
  213. jijmodeling/protobuf/to_protobuf/__pycache__/reduction_op_to_message.cpython-310.pyc +0 -0
  214. jijmodeling/protobuf/to_protobuf/__pycache__/subscript_op_to_message.cpython-310.opt-1.pyc +0 -0
  215. jijmodeling/protobuf/to_protobuf/__pycache__/subscript_op_to_message.cpython-310.pyc +0 -0
  216. jijmodeling/protobuf/to_protobuf/__pycache__/to_protobuf.cpython-310.opt-1.pyc +0 -0
  217. jijmodeling/protobuf/to_protobuf/__pycache__/to_protobuf.cpython-310.pyc +0 -0
  218. jijmodeling/protobuf/to_protobuf/__pycache__/unary_op_to_message.cpython-310.opt-1.pyc +0 -0
  219. jijmodeling/protobuf/to_protobuf/__pycache__/unary_op_to_message.cpython-310.pyc +0 -0
  220. jijmodeling/protobuf/to_protobuf/add_header_to_message.py +0 -35
  221. jijmodeling/protobuf/to_protobuf/array_shape_to_message.py +0 -43
  222. jijmodeling/protobuf/to_protobuf/binary_op_to_message.py +0 -101
  223. jijmodeling/protobuf/to_protobuf/binary_var_to_message.py +0 -49
  224. jijmodeling/protobuf/to_protobuf/constraint_to_message.py +0 -52
  225. jijmodeling/protobuf/to_protobuf/element_to_message.py +0 -43
  226. jijmodeling/protobuf/to_protobuf/expression_to_message.py +0 -89
  227. jijmodeling/protobuf/to_protobuf/forall_to_message.py +0 -32
  228. jijmodeling/protobuf/to_protobuf/integer_var_to_message.py +0 -54
  229. jijmodeling/protobuf/to_protobuf/jagged_array_to_message.py +0 -37
  230. jijmodeling/protobuf/to_protobuf/number_lit_to_message.py +0 -52
  231. jijmodeling/protobuf/to_protobuf/penalty_to_message.py +0 -42
  232. jijmodeling/protobuf/to_protobuf/placeholder_to_message.py +0 -58
  233. jijmodeling/protobuf/to_protobuf/problem_to_message.py +0 -54
  234. jijmodeling/protobuf/to_protobuf/reduction_op_to_message.py +0 -64
  235. jijmodeling/protobuf/to_protobuf/subscript_op_to_message.py +0 -48
  236. jijmodeling/protobuf/to_protobuf/to_protobuf.py +0 -36
  237. jijmodeling/protobuf/to_protobuf/unary_op_to_message.py +0 -58
  238. jijmodeling/sampleset/__init__.py +0 -33
  239. jijmodeling/sampleset/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  240. jijmodeling/sampleset/__pycache__/__init__.cpython-310.pyc +0 -0
  241. jijmodeling/sampleset/__pycache__/evaluation.cpython-310.opt-1.pyc +0 -0
  242. jijmodeling/sampleset/__pycache__/evaluation.cpython-310.pyc +0 -0
  243. jijmodeling/sampleset/__pycache__/measuring_time.cpython-310.opt-1.pyc +0 -0
  244. jijmodeling/sampleset/__pycache__/measuring_time.cpython-310.pyc +0 -0
  245. jijmodeling/sampleset/__pycache__/record.cpython-310.opt-1.pyc +0 -0
  246. jijmodeling/sampleset/__pycache__/record.cpython-310.pyc +0 -0
  247. jijmodeling/sampleset/__pycache__/sampleset.cpython-310.opt-1.pyc +0 -0
  248. jijmodeling/sampleset/__pycache__/sampleset.cpython-310.pyc +0 -0
  249. jijmodeling/sampleset/__pycache__/solving_time.cpython-310.opt-1.pyc +0 -0
  250. jijmodeling/sampleset/__pycache__/solving_time.cpython-310.pyc +0 -0
  251. jijmodeling/sampleset/__pycache__/system_time.cpython-310.opt-1.pyc +0 -0
  252. jijmodeling/sampleset/__pycache__/system_time.cpython-310.pyc +0 -0
  253. jijmodeling/sampleset/evaluation.py +0 -288
  254. jijmodeling/sampleset/measuring_time.py +0 -59
  255. jijmodeling/sampleset/record.py +0 -158
  256. jijmodeling/sampleset/sampleset.py +0 -379
  257. jijmodeling/sampleset/solving_time.py +0 -38
  258. jijmodeling/sampleset/system_time.py +0 -48
  259. jijmodeling/type_annotations/__init__.py +0 -44
  260. jijmodeling/type_annotations/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  261. jijmodeling/type_annotations/__pycache__/__init__.cpython-310.pyc +0 -0
  262. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-310.opt-1.pyc +0 -0
  263. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-310.pyc +0 -0
  264. jijmodeling/type_annotations/type_annotations.py +0 -54
  265. jijmodeling/utils/__init__.py +0 -28
  266. jijmodeling/utils/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  267. jijmodeling/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  268. jijmodeling/utils/__pycache__/utils.cpython-310.opt-1.pyc +0 -0
  269. jijmodeling/utils/__pycache__/utils.cpython-310.pyc +0 -0
  270. jijmodeling/utils/utils.py +0 -146
  271. jijmodeling-0.10.18.dist-info/METADATA +0 -60
  272. jijmodeling-0.10.18.dist-info/RECORD +0 -258
  273. jijmodeling-0.10.18.dist-info/top_level.txt +0 -1
@@ -1,35 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from typing import Union
4
-
5
- import jijmodeling_schema as pb
6
-
7
- from ulid import ULID
8
-
9
-
10
- def add_header_to_message(message: Union[pb.Expression, pb.Problem]) -> pb.Header:
11
- """
12
- Add header meta data to the `Expression` type message.
13
-
14
- Args:
15
- message (jijmodeling_schema.Expression): an `Expression` message
16
-
17
- Returns:
18
- jijmodeling_schema.Header: a `Header` message
19
- """
20
- # Create an empty `Header` message.
21
- header = pb.Header()
22
-
23
- # Make the id of the `Header` message.
24
- header.id = str(ULID())
25
-
26
- # Set the version of the JijModeling schema.
27
- header.version = "0.10.0"
28
-
29
- # Set the target message to the `header.value`.
30
- if type(message) is pb.Problem:
31
- header.value.problem = message
32
- elif type(message) is pb.Expression:
33
- header.value.expression = message
34
-
35
- return header
@@ -1,43 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from jijmodeling.expression.variables.placeholders import ArrayShape
6
-
7
-
8
- def array_shape_to_message(array_shape: ArrayShape) -> pb.Expression:
9
- """
10
- Convert an `ArrayShape` object to an `Expression` message.
11
-
12
- Args:
13
- array_shape (ArrayShape): an `ArrayShape` object
14
-
15
- Returns:
16
- pb.Expression: an `Expression` message
17
- """
18
- # Create an empty `ArrayShape` message.
19
- array_shape_message = pb.ArrayShape()
20
-
21
- # Set the number of axis
22
- array_shape_message.axis = array_shape.dimension
23
-
24
- # Create an empty `Expression` message.
25
- message = pb.Expression()
26
-
27
- # Set the id that the `ArrayShape` object has.
28
- message.id = array_shape.uuid
29
-
30
- # Set the kind of nodes to an `ArrayShape` message.
31
- message.kind.array_shape = array_shape_message
32
-
33
- # NOTE: Import a module within a local scope to fix a circular import.
34
- # - https://stackoverflow.com/questions/59462679/design-of-python-conditional-imports
35
- # - https://medium.com/@hamana.hadrien/so-you-got-a-circular-import-in-python-e9142fe10591
36
- from jijmodeling.protobuf.to_protobuf.expression_to_message import (
37
- expression_to_message,
38
- )
39
-
40
- # Set the array of the ArrayShape.
41
- message.children.append(expression_to_message(array_shape.array))
42
-
43
- return message
@@ -1,101 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from typing import Union
4
-
5
- import jijmodeling_schema as pb
6
-
7
- from jijmodeling.expression.condition import (
8
- AndOperator,
9
- Condition,
10
- Equal,
11
- LessThan,
12
- LessThanEqual,
13
- NotEqual,
14
- OrOperator,
15
- XorOperator,
16
- )
17
- from jijmodeling.expression.expression import Add, BinaryOperator, Div, Mod, Mul, Power
18
- from jijmodeling.expression.variables.variable import Range
19
-
20
-
21
- def binary_op_to_message(
22
- binary_op: Union[BinaryOperator, Range, Condition]
23
- ) -> pb.Expression:
24
- """
25
- Convert a `BinaryOperator | Range | Condition` object to an `Expression`.
26
-
27
- message.
28
-
29
- Args:
30
- unary_op (BinaryOperator): an expression node that has two children
31
-
32
- Returns:
33
- pb.Expression: an `Expression` message
34
- """
35
- # Create an empty `BinaryOp` message.
36
- binary_op_message = pb.BinaryOp()
37
-
38
- # Set the kind of the binary operator node.
39
- # BinaryOp
40
- if type(binary_op) is Add:
41
- binary_op_message.kind = pb.BinaryOpKind.ADD
42
- elif type(binary_op) is Mul:
43
- binary_op_message.kind = pb.BinaryOpKind.MUL
44
- elif type(binary_op) is Div:
45
- binary_op_message.kind = pb.BinaryOpKind.DIV
46
- elif type(binary_op) is Power:
47
- binary_op_message.kind = pb.BinaryOpKind.POW
48
- elif type(binary_op) is Mod:
49
- binary_op_message.kind = pb.BinaryOpKind.MOD
50
- # Range
51
- elif type(binary_op) is Range:
52
- binary_op_message.kind = pb.BinaryOpKind.RANGE
53
- # ComparisonOp
54
- elif type(binary_op) is Equal:
55
- binary_op_message.kind = pb.BinaryOpKind.EQ
56
- elif type(binary_op) is NotEqual:
57
- binary_op_message.kind = pb.BinaryOpKind.NOT_EQ
58
- elif type(binary_op) is LessThan:
59
- binary_op_message.kind = pb.BinaryOpKind.LESS_THAN
60
- elif type(binary_op) is LessThanEqual:
61
- binary_op_message.kind = pb.BinaryOpKind.LESS_THAN_EQ
62
- # LogicalOp
63
- elif type(binary_op) is AndOperator:
64
- binary_op_message.kind = pb.BinaryOpKind.AND
65
- elif type(binary_op) is OrOperator:
66
- binary_op_message.kind = pb.BinaryOpKind.OR
67
- elif type(binary_op) is XorOperator:
68
- binary_op_message.kind = pb.BinaryOpKind.XOR
69
- # Otherwise
70
- else:
71
- raise TypeError(f"{binary_op.__class__.__name__} is not supported")
72
-
73
- # Create an empty `Expression` message.
74
- message = pb.Expression()
75
-
76
- # Set the id that the `Expression` object has.
77
- message.id = binary_op.uuid
78
-
79
- # Set the kind of nodes to the `BinaryOp` message.
80
- message.kind.binary_op = binary_op_message
81
-
82
- # NOTE: Import a module within a local scope to fix a circular import.
83
- # - https://stackoverflow.com/questions/59462679/design-of-python-conditional-imports
84
- # - https://medium.com/@hamana.hadrien/so-you-got-a-circular-import-in-python-e9142fe10591
85
- from jijmodeling.protobuf.to_protobuf.expression_to_message import (
86
- expression_to_message,
87
- )
88
-
89
- if type(binary_op) is Range:
90
- # Set the range of the `Range` object.
91
- message.children.append(expression_to_message(binary_op.start))
92
- message.children.append(expression_to_message(binary_op.last))
93
- elif isinstance(binary_op, (BinaryOperator, Condition)):
94
- # Set the children of the `BinaryOperator` object.
95
- message.children.append(expression_to_message(binary_op.left))
96
- message.children.append(expression_to_message(binary_op.right))
97
- # Otherwise
98
- else:
99
- raise TypeError(f"{binary_op.__class__.__name__} is not supported")
100
-
101
- return message
@@ -1,49 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from jijmodeling.expression.variables.deci_vars import Binary
6
-
7
-
8
- def binary_var_to_message(binary_var: Binary) -> pb.Expression:
9
- """
10
- Convert a `Binary` object to an `BinaryVar` message.
11
-
12
- Args:
13
- binary_var (Binary): a `Binary` object.
14
-
15
- Returns:
16
- pb.Expression: an `Expression` message.
17
- """
18
- # Create an empty `BinaryVar` message.
19
- binary_var_message = pb.BinaryVar()
20
-
21
- # Set the symbol.
22
- binary_var_message.symbol = binary_var.label
23
-
24
- # Set length of the shape.
25
- binary_var_message.dim = binary_var.dim
26
-
27
- # Create an empty `Expression` message.
28
- message = pb.Expression()
29
-
30
- # Set the id that the `Binary` object has.
31
- message.id = binary_var.uuid
32
-
33
- # Set the kind of nodes to a `BinaryVar` message.
34
- message.kind.binary_var = binary_var_message
35
-
36
- # NOTE: Import a module within a local scope to fix a circular import.
37
- # - https://stackoverflow.com/questions/59462679/design-of-python-conditional-imports
38
- # - https://medium.com/@hamana.hadrien/so-you-got-a-circular-import-in-python-e9142fe10591
39
- from jijmodeling.protobuf.to_protobuf.expression_to_message import (
40
- expression_to_message,
41
- )
42
-
43
- # Set the shape.
44
- message.children = [
45
- expression_to_message(shape_element) for shape_element in binary_var.shape
46
- ]
47
-
48
- # Serialize the `Expression` object into a bytes object.
49
- return message
@@ -1,52 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from ulid import ULID
6
-
7
- from jijmodeling.expression.constraint import Constraint
8
- from jijmodeling.protobuf.to_protobuf.expression_to_message import expression_to_message
9
- from jijmodeling.protobuf.to_protobuf.forall_to_message import forall_to_message
10
-
11
-
12
- def constraint_to_message(constraint: Constraint) -> pb.Constraint:
13
- """
14
- Convert a `Constraint` object into a `Constraint` message.
15
-
16
- Args:
17
- constraint (Constraint): a `Constraint` object
18
-
19
- Returns:
20
- pb.Constraint: a `Constraint` message
21
- """
22
- # Create an empty `Constraint` message.
23
- message = pb.Constraint()
24
-
25
- # Set the id of the constraint.
26
- message.id = str(ULID())
27
-
28
- # Set the name of the constraint.
29
- message.name = constraint.label
30
-
31
- # Set the expression of the constraint.
32
- message.expression = expression_to_message(constraint.condition)
33
-
34
- # Set the list of forall.
35
- message.forall.extend(
36
- [
37
- forall_to_message(element, condition)
38
- for element, condition in constraint.forall
39
- ]
40
- )
41
-
42
- # Set the left_lower.
43
- if constraint.left_lower is not None:
44
- message.left_lower = expression_to_message(constraint.left_lower)
45
-
46
- message.is_penalty = constraint.with_penalty
47
-
48
- message.needs_multiplier = constraint.with_multiplier
49
-
50
- message.needs_square = constraint.auto_qubo
51
-
52
- return message
@@ -1,43 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from jijmodeling.expression.variables.variable import Element
6
-
7
-
8
- def element_to_message(element: Element) -> pb.Expression:
9
- """
10
- Convert an `Element` object to an `Element` message.
11
-
12
- Args:
13
- element (Element): an `Element` object
14
-
15
- Returns:
16
- pb.Expression: an `Element` message
17
- """
18
- # Create an empty `ArrayShape` message.
19
- element_message = pb.Element()
20
-
21
- # Set the symbol
22
- element_message.symbol = element.label
23
-
24
- # Create an empty `Expression` message.
25
- message = pb.Expression()
26
-
27
- # Set the id that the `Element` object has.
28
- message.id = element.uuid
29
-
30
- # Set the kind of nodes to an `ArrayShape` message.
31
- message.kind.element = element_message
32
-
33
- # NOTE: Import a module within a local scope to fix a circular import.
34
- # - https://stackoverflow.com/questions/59462679/design-of-python-conditional-imports
35
- # - https://medium.com/@hamana.hadrien/so-you-got-a-circular-import-in-python-e9142fe10591
36
- from jijmodeling.protobuf.to_protobuf.expression_to_message import (
37
- expression_to_message,
38
- )
39
-
40
- # Set the parent of the `Element` object.
41
- message.children.append(expression_to_message(element.parent))
42
-
43
- return message
@@ -1,89 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from typing import Union
4
-
5
- import jijmodeling_schema as pb
6
-
7
- from jijmodeling.expression.condition import Condition
8
- from jijmodeling.expression.expression import BinaryOperator, Expression, Number
9
- from jijmodeling.expression.mathfunc import UnaryOperator
10
- from jijmodeling.expression.sum import ReductionOperator
11
- from jijmodeling.expression.variables.deci_vars import Binary, Integer
12
- from jijmodeling.expression.variables.jagged_array import JaggedArray
13
- from jijmodeling.expression.variables.placeholders import ArrayShape, Placeholder
14
- from jijmodeling.expression.variables.variable import Element, Range, Subscripts
15
- from jijmodeling.protobuf.to_protobuf.array_shape_to_message import (
16
- array_shape_to_message,
17
- )
18
- from jijmodeling.protobuf.to_protobuf.binary_op_to_message import binary_op_to_message
19
- from jijmodeling.protobuf.to_protobuf.binary_var_to_message import binary_var_to_message
20
- from jijmodeling.protobuf.to_protobuf.element_to_message import element_to_message
21
- from jijmodeling.protobuf.to_protobuf.integer_var_to_message import (
22
- integer_var_to_message,
23
- )
24
- from jijmodeling.protobuf.to_protobuf.jagged_array_to_message import (
25
- jagged_array_to_message,
26
- )
27
- from jijmodeling.protobuf.to_protobuf.number_lit_to_message import number_lit_to_message
28
- from jijmodeling.protobuf.to_protobuf.placeholder_to_message import (
29
- placeholder_to_message,
30
- )
31
- from jijmodeling.protobuf.to_protobuf.reduction_op_to_message import (
32
- reduction_op_to_message,
33
- )
34
- from jijmodeling.protobuf.to_protobuf.subscript_op_to_message import (
35
- subscript_op_to_message,
36
- )
37
- from jijmodeling.protobuf.to_protobuf.unary_op_to_message import unary_op_to_message
38
-
39
-
40
- def expression_to_message(expr: Union[Expression, Range, Condition]) -> pb.Expression:
41
- """
42
- Convert a `Expression` instance object to an `Expression` message.
43
-
44
- Args:
45
- expr (Expression): an `Expression` instance object
46
-
47
- Raises:
48
- TypeError: the error occurs if the instance ofject cannot be converted to a protobuf object
49
-
50
- Returns:
51
- pb.Expression: a `Expression` message
52
- """
53
- if type(expr) is Number:
54
- message = number_lit_to_message(expr)
55
- return message
56
- elif type(expr) is Placeholder:
57
- message = placeholder_to_message(expr)
58
- return message
59
- elif type(expr) is ArrayShape:
60
- message = array_shape_to_message(expr)
61
- return message
62
- elif type(expr) is Element:
63
- message = element_to_message(expr)
64
- return message
65
- elif type(expr) is JaggedArray:
66
- message = jagged_array_to_message(expr)
67
- return message
68
- elif type(expr) is Binary:
69
- message = binary_var_to_message(expr)
70
- return message
71
- elif type(expr) is Integer:
72
- message = integer_var_to_message(expr)
73
- return message
74
- elif isinstance(expr, UnaryOperator):
75
- message = unary_op_to_message(expr)
76
- return message
77
- elif isinstance(expr, (BinaryOperator, Range, Condition)):
78
- message = binary_op_to_message(expr)
79
- return message
80
- elif type(expr) is Subscripts:
81
- message = subscript_op_to_message(expr)
82
- return message
83
- elif isinstance(expr, ReductionOperator):
84
- message = reduction_op_to_message(expr)
85
- return message
86
- else:
87
- raise TypeError(
88
- f"{expr.__class__.__name__} is not supported for converting it into a protobuf message."
89
- )
@@ -1,32 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from jijmodeling.expression.condition import Condition, NoneCondition
6
- from jijmodeling.expression.variables.variable import Element
7
- from jijmodeling.protobuf.to_protobuf.element_to_message import element_to_message
8
- from jijmodeling.protobuf.to_protobuf.expression_to_message import expression_to_message
9
-
10
-
11
- def forall_to_message(element: Element, condition: Condition) -> pb.Forall:
12
- """
13
- Convert a `forall` object into a `Forall` message.
14
-
15
- Args:
16
- element (Element): an `Element` object
17
- condition (Condition): a `Condition` object
18
-
19
- Returns:
20
- pb.Forall: a `Forall` message
21
- """
22
- # Create an empty `Forall` message.
23
- message = pb.Forall()
24
-
25
- # Set the element.
26
- message.element = element_to_message(element)
27
-
28
- # Set the condition expression for the element.
29
- if type(condition) is not NoneCondition:
30
- message.condition = expression_to_message(condition)
31
-
32
- return message
@@ -1,54 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from jijmodeling.expression.variables.deci_vars import Integer
6
-
7
-
8
- def integer_var_to_message(integer_var: Integer) -> pb.Expression:
9
- """
10
- Convert an `Integer` object to an `IntegerVar` message.
11
-
12
- Args:
13
- integer_var (Integer): an `Integer` object.
14
-
15
- Returns:
16
- pb.Expression: an `Expression` message.
17
- """
18
- # Create an empty `IntegerVar` message.
19
- integer_var_message = pb.IntegerVar()
20
-
21
- # Set the symbol
22
- integer_var_message.symbol = integer_var.label
23
- # Set length of the shape
24
- integer_var_message.dim = integer_var.dim
25
-
26
- # Create an empty `Expression` message.
27
- message = pb.Expression()
28
-
29
- # Set the id that the `Integer` object has.
30
- message.id = integer_var.uuid
31
-
32
- # Set the kind of nodes to a `IntegerVar` message.
33
- message.kind.integer_var = integer_var_message
34
-
35
- # NOTE: Import a module within a local scope to fix a circular import.
36
- # - https://stackoverflow.com/questions/59462679/design-of-python-conditional-imports
37
- # - https://medium.com/@hamana.hadrien/so-you-got-a-circular-import-in-python-e9142fe10591
38
- from jijmodeling.protobuf.to_protobuf.expression_to_message import (
39
- expression_to_message,
40
- )
41
-
42
- # Set the bound of the `Integer` object.
43
- # lower bound
44
- message.children.append(expression_to_message(integer_var.lower))
45
- # upper bound
46
- message.children.append(expression_to_message(integer_var.upper))
47
-
48
- # Set the shape.
49
- message.children.extend(
50
- [expression_to_message(shape_element) for shape_element in integer_var.shape]
51
- )
52
-
53
- # Serialize the `Expression` object into a bytes object.
54
- return message
@@ -1,37 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from jijmodeling.expression.variables.jagged_array import JaggedArray
6
-
7
-
8
- def jagged_array_to_message(jagged_array: JaggedArray) -> pb.Expression:
9
- """
10
- Convert a `JaggedArray` object to a `JaggedArray` message.
11
-
12
- Args:
13
- jagged_array (JaggedArray): a `JaggedArray` object
14
-
15
- Returns:
16
- pb.Expression: a `JaggedArray` object
17
- """
18
- # Create an empty `JaggedArray` message.
19
- jagged_array_message = pb.JaggedArray()
20
-
21
- # Set the symbol.
22
- jagged_array_message.symbol = jagged_array.label
23
-
24
- # Set the number of dimensions.
25
- jagged_array_message.dim = jagged_array.dim
26
-
27
- # Create an empty `Expression` message.
28
- message = pb.Expression()
29
-
30
- # Set the id that the `JaggedArray` object has.
31
- message.id = jagged_array.uuid
32
-
33
- # Set the kind of nodes to a `JaggedArray` message.
34
- message.kind.jagged_array = jagged_array_message
35
-
36
- # Serialize the `Expression` object into a bytes object.
37
- return message
@@ -1,52 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import struct
4
-
5
- import jijmodeling_schema as pb
6
-
7
- from jijmodeling.expression.expression import DataType, Number
8
-
9
-
10
- def number_lit_to_message(lit: Number) -> pb.Expression:
11
- """
12
- Convert a `Number` object to an `Expression` message.
13
-
14
- Args:
15
- lit (Number): a `Number` object
16
-
17
- Returns:
18
- jijmodeling_schema.Expression: an `Expression` message
19
- """
20
- # Create an empty `NumberLit` message.
21
- number_lit = pb.NumberLit()
22
-
23
- # Set the type of the value that the `Number` object has.
24
- # Case: int
25
- if lit.dtype == DataType.INT:
26
- number_lit.type = pb.NumberLitType.INTEGER
27
-
28
- # Set the value that the `Number` object has.
29
- # Convert the value to the bytes object.
30
- number_lit.value = int.from_bytes(struct.pack(">q", lit.value), "big")
31
- # Case: float
32
- elif lit.dtype == DataType.FLOAT:
33
- number_lit.type = pb.NumberLitType.FLOAT
34
-
35
- # Set the value that the `Number` object has.
36
- # Convert the value to the bytes object.
37
- number_lit.value = int.from_bytes(struct.pack(">d", lit.value), "big")
38
- # Otherwise
39
- else:
40
- number_lit.type = pb.NumberLitType.UNKNOWN
41
-
42
- # Create an empty `Expression` message.
43
- message = pb.Expression()
44
-
45
- # Set the id that the `Number` object has.
46
- message.id = lit.uuid
47
-
48
- # Set the kind of nodes to `NumberLit`.
49
- message.kind.number_lit = number_lit
50
-
51
- # Serialize the `Expression` object into a bytes object.
52
- return message
@@ -1,42 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling_schema as pb
4
-
5
- from ulid import ULID
6
-
7
- from jijmodeling.expression.constraint import Penalty
8
- from jijmodeling.protobuf.to_protobuf.expression_to_message import expression_to_message
9
- from jijmodeling.protobuf.to_protobuf.forall_to_message import forall_to_message
10
-
11
-
12
- def penalty_to_message(penalty: Penalty) -> pb.Penalty:
13
- """
14
- Convert a `Penalty` object into a `Penalty` message.
15
-
16
- Args:
17
- penalty (Penalty): a `Penalty` object
18
-
19
- Returns:
20
- pb.Penalty: a `Penalty` message
21
- """
22
- # Create an empty `Penalty` message
23
- message = pb.Penalty()
24
-
25
- # Set the id of the penalty.
26
- message.id = str(ULID())
27
-
28
- # Set the name of the penalty.
29
- message.name = penalty.label
30
-
31
- # Set the penalty term.
32
- message.expression = expression_to_message(penalty.penalty_term)
33
-
34
- # Set the list of forall.
35
- message.forall.extend(
36
- [forall_to_message(element, condition) for element, condition in penalty.forall]
37
- )
38
-
39
- # Set the needs_multiplier
40
- message.needs_multiplier = penalty.with_multiplier
41
-
42
- return message