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,706 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import enum
4
-
5
- from abc import ABCMeta, abstractmethod
6
- from typing import Any, List, Optional, TypeVar, Union
7
- from uuid import uuid4
8
-
9
- from typeguard import check_type
10
-
11
- import jijmodeling.expression.serializable as _serializable
12
-
13
- NumericValue = Union[int, float]
14
-
15
- TExpression = TypeVar("TExpression", bound="Expression")
16
-
17
-
18
- class Expression(metaclass=_serializable.Serializable):
19
- """
20
- Mathematical expression of JijModeling.
21
-
22
- The Expression class provides each method that defines operator rules.
23
- """
24
-
25
- def __init__(self, uuid: Optional[str] = None):
26
- self._latex_repr: Optional[str] = None
27
- self._uuid: str = uuid if uuid is not None else uuid4().hex
28
-
29
- @property
30
- def uuid(self) -> str:
31
- """
32
- Unique id which is str type since UUID object is not serializable.
33
-
34
- default value is generated by `uuid.uuid4().hex`.
35
-
36
- Returns:
37
- str: _description_
38
- """
39
- return self._uuid
40
-
41
- @abstractmethod
42
- def is_operatable(self) -> bool:
43
- """
44
- Specify whether the operators (+, -, *, /,...) can be applied to the.
45
-
46
- expression. For example, "a[3]" is true, whereas "a" is not.
47
-
48
- Returns:
49
- bool: defaults False.
50
- """
51
- return False
52
-
53
- def _make_latex(self) -> str:
54
- """
55
- Outputs a latex representation.
56
-
57
- If `self._latex_repr` is not None, it
58
- will take precedence. If you want to get the latex representation of
59
- child objects in `_default_repr_latex_` of each class, use the method.
60
-
61
- Returns:
62
- str: latex representation.
63
- """
64
- if self._latex_repr is not None:
65
- return self._latex_repr
66
- else:
67
- from jijmodeling.latex_repr.latex_repr import expr_latex_repr
68
-
69
- return expr_latex_repr(self)
70
-
71
- def _repr_latex_(self) -> str:
72
- """
73
- Latex representation for Jupyter notebook.
74
-
75
- Returns:
76
- str: latex string
77
- """
78
- return f"${self._make_latex()}$"
79
-
80
- def set_latex(self: TExpression, latex_repr: str) -> TExpression:
81
- """
82
- Change LaTeX Representation.
83
-
84
- Returns:
85
- Expression: `self`
86
-
87
- Examples:
88
- ```python
89
- >>> import jijmodeling as jm
90
- >>> d = jm.Placeholder("d")
91
- >>> n = d.shape[0]
92
- >>> n._repr_latex_()
93
- $|d|_0$
94
- >>> n = d.shape[0].set_latex("n")
95
- >>> n._repr_latex()
96
- $n$
97
- ```
98
- """
99
- self._latex_repr = latex_repr
100
- return self
101
-
102
- def __add__(self, other):
103
- return Add.create(self, other)
104
-
105
- def __radd__(self, other):
106
- return Add.create(self, other)
107
-
108
- def __ladd__(self, other):
109
- return self.__add__(other)
110
-
111
- def __sub__(self, other):
112
- return Add.create(self, -1 * other)
113
-
114
- def __rsub__(self, other):
115
- return Add.create(other, -1 * self)
116
-
117
- def __lsub__(self, other):
118
- return Add.create(self, -1 * other)
119
-
120
- def __neg__(self):
121
- return -1 * self
122
-
123
- def __mul__(self, other):
124
- return Mul.create(self, other)
125
-
126
- def __rmul__(self, other):
127
- return self.__mul__(other)
128
-
129
- def __lmul__(self, other):
130
- return self.__mul__(other)
131
-
132
- def __truediv__(self, other):
133
- return Div.create(self, other)
134
-
135
- def __rtruediv__(self, other):
136
- return Div.create(other, self)
137
-
138
- def __pow__(self, other):
139
- return Power.create(self, other)
140
-
141
- def __rpow__(self, other):
142
- return Power.create(other, self)
143
-
144
- def __mod__(self, other):
145
- return Mod.create(self, other)
146
-
147
- def __eq__(self, other):
148
- import jijmodeling.expression.condition as _condition
149
-
150
- return _condition.Equal(self, other)
151
-
152
- def __ne__(self, other):
153
- import jijmodeling.expression.condition as _condition
154
-
155
- return _condition.NotEqual(self, other)
156
-
157
- def __lt__(self, other):
158
- import jijmodeling.expression.condition as _condition
159
-
160
- return _condition.LessThan(self, other)
161
-
162
- def __le__(self, other):
163
- import jijmodeling.expression.condition as _condition
164
-
165
- return _condition.LessThanEqual(self, other)
166
-
167
- def __gt__(self, other):
168
- import jijmodeling.expression.condition as _condition
169
-
170
- return _condition.LessThan(other, self)
171
-
172
- def __ge__(self, other):
173
- import jijmodeling.expression.condition as _condition
174
-
175
- return _condition.LessThanEqual(other, self)
176
-
177
- @abstractmethod
178
- def children(self) -> List[Expression]:
179
- """
180
- This method used at `jijmodeling.expression.extract`.
181
-
182
- Returns:
183
- List[Expression]: children of the expression.
184
- """
185
- return []
186
-
187
-
188
- class DataType(enum.Enum):
189
- INT = "INT"
190
- FLOAT = "FLOAT"
191
-
192
-
193
- class Number(Expression):
194
- """Number class."""
195
-
196
- def __init__(
197
- self,
198
- value: Union[NumericValue, Number],
199
- dtype: Optional[Union[str, DataType]] = None,
200
- uuid: Optional[str] = None,
201
- ):
202
- super().__init__(uuid=uuid)
203
- if isinstance(value, Number):
204
- value = value.value
205
- self._value: NumericValue = value
206
-
207
- self._dtype: DataType
208
- if dtype is None:
209
- self._dtype = (
210
- DataType("INT") if isinstance(value, int) else DataType("FLOAT")
211
- )
212
- elif isinstance(dtype, str):
213
- self._dtype = DataType(dtype.upper())
214
- elif isinstance(dtype, DataType):
215
- self._dtype = dtype
216
- else:
217
- raise TypeError(f"dtype is str or DataType, not {type(dtype)}.")
218
-
219
- if self._dtype == DataType.FLOAT:
220
- self._value = float(value)
221
- elif self._dtype == DataType.INT:
222
- self._value = int(value)
223
-
224
- def _default_repr_latex_(self) -> str:
225
- return str(self.value)
226
-
227
- @property
228
- def value(self) -> NumericValue:
229
- """Number's value."""
230
- return self._value
231
-
232
- @property
233
- def dtype(self) -> DataType:
234
- """Value type "INT" or "FLOAT"."""
235
- return self._dtype
236
-
237
- def is_operatable(self) -> bool:
238
- return True
239
-
240
- def __int__(self):
241
- return int(self.value)
242
-
243
- def __float__(self):
244
- return float(self.value)
245
-
246
- def __repr__(self) -> str:
247
- return str(self.value)
248
-
249
- def _make_latex(self) -> str:
250
- return str(self.value)
251
-
252
- def children(self) -> List[Expression]:
253
- return []
254
-
255
-
256
- def _numeric_to_expression(expr: Union[Expression, NumericValue]) -> Expression:
257
- if isinstance(expr, Expression):
258
- return expr
259
- else:
260
- return Number(expr)
261
-
262
-
263
- class BinaryOperator(Expression, metaclass=ABCMeta):
264
-
265
- _mark = ""
266
-
267
- def __init__(
268
- self,
269
- left: Expression,
270
- right: Expression,
271
- uuid: Optional[str] = None,
272
- ):
273
- """
274
- BinaryOperator Constructor.
275
-
276
- Args:
277
- left (Expression): left hand side
278
- right (Expression): right hand side
279
- """
280
- super().__init__(uuid=uuid)
281
-
282
- self._left = left
283
- self._right = right
284
-
285
- # make sure there is only `Expression`s.
286
- check_type("self._left", self._left, Expression)
287
- check_type("self._right", self._right, Expression)
288
-
289
- import jijmodeling.utils.utils as _uutils
290
-
291
- _error_msg = "{0} is not operatable. If {0} should be operatable, please check the subscripts and dim of {0}."
292
- _uutils.validate_value(
293
- "left.is_operatable()",
294
- self._left.is_operatable(),
295
- _error_msg.format(self._left),
296
- )
297
- _uutils.validate_value(
298
- "right.is_operatable()",
299
- self._right.is_operatable(),
300
- _error_msg.format(self._right),
301
- )
302
-
303
- @property
304
- def left(self) -> Expression:
305
- return self._left
306
-
307
- @property
308
- def right(self) -> Expression:
309
- return self._right
310
-
311
- def is_operatable(self):
312
- return True
313
-
314
- @classmethod
315
- @abstractmethod
316
- def operation(cls, left, right) -> Any:
317
- """
318
- Execute operation.
319
-
320
- Args:
321
- left (Any): left hand side operand
322
- right (Any): right hand side operand
323
-
324
- Example:
325
- ```python
326
- >>> Add.operation(1, 2)
327
- 3
328
- >>> Mul.operation(-1, 4)
329
- -4
330
- >>> Div.operation(1, 2)
331
- 0.5
332
- >>> Power.operation(2, 3)
333
- 8
334
- >>> Mod.operation(10, 3)
335
- 1
336
- ```
337
- """
338
-
339
- @classmethod
340
- def create(
341
- cls,
342
- left: Union[Expression, NumericValue],
343
- right: Union[Expression, NumericValue],
344
- ) -> Expression:
345
- """
346
- In BinaryOperator, there are some opeartions that can be simplified.
347
-
348
- during construction, such as 3+0=3.
349
-
350
- Therefore, it is recommended to call `.create` method to create
351
- the object instead of calling `__init__.` In the `create` metho,
352
- the operand is checked before calling the constructor.
353
- """
354
- _left = _numeric_to_expression(left)
355
- _right = _numeric_to_expression(right)
356
- if isinstance(_left, Number) and isinstance(_right, Number):
357
- return Number(cls.operation(_left.value, _right.value))
358
- return cls(_left, _right)
359
-
360
- def __repr__(self) -> str:
361
- return str(self.left) + self._mark + str(self.right)
362
-
363
- def children(self) -> List[Expression]:
364
- return [self.left, self.right]
365
-
366
-
367
- class Add(BinaryOperator):
368
- """Represents Add operator."""
369
-
370
- _mark = "+"
371
-
372
- @classmethod
373
- def create(
374
- cls,
375
- left: Union[Expression, NumericValue],
376
- right: Union[Expression, NumericValue],
377
- ) -> Expression:
378
- """
379
- Constructor for Add object.
380
-
381
- Args:
382
- left (Union[Expression, NumericValue]): left hand side
383
- right (Union[Expression, NumericValue]): right hand side
384
-
385
- Returns:
386
- Expression: left + right
387
-
388
- Example:
389
- ```python
390
- >>> import jijmodeling as jm
391
- >>> d, a = jm.Placeholder("d"), jm.Placeholder("a")
392
- >>> Add.create(d, a)
393
- d + a
394
- >>> Add.create(d, 0)
395
- d
396
- >>> type(Add.create(3, 2))
397
- <class 'jijmodeling.expression.expression.Number'>
398
- ```
399
- """
400
- _left: Expression = _numeric_to_expression(left)
401
- _right: Expression = _numeric_to_expression(right)
402
- if isinstance(_left, Number) and _left.value == 0.0:
403
- return _right
404
- if isinstance(_right, Number) and _right.value == 0.0:
405
- return _left
406
- if isinstance(_left, Number) and isinstance(_right, Number):
407
- return Number(_left.value + _right.value)
408
- return cls(_left, _right)
409
-
410
- @classmethod
411
- def operation(cls, left, right):
412
- return left + right
413
-
414
- def __repr__(self) -> str:
415
- str_right = str(self.right)
416
- if str_right[0] == "-":
417
- return str(self.left) + " - " + str_right[1:]
418
- else:
419
- return str(self.left) + self._mark + str(self.right)
420
-
421
-
422
- class Mul(BinaryOperator):
423
- _mark = r"*"
424
-
425
- @classmethod
426
- def create(
427
- cls,
428
- left: Union[Expression, NumericValue],
429
- right: Union[Expression, NumericValue],
430
- ) -> Expression:
431
- """
432
- Constructor for Mul object.
433
-
434
- Args:
435
- left (Union[Expression, NumericValue]): left hand side
436
- right (Union[Expression, NumericValue]): right hand side
437
-
438
- Returns:
439
- Expression: left * right
440
-
441
- Example:
442
- ```python
443
- >>> import jijmodeling as jm
444
- >>> d, a = jm.Placeholder("d"), jm.Placeholder("a")
445
- >>> Mul.create(d, a)
446
- d * a
447
- >>> Mul.create(d, 1)
448
- d
449
- >>> Mul.create(d, 0)
450
- 0.0
451
- >>> type(Mul.create(3, 2))
452
- <class 'jijmodeling.expression.expression.Number'>
453
- ```
454
- """
455
- _left: Expression = _numeric_to_expression(left)
456
- _right: Expression = _numeric_to_expression(right)
457
- # case: both hand sides are numbers
458
- if isinstance(_left, Number) and isinstance(_right, Number):
459
- return Number(_left.value * _right.value)
460
- elif isinstance(_left, Number):
461
- # case: left hand side is a number
462
- # case: identity element
463
- if _left.value == 1.0:
464
- return _right
465
- # case: zero element
466
- if _left.value == 0.0:
467
- return Number(0.0)
468
- elif isinstance(_right, Number):
469
- # case: right hand side is a number
470
- # case: identity element
471
- if _right.value == 1.0:
472
- return _left
473
- # case: zero element
474
- if _right.value == 0.0:
475
- return Number(0.0)
476
- # put coefficient in front of variable terms
477
- else:
478
- return cls(_right, _left)
479
- return cls(_left, _right)
480
-
481
- @classmethod
482
- def operation(cls, left, right):
483
- return left * right
484
-
485
-
486
- class Div(BinaryOperator):
487
- _mark = "/"
488
-
489
- def __init__(self, left: Expression, right: Expression, uuid: Optional[str] = None):
490
- # The .create method simplified operations (ex. 0 + d = d),
491
- # but does not handle errors for impossible operations such as division by zero.
492
- # Impossible operation errors must be raised in __init__ constructor
493
- # because they must raise in any path constration.
494
- if isinstance(right, Number) and right.value == 0.0:
495
- raise ZeroDivisionError()
496
-
497
- import jijmodeling.expression.utils as _utils
498
-
499
- _utils.check_non_decision_variable(
500
- [right],
501
- f"The denominotor cannot contain a decision variable in `{left}/{right} <-`.",
502
- )
503
-
504
- super().__init__(left, right, uuid=uuid)
505
-
506
- @classmethod
507
- def create(
508
- cls,
509
- left: Union[Expression, NumericValue],
510
- right: Union[Expression, NumericValue],
511
- ) -> Expression:
512
- """
513
- Constructor for Div object.
514
-
515
- Args:
516
- left (Union[Expression, NumericValue]): left hand side
517
- right (Union[Expression, NumericValue]): right hand side
518
-
519
- Returns:
520
- Expression: left // right
521
-
522
- Raises:
523
- ModelingError: The denominator cannot contain a decision variable.
524
-
525
- Example:
526
- ```python
527
- >>> import jijmodeling as jm
528
- >>> d, a = jm.Placeholder("d"), jm.Placeholder("a")
529
- >>> Div.create(d, a)
530
- d // a
531
- >>> Div.create(d, 1)
532
- d
533
- >>> x = jm.Binary("x")
534
- >>> Div.create(d, x)
535
- jijmodeling.exceptions.ModelingError: The denominator cannot contain a decision variable.
536
- >>> type(Div.create(3, 2))
537
- <class 'jijmodeling.expression.expression.Number'>
538
- ```
539
- """
540
- _left = _numeric_to_expression(left)
541
- _right = _numeric_to_expression(right)
542
-
543
- if isinstance(_right, Number) and (not isinstance(_left, Number)):
544
- if _right.value == 1.0:
545
- return _left
546
- elif isinstance(_left, Number) and (not isinstance(_right, Number)):
547
- if _left.value == 0.0:
548
- return _left # 0 / d = 0
549
- elif isinstance(_left, Number) and isinstance(_right, Number):
550
- return Number(_left.value / _right.value)
551
- return cls(_left, _right)
552
-
553
- @classmethod
554
- def operation(cls, left, right):
555
- return left / right
556
-
557
-
558
- class Power(BinaryOperator):
559
- _mark = "^"
560
-
561
- def __init__(self, left: Expression, right: Expression, uuid: Optional[str] = None):
562
- import jijmodeling.expression.utils as _utils
563
-
564
- _utils.check_non_decision_variable(
565
- [right],
566
- f"The denominotor cannot contain a decision variable in `{left}/{right} <-`.",
567
- )
568
- super().__init__(left, right, uuid)
569
-
570
- @classmethod
571
- def create(
572
- cls,
573
- left: Union[Expression, NumericValue],
574
- right: Union[Expression, NumericValue],
575
- ) -> Expression:
576
- """
577
- Constructor for Power object.
578
-
579
- Args:
580
- left (Union[Expression, NumericValue]): left hand side
581
- right (Union[Expression, NumericValue]): right hand side
582
-
583
- Returns:
584
- Expression: left ** right
585
-
586
- Raises:
587
- ModelingError: The exponent cannot contain a decision variable.
588
- ModelingError: If there is a decision variable in left,
589
- the exponent cannot be specified other than Number.
590
- This condition may be relaxed in a version update.
591
-
592
- Example:
593
- ```python
594
- >>> import jijmodeling as jm
595
- >>> d, a = jm.Placeholder("d"), jm.Placeholder("a")
596
- >>> Power.create(d, a)
597
- d ^ a
598
- >>> Power.create(d, 1)
599
- d
600
- >>> x = jm.Binary("x")
601
- >>> Power.create(d, x)
602
- jijmodeling.exceptions.ModelingError: The exponent cannot contain a decision variable.
603
- >>> Power.create(x, d)
604
- jijmodeling.exceptions.ModelingError: If there is a decision variable in left,
605
- the exponent cannot be specified other than Number.
606
- This condition may be relaxed in a version update.
607
- >>> type(Power.create(3, 2))
608
- <class 'jijmodeling.expression.expression.Number'>
609
- ```
610
- """
611
- # obj: Power = cls(left, right tils import extract_nodes
612
-
613
- _left = _numeric_to_expression(left)
614
- _right = _numeric_to_expression(right)
615
-
616
- # The placeholder is now supported in the exponent part, but it must
617
- # contain an integer.
618
- if isinstance(_right, Number):
619
- if _right.value == 1.0:
620
- return _left
621
- elif _right.value == 0.0:
622
- return Number(1)
623
- if isinstance(_left, Number):
624
- if _left.value == 1.0:
625
- return Number(1)
626
- elif _left.value == 0.0:
627
- return Number(0)
628
- if isinstance(_left, Number) and isinstance(_right, Number):
629
- return Number(_left.value**_right.value)
630
- return cls(_left, _right)
631
-
632
- @classmethod
633
- def operation(cls, left, right):
634
- return left**right
635
-
636
- def __repr__(self) -> str:
637
- base_str = str(self.left)
638
- exp_str = str(self.right)
639
- return f"({base_str})" + "^" + exp_str
640
-
641
-
642
- class Mod(BinaryOperator):
643
- _mark = r"\mod"
644
-
645
- def __init__(self, left: Expression, right: Expression, uuid: Optional[str] = None):
646
-
647
- import jijmodeling.expression.utils as _utils
648
-
649
- _utils.check_non_decision_variable(
650
- [left, right],
651
- f"The left hand side and the right hand side cannot contain a decision variable in `{left}%{right} <-`.",
652
- )
653
-
654
- super().__init__(left, right, uuid)
655
-
656
- @classmethod
657
- def create(
658
- cls,
659
- left: Union[Expression, NumericValue],
660
- right: Union[Expression, NumericValue],
661
- ) -> Expression:
662
- """
663
- Constructor for Mod object.
664
-
665
- Args:
666
- left (Union[Expression, NumericValue]): left hand side
667
- right (Union[Expression, NumericValue]): right hand side
668
-
669
- Returns:
670
- Expression: left % right
671
-
672
- Raises:
673
- ModelingError: The left and the right cannot contain a decision variable.
674
-
675
- Example:
676
- ```python
677
- >>> import jijmodeling as jm
678
- >>> d, a = jm.Placeholder("d"), jm.Placeholder("a")
679
- >>> Mod.create(d, a)
680
- d ^ a
681
- >>> Mod.create(d, 1)
682
- d
683
- >>> x = jm.Binary("x")
684
- >>> Mod.create(d, x)
685
- jijmodeling.exceptions.ModelingError: The left and the right cannot contain a decision variable.
686
- >>> Mod.create(x, d)
687
- jijmodeling.exceptions.ModelingError: The left and the right cannot contain a decision variable.
688
- >>> type(Mod.create(3, 2))
689
- <class 'jijmodeling.expression.expression.Number'>
690
- ```
691
- """
692
- _left = _numeric_to_expression(left)
693
- _right = _numeric_to_expression(right)
694
-
695
- if isinstance(_right, Number) and _right.value == 1.0:
696
- return _left
697
- if isinstance(_left, Number) and isinstance(_right, Number):
698
- return Number(_left.value % _right.value)
699
- return cls(_left, _right)
700
-
701
- @classmethod
702
- def operation(cls, left, right):
703
- return left % right
704
-
705
- def __repr__(self) -> str:
706
- return str(self.left) + " mod " + str(self.right)