jijmodeling 0.10.15__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 (270) hide show
  1. jijmodeling/__init__.py +1 -146
  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.15.dist-info → jijmodeling-1.11.0.dist-info}/WHEEL +1 -2
  18. {jijmodeling-0.10.15.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 -175
  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/condition_same.py +0 -44
  107. jijmodeling/match/constraint_same.py +0 -53
  108. jijmodeling/match/expr_same.py +0 -23
  109. jijmodeling/match/is_same_expr.py +0 -288
  110. jijmodeling/match/penalty_same.py +0 -31
  111. jijmodeling/match/problem_same.py +0 -44
  112. jijmodeling/problem/__init__.py +0 -9
  113. jijmodeling/problem/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  114. jijmodeling/problem/__pycache__/__init__.cpython-310.pyc +0 -0
  115. jijmodeling/problem/__pycache__/problem.cpython-310.opt-1.pyc +0 -0
  116. jijmodeling/problem/__pycache__/problem.cpython-310.pyc +0 -0
  117. jijmodeling/problem/problem.py +0 -166
  118. jijmodeling/protobuf/__init__.py +0 -8
  119. jijmodeling/protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  120. jijmodeling/protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  121. jijmodeling/protobuf/from_protobuf/__init__.py +0 -47
  122. jijmodeling/protobuf/from_protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  123. jijmodeling/protobuf/from_protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  124. jijmodeling/protobuf/from_protobuf/__pycache__/extract_attribute_value_from_header.cpython-310.opt-1.pyc +0 -0
  125. jijmodeling/protobuf/from_protobuf/__pycache__/extract_attribute_value_from_header.cpython-310.pyc +0 -0
  126. jijmodeling/protobuf/from_protobuf/__pycache__/from_protobuf.cpython-310.opt-1.pyc +0 -0
  127. jijmodeling/protobuf/from_protobuf/__pycache__/from_protobuf.cpython-310.pyc +0 -0
  128. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_array_shape.cpython-310.opt-1.pyc +0 -0
  129. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_array_shape.cpython-310.pyc +0 -0
  130. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_op.cpython-310.opt-1.pyc +0 -0
  131. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_op.cpython-310.pyc +0 -0
  132. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_var.cpython-310.opt-1.pyc +0 -0
  133. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_var.cpython-310.pyc +0 -0
  134. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_constraint.cpython-310.opt-1.pyc +0 -0
  135. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_constraint.cpython-310.pyc +0 -0
  136. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_element.cpython-310.opt-1.pyc +0 -0
  137. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_element.cpython-310.pyc +0 -0
  138. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_expression.cpython-310.opt-1.pyc +0 -0
  139. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_expression.cpython-310.pyc +0 -0
  140. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_forall.cpython-310.opt-1.pyc +0 -0
  141. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_forall.cpython-310.pyc +0 -0
  142. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_integer_var.cpython-310.opt-1.pyc +0 -0
  143. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_integer_var.cpython-310.pyc +0 -0
  144. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_jagged_array.cpython-310.opt-1.pyc +0 -0
  145. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_jagged_array.cpython-310.pyc +0 -0
  146. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_number_lit.cpython-310.opt-1.pyc +0 -0
  147. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_number_lit.cpython-310.pyc +0 -0
  148. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_penalty.cpython-310.opt-1.pyc +0 -0
  149. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_penalty.cpython-310.pyc +0 -0
  150. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_placeholder.cpython-310.opt-1.pyc +0 -0
  151. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_placeholder.cpython-310.pyc +0 -0
  152. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_problem.cpython-310.opt-1.pyc +0 -0
  153. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_problem.cpython-310.pyc +0 -0
  154. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_reduction_op.cpython-310.opt-1.pyc +0 -0
  155. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_reduction_op.cpython-310.pyc +0 -0
  156. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_subscript_op.cpython-310.opt-1.pyc +0 -0
  157. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_subscript_op.cpython-310.pyc +0 -0
  158. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_unary_op.cpython-310.opt-1.pyc +0 -0
  159. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_unary_op.cpython-310.pyc +0 -0
  160. jijmodeling/protobuf/from_protobuf/extract_attribute_value_from_header.py +0 -26
  161. jijmodeling/protobuf/from_protobuf/from_protobuf.py +0 -38
  162. jijmodeling/protobuf/from_protobuf/message_to_array_shape.py +0 -35
  163. jijmodeling/protobuf/from_protobuf/message_to_binary_op.py +0 -83
  164. jijmodeling/protobuf/from_protobuf/message_to_binary_var.py +0 -46
  165. jijmodeling/protobuf/from_protobuf/message_to_constraint.py +0 -48
  166. jijmodeling/protobuf/from_protobuf/message_to_element.py +0 -30
  167. jijmodeling/protobuf/from_protobuf/message_to_expression.py +0 -92
  168. jijmodeling/protobuf/from_protobuf/message_to_forall.py +0 -33
  169. jijmodeling/protobuf/from_protobuf/message_to_integer_var.py +0 -54
  170. jijmodeling/protobuf/from_protobuf/message_to_jagged_array.py +0 -25
  171. jijmodeling/protobuf/from_protobuf/message_to_number_lit.py +0 -41
  172. jijmodeling/protobuf/from_protobuf/message_to_penalty.py +0 -36
  173. jijmodeling/protobuf/from_protobuf/message_to_placeholder.py +0 -47
  174. jijmodeling/protobuf/from_protobuf/message_to_problem.py +0 -51
  175. jijmodeling/protobuf/from_protobuf/message_to_reduction_op.py +0 -52
  176. jijmodeling/protobuf/from_protobuf/message_to_subscript_op.py +0 -46
  177. jijmodeling/protobuf/from_protobuf/message_to_unary_op.py +0 -47
  178. jijmodeling/protobuf/to_protobuf/__init__.py +0 -43
  179. jijmodeling/protobuf/to_protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  180. jijmodeling/protobuf/to_protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  181. jijmodeling/protobuf/to_protobuf/__pycache__/add_header_to_message.cpython-310.opt-1.pyc +0 -0
  182. jijmodeling/protobuf/to_protobuf/__pycache__/add_header_to_message.cpython-310.pyc +0 -0
  183. jijmodeling/protobuf/to_protobuf/__pycache__/array_shape_to_message.cpython-310.opt-1.pyc +0 -0
  184. jijmodeling/protobuf/to_protobuf/__pycache__/array_shape_to_message.cpython-310.pyc +0 -0
  185. jijmodeling/protobuf/to_protobuf/__pycache__/binary_op_to_message.cpython-310.opt-1.pyc +0 -0
  186. jijmodeling/protobuf/to_protobuf/__pycache__/binary_op_to_message.cpython-310.pyc +0 -0
  187. jijmodeling/protobuf/to_protobuf/__pycache__/binary_var_to_message.cpython-310.opt-1.pyc +0 -0
  188. jijmodeling/protobuf/to_protobuf/__pycache__/binary_var_to_message.cpython-310.pyc +0 -0
  189. jijmodeling/protobuf/to_protobuf/__pycache__/constraint_to_message.cpython-310.opt-1.pyc +0 -0
  190. jijmodeling/protobuf/to_protobuf/__pycache__/constraint_to_message.cpython-310.pyc +0 -0
  191. jijmodeling/protobuf/to_protobuf/__pycache__/element_to_message.cpython-310.opt-1.pyc +0 -0
  192. jijmodeling/protobuf/to_protobuf/__pycache__/element_to_message.cpython-310.pyc +0 -0
  193. jijmodeling/protobuf/to_protobuf/__pycache__/expression_to_message.cpython-310.opt-1.pyc +0 -0
  194. jijmodeling/protobuf/to_protobuf/__pycache__/expression_to_message.cpython-310.pyc +0 -0
  195. jijmodeling/protobuf/to_protobuf/__pycache__/forall_to_message.cpython-310.opt-1.pyc +0 -0
  196. jijmodeling/protobuf/to_protobuf/__pycache__/forall_to_message.cpython-310.pyc +0 -0
  197. jijmodeling/protobuf/to_protobuf/__pycache__/integer_var_to_message.cpython-310.opt-1.pyc +0 -0
  198. jijmodeling/protobuf/to_protobuf/__pycache__/integer_var_to_message.cpython-310.pyc +0 -0
  199. jijmodeling/protobuf/to_protobuf/__pycache__/jagged_array_to_message.cpython-310.opt-1.pyc +0 -0
  200. jijmodeling/protobuf/to_protobuf/__pycache__/jagged_array_to_message.cpython-310.pyc +0 -0
  201. jijmodeling/protobuf/to_protobuf/__pycache__/number_lit_to_message.cpython-310.opt-1.pyc +0 -0
  202. jijmodeling/protobuf/to_protobuf/__pycache__/number_lit_to_message.cpython-310.pyc +0 -0
  203. jijmodeling/protobuf/to_protobuf/__pycache__/penalty_to_message.cpython-310.opt-1.pyc +0 -0
  204. jijmodeling/protobuf/to_protobuf/__pycache__/penalty_to_message.cpython-310.pyc +0 -0
  205. jijmodeling/protobuf/to_protobuf/__pycache__/placeholder_to_message.cpython-310.opt-1.pyc +0 -0
  206. jijmodeling/protobuf/to_protobuf/__pycache__/placeholder_to_message.cpython-310.pyc +0 -0
  207. jijmodeling/protobuf/to_protobuf/__pycache__/problem_to_message.cpython-310.opt-1.pyc +0 -0
  208. jijmodeling/protobuf/to_protobuf/__pycache__/problem_to_message.cpython-310.pyc +0 -0
  209. jijmodeling/protobuf/to_protobuf/__pycache__/reduction_op_to_message.cpython-310.opt-1.pyc +0 -0
  210. jijmodeling/protobuf/to_protobuf/__pycache__/reduction_op_to_message.cpython-310.pyc +0 -0
  211. jijmodeling/protobuf/to_protobuf/__pycache__/subscript_op_to_message.cpython-310.opt-1.pyc +0 -0
  212. jijmodeling/protobuf/to_protobuf/__pycache__/subscript_op_to_message.cpython-310.pyc +0 -0
  213. jijmodeling/protobuf/to_protobuf/__pycache__/to_protobuf.cpython-310.opt-1.pyc +0 -0
  214. jijmodeling/protobuf/to_protobuf/__pycache__/to_protobuf.cpython-310.pyc +0 -0
  215. jijmodeling/protobuf/to_protobuf/__pycache__/unary_op_to_message.cpython-310.opt-1.pyc +0 -0
  216. jijmodeling/protobuf/to_protobuf/__pycache__/unary_op_to_message.cpython-310.pyc +0 -0
  217. jijmodeling/protobuf/to_protobuf/add_header_to_message.py +0 -35
  218. jijmodeling/protobuf/to_protobuf/array_shape_to_message.py +0 -43
  219. jijmodeling/protobuf/to_protobuf/binary_op_to_message.py +0 -101
  220. jijmodeling/protobuf/to_protobuf/binary_var_to_message.py +0 -49
  221. jijmodeling/protobuf/to_protobuf/constraint_to_message.py +0 -52
  222. jijmodeling/protobuf/to_protobuf/element_to_message.py +0 -43
  223. jijmodeling/protobuf/to_protobuf/expression_to_message.py +0 -89
  224. jijmodeling/protobuf/to_protobuf/forall_to_message.py +0 -32
  225. jijmodeling/protobuf/to_protobuf/integer_var_to_message.py +0 -54
  226. jijmodeling/protobuf/to_protobuf/jagged_array_to_message.py +0 -37
  227. jijmodeling/protobuf/to_protobuf/number_lit_to_message.py +0 -52
  228. jijmodeling/protobuf/to_protobuf/penalty_to_message.py +0 -42
  229. jijmodeling/protobuf/to_protobuf/placeholder_to_message.py +0 -58
  230. jijmodeling/protobuf/to_protobuf/problem_to_message.py +0 -54
  231. jijmodeling/protobuf/to_protobuf/reduction_op_to_message.py +0 -64
  232. jijmodeling/protobuf/to_protobuf/subscript_op_to_message.py +0 -48
  233. jijmodeling/protobuf/to_protobuf/to_protobuf.py +0 -36
  234. jijmodeling/protobuf/to_protobuf/unary_op_to_message.py +0 -58
  235. jijmodeling/sampleset/__init__.py +0 -33
  236. jijmodeling/sampleset/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  237. jijmodeling/sampleset/__pycache__/__init__.cpython-310.pyc +0 -0
  238. jijmodeling/sampleset/__pycache__/evaluation.cpython-310.opt-1.pyc +0 -0
  239. jijmodeling/sampleset/__pycache__/evaluation.cpython-310.pyc +0 -0
  240. jijmodeling/sampleset/__pycache__/measuring_time.cpython-310.opt-1.pyc +0 -0
  241. jijmodeling/sampleset/__pycache__/measuring_time.cpython-310.pyc +0 -0
  242. jijmodeling/sampleset/__pycache__/record.cpython-310.opt-1.pyc +0 -0
  243. jijmodeling/sampleset/__pycache__/record.cpython-310.pyc +0 -0
  244. jijmodeling/sampleset/__pycache__/sampleset.cpython-310.opt-1.pyc +0 -0
  245. jijmodeling/sampleset/__pycache__/sampleset.cpython-310.pyc +0 -0
  246. jijmodeling/sampleset/__pycache__/solving_time.cpython-310.opt-1.pyc +0 -0
  247. jijmodeling/sampleset/__pycache__/solving_time.cpython-310.pyc +0 -0
  248. jijmodeling/sampleset/__pycache__/system_time.cpython-310.opt-1.pyc +0 -0
  249. jijmodeling/sampleset/__pycache__/system_time.cpython-310.pyc +0 -0
  250. jijmodeling/sampleset/evaluation.py +0 -198
  251. jijmodeling/sampleset/measuring_time.py +0 -59
  252. jijmodeling/sampleset/record.py +0 -158
  253. jijmodeling/sampleset/sampleset.py +0 -381
  254. jijmodeling/sampleset/solving_time.py +0 -38
  255. jijmodeling/sampleset/system_time.py +0 -48
  256. jijmodeling/type_annotations/__init__.py +0 -38
  257. jijmodeling/type_annotations/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  258. jijmodeling/type_annotations/__pycache__/__init__.cpython-310.pyc +0 -0
  259. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-310.opt-1.pyc +0 -0
  260. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-310.pyc +0 -0
  261. jijmodeling/type_annotations/type_annotations.py +0 -44
  262. jijmodeling/utils/__init__.py +0 -28
  263. jijmodeling/utils/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  264. jijmodeling/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  265. jijmodeling/utils/__pycache__/utils.cpython-310.opt-1.pyc +0 -0
  266. jijmodeling/utils/__pycache__/utils.cpython-310.pyc +0 -0
  267. jijmodeling/utils/utils.py +0 -146
  268. jijmodeling-0.10.15.dist-info/METADATA +0 -59
  269. jijmodeling-0.10.15.dist-info/RECORD +0 -255
  270. jijmodeling-0.10.15.dist-info/top_level.txt +0 -1
@@ -1,132 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import abc as _abc
4
- import enum as _enum
5
- import inspect as _inspect
6
- import typing as tp
7
- import uuid as _uuid
8
-
9
- from typeguard import typechecked
10
-
11
- import jijmodeling
12
-
13
-
14
- class Serializable(_abc.ABCMeta):
15
- """
16
- Meta class that can call `to_serializable()` and `from_serializable()`.
17
-
18
- Args:
19
- ABCMeta ([type]): [description]
20
- """
21
-
22
- def __new__(cls, cls_name, cls_bases, cls_dict):
23
- if "__init__" in cls_dict:
24
- # serializeで用いるためExpressionクラスはコンストラクタの引数と対応する同じ名前の
25
- # @property を持つ必要があるので, それが実装されているかをチェックする
26
- init_func = _inspect.signature(cls_dict["__init__"])
27
- params = [param for param in init_func.parameters if param != "self"]
28
- for param in params:
29
- if param not in cls_dict:
30
- bases_has_property = False
31
- for bases in cls_bases:
32
- if param in dir(bases):
33
- bases_has_property = True
34
- if not bases_has_property:
35
- raise NotImplementedError(
36
- f"propety '{param}' must be" + f" define in {cls_name}."
37
- )
38
- return super().__new__(cls, cls_name, cls_bases, cls_dict)
39
-
40
-
41
- def to_serializable(expression: Serializable) -> dict:
42
- """
43
- Serialize an serializable object.
44
-
45
- Args:
46
- expression (Serializable): e.g. mathematical expression, problem, ...
47
-
48
- Returns:
49
- dict: serialized object
50
- """
51
- seri = obj_to_seri(expression)
52
- return {"version": "0.10.0", "object": seri}
53
-
54
-
55
- def obj_to_seri(obj):
56
- if isinstance(obj.__class__, Serializable):
57
- return expression_to_seri(obj)
58
- elif isinstance(obj, (list, tuple)):
59
- return {
60
- "iteratable": "list" if isinstance(obj, list) else "tuple",
61
- "value": [obj_to_seri(v) for v in obj],
62
- }
63
- elif isinstance(obj, dict):
64
- return {k: obj_to_seri(v) for k, v in obj.items()}
65
- elif isinstance(obj, _uuid.UUID):
66
- return obj.hex
67
- elif isinstance(obj, _enum.Enum):
68
- if isinstance(obj, jijmodeling.expression.expression.DataType):
69
- return obj.value.lower()
70
- else:
71
- return obj.value
72
- else:
73
- return obj
74
-
75
-
76
- def expression_to_seri(expression: Serializable) -> dict:
77
- exp_module = expression.__class__.__module__
78
- exp_cls = expression.__class__.__name__
79
- serializable: tp.Dict[str, tp.Any] = {"class": exp_module + "." + exp_cls}
80
-
81
- init_args_keys = _inspect.getfullargspec(expression.__class__.__init__).args
82
- init_params = {}
83
- for key in init_args_keys:
84
- # Ignore `self` because it is not used as a key for a serialized object
85
- if key == "self":
86
- continue
87
- # Expression class の constructor の引数名と同じpropertyを必ず各クラスは持っているので
88
- # それを情報としてserializeする
89
- if f"_{key}" in dir(expression):
90
- value = eval(f"expression._{key}")
91
- else:
92
- value = eval(f"expression.{key}")
93
- init_params[key] = obj_to_seri(value)
94
- serializable["attributes"] = init_params
95
- return serializable
96
-
97
-
98
- @typechecked
99
- def from_serializable(serializable: tp.Union[dict, list]):
100
- """Convert to Expression from serializable object (dict)."""
101
- if isinstance(serializable, dict) and "object" in serializable:
102
- obj = serializable["object"]
103
- else:
104
- raise ValueError("version mismatch")
105
- return obj_from_seri(obj)
106
-
107
-
108
- def obj_from_seri(obj):
109
- if isinstance(obj, dict) and "class" in obj:
110
- modulePath = obj["class"].split(".")[1:]
111
- module = jijmodeling
112
- for m in modulePath:
113
- module = getattr(module, m)
114
- # get name of arguments of __init__ of Expression object
115
- init_args = _inspect.getfullargspec(module.__init__).args
116
- init_arg_values = {
117
- arg: obj_from_seri(obj["attributes"][arg])
118
- for arg in init_args
119
- if arg != "self"
120
- }
121
- return module(**init_arg_values)
122
- elif isinstance(obj, dict) and "iteratable" in obj:
123
- if obj["iteratable"] == "list":
124
- return [obj_from_seri(s) for s in obj["value"]]
125
- elif obj["iteratable"] == "tuple":
126
- return tuple(obj_from_seri(s) for s in obj["value"])
127
- elif isinstance(obj, list):
128
- return [obj_from_seri(s) for s in obj]
129
- elif isinstance(obj, dict):
130
- return {k: obj_from_seri(v) for k, v in obj.items()}
131
-
132
- return obj
@@ -1,197 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import typing as tp
4
-
5
- import typeguard as _typeguard
6
-
7
- from typeguard import typechecked
8
-
9
- import jijmodeling.exceptions.exceptions as _exceptions
10
- import jijmodeling.expression.condition as _conditions
11
- import jijmodeling.expression.expression as _expression
12
- import jijmodeling.expression.extract as _extract
13
-
14
- # type validation
15
- import jijmodeling.expression.type_annotations as _type_annotations
16
- import jijmodeling.expression.variables.variable as _variable
17
- import jijmodeling.utils.utils as _utils
18
-
19
-
20
- class ReductionOperator(_expression.Expression):
21
- def __init__(
22
- self,
23
- sum_index: _variable.Element,
24
- operand: _expression.Expression,
25
- condition: tp.Optional[_conditions.Condition] = None,
26
- uuid: tp.Optional[str] = None,
27
- ) -> None:
28
-
29
- super().__init__(uuid=uuid)
30
-
31
- self._sum_index = sum_index
32
- self._operand = operand
33
- self._condition: _conditions.Condition = (
34
- _conditions.NoneCondition() if condition is None else condition
35
- )
36
- if uuid is not None:
37
- self._uuid = uuid
38
-
39
- if _extract.condition_has_decivar(self._condition):
40
- raise _exceptions.CannotContainDecisionVarError(
41
- "condition for sum index cannot contain decision variable."
42
- )
43
-
44
- ConditionType = tp.Optional[_conditions.Condition]
45
- _typeguard.check_type(
46
- "self._sum_index", self._sum_index, _type_annotations.SumIndexType
47
- )
48
- _typeguard.check_type(
49
- "self._operand", self._operand, _type_annotations.OperandType
50
- )
51
- _typeguard.check_type("self._condition", self._condition, ConditionType)
52
-
53
- @property
54
- def sum_index(self) -> _variable.Element:
55
- """Summation index."""
56
- return self._sum_index
57
-
58
- @property
59
- def operand(self) -> _expression.Expression:
60
- """Summation operand."""
61
- return self._operand
62
-
63
- @property
64
- def condition(self) -> _conditions.Condition:
65
- """Summation condition."""
66
- return self._condition
67
-
68
- def children(self) -> list:
69
- """[sum_index, operand, condition]."""
70
- return [self._sum_index, self._operand] + self.condition.expressions()
71
-
72
- def is_operatable(self) -> bool:
73
- return True
74
-
75
- def __repr__(self) -> str:
76
- sum_index = ""
77
- if isinstance(self.sum_index.parent, _variable.Range):
78
- sum_index = "{" + "{}={}".format(
79
- self.sum_index, self.sum_index.parent.start
80
- )
81
- sum_index = sum_index + "}"
82
- sum_index = sum_index + "^{" + str(self.sum_index.parent.last) + "}"
83
- else:
84
- sum_index = "{" + f"{self.sum_index} in {self.sum_index.parent}"
85
- sum_index = sum_index + "}"
86
-
87
- return "Sum_" + sum_index + "(" + str(self.operand) + ")"
88
-
89
-
90
- class SumOperator(ReductionOperator):
91
- """
92
- Class that represents the sum.
93
-
94
- Example:
95
- Create $`\\sum_{i=0}^n d_i x_i`$
96
-
97
- >>> from jijmodeling import Placeholder, Binary, SumOperator
98
- >>> from jijmodeling import Element
99
- >>> d = Placeholder('d', dim=1)
100
- >>> n = d.shape[0]
101
- >>> x = Binary('x', shape=n)
102
- >>> i = Element("i", n)
103
- >>> SumOperator(sum_index=i, operand=d[i]*x[i], condition=None)
104
- Σ_{i}(d[i]x[i])
105
- """
106
-
107
-
108
- INDEXWITHCOND = tp.Union[
109
- _variable.Element, tp.Tuple[_variable.Element, _conditions.Condition]
110
- ]
111
-
112
-
113
- def Sum(
114
- indices: tp.Union[INDEXWITHCOND, tp.List[INDEXWITHCOND]],
115
- term: _expression.Expression,
116
- ) -> SumOperator:
117
- """
118
- Sum function.
119
-
120
- Args:
121
- indices: summation index dict or list of index.
122
- term (Expression): operand of summation
123
-
124
- Returns:
125
- SumOperator: SumOperator object.
126
-
127
- Example:
128
- Create $`\\sum_{i=0}^n d_i x_i`$
129
-
130
- >>> import jijmodeling as jm
131
- >>> d = jm.Placeholder('d', dim=1)
132
- >>> n = d.shape[0]
133
- >>> x = jm.Binary('x', shape=n)
134
- >>> i = jm.Element('i', n)
135
- >>> jm.Sum(i, d[i]*x[i])
136
- Σ_{i}(d[i]x[i])
137
-
138
- Create $`\\sum_{i}\\sum_j d_{ij}x_i x_j`$
139
-
140
- >>> import jijmodeling as jm
141
- >>> d = jm.Placeholder('d', dim = 2)
142
- >>> n = d.shape[0]
143
- >>> x = jm.Binary('x', shape=n)
144
- >>> i = jm.Element('i', n)
145
- >>> j = jm.Element('j', n)
146
- >>> jm.Sum([i, j], d[i, j]*x[i]*x[j])
147
-
148
- Conditional sum
149
- >>> import jijmodeling as jm
150
- >>> d = jm.Placeholder('d', dim = 2)
151
- >>> n = d.shape[0]
152
- >>> i, j = jm.Element("i", n), jm.Element("j", n)
153
- >>> x = jm.Binary('x', shape=n)
154
- >>> jm.Sum([i, (j, i < j)], d[i, j]*x[i]*x[j])
155
- """
156
-
157
- # convert indices and condition to list-type object
158
- # ex. i -> [i]
159
- indices_list = indices if isinstance(indices, list) else [indices] # type: ignore
160
-
161
- # element type from users
162
- IndexType = tp.Union[
163
- _variable.Element,
164
- tp.Tuple[_variable.Element, tp.Optional[_conditions.Condition]],
165
- ]
166
-
167
- @typechecked
168
- def convert_to_element(
169
- index: IndexType,
170
- ) -> tp.Tuple[_variable.Element, tp.Optional[_conditions.Condition]]:
171
- if isinstance(index, tuple): # Tuple[ElementType, Optional[Condition]]
172
- elem, cond = index
173
- return (elem, cond)
174
- else: # ElementType
175
- return (index, None)
176
-
177
- elems_and_conds: tp.List[
178
- tp.Tuple[_variable.Element, tp.Optional[_conditions.Condition]]
179
- ] = [convert_to_element(index) for index in indices_list]
180
- elements = [elem for elem, _ in elems_and_conds]
181
- condition_list = [cond for _, cond in elems_and_conds]
182
-
183
- # list length validation
184
- _utils.validate_value("len(indices) > 0", len(elements) > 0)
185
- _utils.validate_value("len(condition_list) > 0", len(condition_list) > 0)
186
- _utils.validate_value(
187
- "len(indices_list) == len(condition_list)",
188
- len(indices_list) == len(condition_list),
189
- )
190
- sum_term = term
191
- for sum_index, cond in zip(elements[::-1], condition_list[::-1]):
192
- sum_term = SumOperator(
193
- sum_index=sum_index,
194
- operand=sum_term,
195
- condition=cond if cond is not None else _conditions.NoneCondition(),
196
- )
197
- return sum_term # type: ignore
@@ -1,50 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import typing as tp
4
-
5
- from jijmodeling.expression.expression import BinaryOperator, Expression, Number
6
- from jijmodeling.expression.mathfunc import UnaryOperator
7
- from jijmodeling.expression.variables.placeholders import ArrayShape, Placeholder
8
- from jijmodeling.expression.variables.variable import (
9
- Element,
10
- Range,
11
- Subscripts,
12
- Variable,
13
- )
14
-
15
- # Type of subscript element
16
- SubscriptElementType = (
17
- Expression # tp.TypeVar("SubscriptElementType", bound=Expression)
18
- )
19
- # User Input type for subscript element
20
- SubscriptElemInputType = tp.Union[slice, SubscriptElementType, int]
21
-
22
- # Type of shape element
23
- # tp.TypeVar("ShapeElementType", bound=Expression)
24
- ShapeElementType = Expression
25
- # User input type for shape element
26
- ShapeElemInputType = tp.Union[ShapeElementType, int, None]
27
-
28
- ElementParentType = tp.Union[Range, Variable, Subscripts]
29
-
30
-
31
- NumericInt = int
32
- ExprOrNum = tp.Union[Expression, int, float]
33
-
34
- IntExpr = tp.Union[Expression, int]
35
-
36
-
37
- ElementSetType = tp.Union[Range, Variable, Subscripts]
38
-
39
-
40
- Operator = tp.Union[BinaryOperator, UnaryOperator]
41
-
42
- StrictShapeElemType = tp.Union[
43
- Number,
44
- Placeholder,
45
- Operator,
46
- ArrayShape,
47
- ]
48
- RangeBoundType = tp.TypeVar("RangeBoundType", bound=Expression)
49
- SumIndexType = tp.TypeVar("SumIndexType", bound=Element)
50
- OperandType = tp.TypeVar("OperandType", bound=Expression)
@@ -1,175 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import typing as tp
4
-
5
- import typeguard as _typeguard
6
-
7
- import jijmodeling.exceptions.exceptions as _exceptions
8
- import jijmodeling.expression.condition as _condition
9
- import jijmodeling.expression.expression as _expression
10
- import jijmodeling.expression.extract as _extract
11
- import jijmodeling.expression.sum as _sum
12
- import jijmodeling.expression.variables.deci_vars as _deci_vars
13
- import jijmodeling.expression.variables.variable as _variable
14
-
15
- T = tp.TypeVar("T")
16
-
17
-
18
- def type_check_bool(value, cls) -> bool:
19
- try:
20
- _typeguard.check_type("a", value, cls)
21
- except TypeError:
22
- return False
23
- else:
24
- return True
25
-
26
-
27
- def extract_nodes(tree: _expression.Expression, cls: tp.Type[T]) -> tp.List[T]:
28
- """
29
- Extract specified class object from Expression tree.
30
-
31
- Args:
32
- tree (Expression): Target expression tree.
33
- cls (Type): Target class.
34
-
35
- Returns:
36
- List: `cls` object list are included in `tree`.
37
-
38
- Examples:
39
- ```python
40
- >>> import jijmodeling as jm
41
- >>> d = jm.Placheolder("d", dim=1)
42
- >>> n = d.shape[0]
43
- >>> x = jm.Binary("x", shape=(n, ))
44
- >>> i = jm.Element("i", n)
45
- >>> term = jm.Sum(i, d[i]*x[i])
46
- >>> jm.extract_nodes(term, jm.DecisionVariable)
47
- [x]
48
- ```
49
- """
50
- if type_check_bool(tree, cls):
51
- nodes = [tree]
52
- else:
53
- nodes = []
54
- for child in tree.children():
55
- nodes = nodes + extract_nodes(child, cls) # type: ignore
56
- return nodes # type: ignore
57
-
58
-
59
- def get_order(expression: _expression.Expression) -> int:
60
- """
61
- Get an order of polynomial.
62
-
63
- For example, x_i * y_i + x_i -> 2 if x and y is a decision variable.
64
-
65
- Args:
66
- expression (Expression): expression
67
-
68
- Returns:
69
- int: Integer
70
- """
71
- if isinstance(expression, _deci_vars.DecisionVariable):
72
- return 1
73
- if isinstance(expression, _variable.Subscripts):
74
- if isinstance(expression.variable, _deci_vars.DecisionVariable):
75
- return 1
76
- else:
77
- return 0
78
- if isinstance(expression, (_expression.Add, _expression.Div)):
79
- child_order = [get_order(child) for child in expression.children()]
80
- return max(child_order)
81
- if isinstance(expression, _expression.Mul):
82
- child_order = [get_order(child) for child in expression.children()]
83
- return sum(child_order)
84
- if isinstance(expression, _expression.Power):
85
- base_order = get_order(expression.left)
86
- if base_order > 0:
87
- if isinstance(expression.right, _expression.Number):
88
- return base_order * int(expression.right.value)
89
- else:
90
- raise _exceptions.ModelingError("exponent should be number.")
91
- if isinstance(expression, _sum.SumOperator):
92
- return get_order(expression.operand)
93
- else:
94
- return 0
95
-
96
-
97
- def expression_indices(
98
- expression: _expression.Expression,
99
- ) -> tp.List[_variable.Element]:
100
- """
101
- Extract all indices from the expression.
102
-
103
- Args:
104
- expression (Expression): expression
105
-
106
- Returns:
107
- List[Element]:
108
- """
109
- # TODO: implement expression_indices for each expression?
110
- indices: tp.List[_variable.Element]
111
- if isinstance(expression, _variable.Element):
112
- set_indices: tp.List[_variable.Element] = []
113
- for child in expression.children():
114
- set_indices = set_indices + expression_indices(child)
115
- indices = [expression] + set_indices
116
- elif isinstance(expression, _expression.Number):
117
- indices = []
118
- elif isinstance(expression, _variable.Variable):
119
- indices = []
120
- elif isinstance(expression, _variable.Subscripts):
121
- indices = []
122
- for subs in expression.subscripts:
123
- indices = indices + expression_indices(subs)
124
- elif isinstance(expression, _expression.Expression):
125
- indices = []
126
- for child in expression.children():
127
- if child is not None:
128
- indices = indices + expression_indices(child)
129
- else:
130
- raise TypeError(f"expression is Expression, not {type(expression)}")
131
-
132
- # check duplicated element
133
- el_label = []
134
- if isinstance(expression, _sum.ReductionOperator):
135
- el_label = [expression.sum_index.label]
136
-
137
- unique_indices: tp.List[_variable.Element] = []
138
- for index in indices:
139
- if index.label not in el_label:
140
- el_label.append(index.label)
141
- unique_indices.append(index)
142
- return unique_indices
143
-
144
-
145
- def condition_indices(condition: _condition.Condition) -> tp.List[_variable.Element]:
146
- if isinstance(condition, _condition.CompareCondition):
147
- left_indices = expression_indices(condition.left)
148
- right_indices = expression_indices(condition.right)
149
- return left_indices + right_indices
150
- elif isinstance(condition, _condition.ConditionOperator):
151
- left_indices = condition_indices(condition.left)
152
- right_indices = condition_indices(condition.right)
153
- return left_indices + right_indices
154
- else:
155
- return []
156
-
157
-
158
- def check_non_decision_variable(
159
- exp_list: tp.Iterable[_expression.Expression], error_msg: str
160
- ):
161
- """
162
- Check if list has decision variable or not.
163
-
164
- Args:
165
- exp_list (Iterable[Expression]): target iterator.
166
- error_msg (str): error message.
167
-
168
- Raises:
169
- CannotContainDecisionVarError: if list has decision variable.
170
- """
171
- for e in exp_list:
172
- variables = _extract.extract_variables(e)
173
- for v in variables:
174
- if isinstance(v, _deci_vars.DecisionVariable):
175
- raise _exceptions.CannotContainDecisionVarError(error_msg)
@@ -1,35 +0,0 @@
1
- from pkgutil import extend_path
2
-
3
- __path__ = extend_path(__path__, __name__)
4
-
5
- import jijmodeling.expression.variables.deci_vars as deci_vars
6
- import jijmodeling.expression.variables.jagged_array as jagged_array
7
- import jijmodeling.expression.variables.placeholders as placeholders
8
- import jijmodeling.expression.variables.variable as variable
9
-
10
- from jijmodeling.expression.variables.deci_vars import (
11
- Binary,
12
- DecisionVariable,
13
- Integer,
14
- LogEncInteger,
15
- )
16
- from jijmodeling.expression.variables.jagged_array import JaggedArray
17
- from jijmodeling.expression.variables.placeholders import ArrayShape, Placeholder
18
- from jijmodeling.expression.variables.variable import Element, Subscripts, Variable
19
-
20
- __all__ = [
21
- "deci_vars",
22
- "jagged_array",
23
- "placeholders",
24
- "variable",
25
- "Variable",
26
- "Subscripts",
27
- "Element",
28
- "Placeholder",
29
- "ArrayShape",
30
- "JaggedArray",
31
- "DecisionVariable",
32
- "Binary",
33
- "LogEncInteger",
34
- "Integer",
35
- ]