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,485 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import typing as tp
4
-
5
- from uuid import uuid4
6
-
7
- from typeguard import check_type
8
-
9
- import jijmodeling.exceptions.exceptions as _exceptions
10
- import jijmodeling.expression.expression as _expression
11
- import jijmodeling.expression.serializable as _serializable
12
- import jijmodeling.expression.type_annotations as _type_annotations
13
-
14
- if tp.TYPE_CHECKING:
15
- import jijmodeling.expression.sum as _sum
16
-
17
-
18
- def type_check_bool(value, cls) -> bool:
19
- """
20
- Do a type_check_and returns whether the validation succeeds or not.
21
-
22
- Args:
23
- value: value to be validated
24
- cls: type
25
-
26
- Returns:
27
- bool: return if `value` matches the `cls` type.
28
- """
29
- try:
30
- check_type("a", value, cls)
31
- except TypeError:
32
- return False
33
- else:
34
- check_type("a", value, cls)
35
-
36
- return True
37
-
38
-
39
- class Variable(_expression.Expression):
40
- """Abstract class for variables."""
41
-
42
- def __init__(
43
- self,
44
- label: str,
45
- shape: tp.Union[
46
- tp.Tuple[_type_annotations.ShapeElemInputType, ...],
47
- tp.List[_type_annotations.ShapeElemInputType],
48
- _type_annotations.ShapeElemInputType,
49
- ] = tuple([]),
50
- uuid: tp.Optional[str] = None,
51
- ):
52
-
53
- super().__init__(uuid=uuid)
54
- self._label = label
55
-
56
- # convert list to tuple
57
- _shape: tp.Tuple[tp.Optional[_type_annotations.ShapeElementType], ...]
58
- if isinstance(shape, (list, tuple)):
59
- _shape_list: tp.List[tp.Optional[_expression.Expression]] = []
60
- for s in shape:
61
- if s is None:
62
- _shape_list.append(s)
63
- elif isinstance(s, _expression.Expression):
64
- _shape_list.append(s)
65
- elif type_check_bool(s, _expression.NumericValue):
66
- _shape_list.append(_expression.Number(int(s), dtype="int"))
67
- else:
68
- raise TypeError("shape is Expression or int.")
69
- _shape = tuple(_shape_list) # type: ignore
70
- elif shape is None:
71
- _shape = (None,)
72
- else:
73
- _shape = (_expression._numeric_to_expression(shape),)
74
-
75
- from jijmodeling.expression.variables.placeholders import ArrayShape
76
-
77
- _shape_value: tp.List[_type_annotations.ShapeElementType] = []
78
- for d, s in enumerate(_shape):
79
- if s is None:
80
- _shape_value.append(ArrayShape(self, d))
81
- else:
82
- _shape_value.append(s)
83
-
84
- self._shape_without_none = tuple(_shape_value)
85
-
86
- # The _shape should contain "None" to avoid circular references when serializing.
87
- # When serializing, "._shape" is referenced before "@property shape",
88
- # so this way we can avoid the problem of circular references.
89
- self._shape = _shape # _shape attributes is for .children.
90
-
91
- import jijmodeling.expression.utils as _utils
92
-
93
- _utils.check_non_decision_variable(
94
- self._shape_without_none,
95
- "The shape cannot contain any decision variables. Check the shape of `{}`.".format(
96
- label
97
- ),
98
- )
99
-
100
- self._dummy_elements_id = [uuid4().hex for _ in range(self.dim)]
101
-
102
- @property
103
- def label(self) -> str:
104
- return self._label
105
-
106
- @property
107
- def shape(self) -> tp.Tuple[_type_annotations.ShapeElementType, ...]:
108
- return tuple(self._shape_without_none)
109
-
110
- @property
111
- def dim(self) -> int:
112
- return len(self.shape)
113
-
114
- def __repr__(self) -> str:
115
- return self.label
116
-
117
- def is_operatable(self) -> bool:
118
- return self.dim == 0
119
-
120
- def children(self) -> tp.List[_expression.Expression]:
121
- return [s for s in self._shape if s is not None]
122
-
123
- def __getitem__(
124
- self,
125
- key: tp.Union[
126
- _type_annotations.SubscriptElemInputType,
127
- tp.List[tp.Union[slice, _type_annotations.SubscriptElemInputType]],
128
- tp.Tuple[tp.Union[slice, _type_annotations.SubscriptElemInputType], ...],
129
- ],
130
- ) -> tp.Union[Subscripts, _sum.SumOperator]:
131
- """
132
- `[]` operator for adding subscripts if the user specifies str for the.
133
-
134
- argument which is available for previous versions of JijModeling
135
- (<=0.8.14), This function throws an error.
136
-
137
- Args:
138
- key : subscripts
139
-
140
- Raises:
141
- ModelingError: If there is a discrepancy between the dimension of the variable and the number of subscripts added.
142
- TypeError: key type check.
143
-
144
- Returns:
145
- Subscripted variable.
146
- """
147
- key_tuple: tp.Tuple[tp.Union[slice, _expression.Expression, int], ...]
148
- if isinstance(key, list):
149
- key_tuple = tuple(key)
150
- elif isinstance(key, (_expression.Expression, slice, int)):
151
- key_tuple = (key,)
152
- elif isinstance(key, tuple):
153
- key_tuple = key
154
- else:
155
- raise TypeError(
156
- "key is tp.List[Expression] or tp.Tuple[Expression] or Expression. not {}.".format(
157
- key.__class__.__name__
158
- )
159
- )
160
-
161
- if self.dim < len(key_tuple):
162
- raise _exceptions.ModelingError(
163
- "{} is {}-dimentional array, not {}-dim.".format(
164
- self, self.dim, len(key_tuple)
165
- )
166
- )
167
-
168
- subscripts: tp.List[_type_annotations.SubscriptElementType] = []
169
- summation_index: tp.List[Element] = []
170
- for i, k in enumerate(key_tuple):
171
- key_element: _expression.Expression
172
- if isinstance(k, slice):
173
- # syntax sugar
174
- # x[:] => Sum({':x_0': x.shape[0]}, x[':x_0'])
175
-
176
- subscripted_var = Subscripts(self, subscripts=subscripts[:i])
177
- element_set: _type_annotations.ShapeElementType = subscripted_var.shape[
178
- 0
179
- ]
180
- sum_element = Element(
181
- f":{self.label}_{i}", element_set, uuid=self._dummy_elements_id[i]
182
- ).set_latex(rf"\bar{{i}}_{{{str(i)}}}")
183
- summation_index.append(sum_element)
184
- key_element = sum_element
185
- elif isinstance(k, _expression.Expression):
186
- key_element = k
187
- elif isinstance(k, int):
188
- key_element = _expression.Number(k, dtype="int")
189
- else:
190
- raise TypeError(
191
- "subscripts of {} is ".format(k)
192
- + "`int` or `Expression`, not {}.".format(type(k))
193
- )
194
- subscripts.append(key_element)
195
-
196
- variable: tp.Union[_sum.SumOperator, Subscripts] = Subscripts(
197
- self, subscripts=subscripts
198
- )
199
- import jijmodeling.expression.sum as _sum
200
-
201
- for index in summation_index:
202
- variable = _sum.Sum(index, variable)
203
- return variable
204
-
205
- def __hash__(self) -> int:
206
- return hash(self.label) + self.uuid.__hash__()
207
-
208
-
209
- class Subscripts(_expression.Expression):
210
- def __init__(
211
- self,
212
- variable: Variable,
213
- subscripts: tp.List[_type_annotations.SubscriptElementType],
214
- uuid: tp.Optional[str] = None,
215
- ):
216
- super().__init__(uuid=uuid)
217
-
218
- self._variable = variable
219
- self._subscripts = subscripts
220
-
221
- from jijmodeling.expression.type_annotations import SubscriptElementType
222
- from jijmodeling.expression.utils import check_non_decision_variable
223
-
224
- check_type("subscripts", subscripts, tp.List[SubscriptElementType])
225
- check_non_decision_variable(
226
- subscripts,
227
- "The subscripts cannot contain any decision variables. Check the shape of `{}`.".format(
228
- variable.label
229
- ),
230
- )
231
- for index in subscripts:
232
- if not index.is_operatable():
233
- raise _exceptions.ModelingError(
234
- f"subscripts is operatable. `{index}` is not operatable (scalar) in which {self}. check the dimension of `{index}`."
235
- )
236
-
237
- @property
238
- def variable(self) -> Variable:
239
- return self._variable
240
-
241
- @property
242
- def subscripts(self) -> tp.List[_type_annotations.SubscriptElementType]:
243
- return self._subscripts
244
-
245
- @property
246
- def label(self):
247
- return self._variable.label
248
-
249
- def children(self) -> tp.List[_expression.Expression]:
250
- var_list: tp.List[_expression.Expression] = [self.variable]
251
- # type: ignore
252
- subscripts: tp.List[_expression.Expression] = self.subscripts
253
- return var_list + subscripts
254
-
255
- def is_operatable(self) -> bool:
256
- """
257
- Check scalar or not.
258
-
259
- If the subscripts are specified as many times as the dimension of the variable,
260
- the Subscripts object is 'operatable' because it is a scalar.
261
-
262
- Returns:
263
- bool: is operatable or not.
264
- """
265
- return self.variable.dim == len(self.subscripts)
266
-
267
- @property
268
- def shape(self):
269
-
270
- import jijmodeling.expression.variables.jagged_array as _jagged_array
271
-
272
- if isinstance(self.variable, _jagged_array.JaggedArray):
273
- import jijmodeling.expression.variables.placeholders as _placeholders
274
-
275
- return (_placeholders.ArrayShape(self, dimension=0),)
276
- else:
277
- return self.variable.shape[len(self.subscripts) :]
278
-
279
- @property
280
- def dim(self) -> int:
281
- return self.variable.dim - len(self.subscripts)
282
-
283
- def __repr__(self) -> str:
284
- subs = ",".join([str(s) for s in self.subscripts])
285
- repr_str: str = self.label + "[" + subs + "]"
286
- return repr_str
287
-
288
- def __getitem__(
289
- self,
290
- key: tp.Union[
291
- _type_annotations.SubscriptElemInputType,
292
- tp.List[tp.Union[slice, _type_annotations.SubscriptElemInputType]],
293
- tp.Tuple[tp.Union[slice, _type_annotations.SubscriptElemInputType], ...],
294
- ],
295
- ) -> tp.Union["Subscripts", _sum.SumOperator]:
296
- """
297
- Overload `[]` operator for adding subscripts if the user specifies str.
298
-
299
- for the argument which is available for previous versions of
300
- JijModeling (<=0.8.14), This function throws an error.
301
-
302
- Args:
303
- key : subscripts
304
-
305
- Raises:
306
- TypeError: key type check.
307
-
308
- Returns:
309
- Subscripted variable.
310
- """
311
-
312
- # convert to list
313
- key_list: tp.List[_type_annotations.SubscriptElemInputType]
314
- if isinstance(key, list):
315
- key_list = key
316
- elif isinstance(key, (_expression.Expression, slice)):
317
- key_list = [key]
318
- elif isinstance(key, int):
319
- key_list = [_expression.Number(key)]
320
- elif isinstance(key, tuple):
321
- key_list = list(key)
322
- else:
323
- raise TypeError(
324
- "key is tp.List[Expression] or tp.Tuple[Expression] or Expression. not {}.".format(
325
- key.__class__.__name__
326
- )
327
- )
328
-
329
- # concat subscripts
330
- concat_subs: tp.List[tp.Union[slice, _expression.Expression, int]] = (
331
- self.subscripts + key_list
332
- ) # type: ignore
333
- return self.variable[concat_subs]
334
-
335
-
336
- class Element(Variable):
337
- def __init__(self, label: str, parent, uuid: tp.Optional[str] = None):
338
- """
339
- Element object.
340
-
341
- Args:
342
- label (str): variable label
343
- parent (tp.Union[tp.Tuple[tp.Union[int, Expression], tp.Union[int, Expression]], Expression, int, Range]): parent of element
344
-
345
- Examples:
346
- ```python
347
- >>> import jijmodeling as jm
348
- >>> n = jm.Placeholder("n")
349
- >>> i = jm.Element("i", n)
350
- >>> i.parent
351
- (0, n)
352
- >>> jm.Element("i", (1, n)).parent
353
- (1, n)
354
- >>> V = jm.Placeholder("V")
355
- >>> i = jm.Element("i", V) # represents i in V
356
- >>> i.parent
357
- V
358
- ````
359
- """
360
- if isinstance(parent, tuple):
361
- self._parent: tp.Union[Range, Variable] = Range(parent[0], parent[1])
362
- elif isinstance(parent, _expression.Expression):
363
- if parent.is_operatable():
364
- # operatable means parent is scalar.
365
- self._parent = Range(start=0, last=parent)
366
- else:
367
- # parent is not scalar. ex. i in V
368
- self._parent = parent # type: ignore
369
- elif isinstance(parent, (int, float)):
370
- # parent is range. ex. i in V
371
- self._parent = Range(start=0, last=int(parent))
372
- elif isinstance(parent, Range):
373
- self._parent = parent
374
- else:
375
- raise TypeError(
376
- "'parent' is 'int', 'Expression' or 'tuple' not {}.".format(
377
- type(parent)
378
- )
379
- )
380
-
381
- super().__init__(label=label, uuid=uuid)
382
-
383
- @property
384
- def parent(self) -> _type_annotations.ElementParentType:
385
- return self._parent
386
-
387
- def children(self) -> tp.List[_expression.Expression]:
388
- if isinstance(self.parent, Range):
389
- return [self.parent.start, self.parent.last]
390
- else:
391
- return [self.parent]
392
-
393
- @property
394
- def dim(self) -> int:
395
- if isinstance(self.parent, Range):
396
- return 0
397
- else:
398
- parant_dim = self.parent.dim
399
- return parant_dim - 1
400
-
401
- def is_operatable(self) -> bool:
402
- return self.dim == 0
403
-
404
- @property
405
- def shape(self) -> tp.Tuple[_type_annotations.ShapeElementType, ...]:
406
- from jijmodeling.expression.variables.placeholders import Placeholder
407
-
408
- if isinstance(self.parent, Range):
409
- return (self.parent.length(),)
410
- elif isinstance(self.parent, Placeholder):
411
- return self.parent.shape[1:]
412
- elif not self.is_operatable():
413
- from jijmodeling.expression.variables.placeholders import ArrayShape
414
-
415
- return (ArrayShape(self, dimension=0),)
416
- else:
417
- return ()
418
-
419
-
420
- class Range(metaclass=_serializable.Serializable):
421
- def __init__(
422
- self,
423
- start: tp.Union[_expression.Expression, int],
424
- last: tp.Union[_expression.Expression, int],
425
- uuid: tp.Optional[str] = None,
426
- ) -> None:
427
- """
428
- Range object.
429
-
430
- Args:
431
- start (tp.Union[Expression, int]): range start
432
- last (tp.Union[Expression, int]): range last
433
-
434
- Examples:
435
- ```python
436
- >>> import jijmodeling as jm
437
- >>> n = jm.Placeholder('n')
438
- >>> r = jm.expression.variables.variable.Range(0,n)
439
- >>> r.start
440
- 0
441
- >>> r.last
442
- n
443
- ```
444
- """
445
- if isinstance(start, _expression.Expression) and not start.is_operatable():
446
- raise _exceptions.ModelingError(
447
- "Range's start should be operatable. {} is not operatable.".format(
448
- start
449
- )
450
- )
451
- if isinstance(last, _expression.Expression) and not last.is_operatable():
452
- raise _exceptions.ModelingError(
453
- "Range's last should be operatable. {} is not operatable.".format(last)
454
- )
455
-
456
- if not isinstance(start, _expression.Expression):
457
- self._start: _expression.Expression = _expression.Number(start, dtype="int")
458
- else:
459
- self._start = start
460
-
461
- if not isinstance(last, _expression.Expression):
462
- self._last: _expression.Expression = _expression.Number(last, dtype="int")
463
- else:
464
- self._last = last
465
-
466
- if uuid is None:
467
- self._uuid = uuid4().hex
468
- else:
469
- self._uuid = uuid
470
-
471
- @property
472
- def start(self) -> _expression.Expression:
473
- return self._start
474
-
475
- @property
476
- def last(self) -> _expression.Expression:
477
- return self._last
478
-
479
- @property
480
- def uuid(self) -> str:
481
- return self._uuid
482
-
483
- def length(self) -> _expression.Expression:
484
- length: _expression.Expression = self.last - self.start
485
- return length
@@ -1,11 +0,0 @@
1
- from pkgutil import extend_path
2
-
3
- __path__ = extend_path(__path__, __name__)
4
-
5
- import jijmodeling.latex_repr.latex_repr as latex_repr
6
- import jijmodeling.latex_repr.problem_latex_repr as problem_latex_repr
7
-
8
- __all__ = [
9
- "latex_repr",
10
- "problem_latex_repr",
11
- ]