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,381 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import datetime as dt
4
- import json
5
-
6
- from copy import deepcopy
7
- from dataclasses import asdict, dataclass
8
- from typing import Dict, List, Optional, Tuple, Union
9
-
10
- import numpy as np
11
- import pandas as pd
12
-
13
- from jijmodeling.exceptions import SampleSetNotEvaluatedError, SerializeSampleSetError
14
- from jijmodeling.sampleset.evaluation import Evaluation
15
- from jijmodeling.sampleset.measuring_time import MeasuringTime
16
- from jijmodeling.sampleset.record import Record
17
-
18
-
19
- @dataclass
20
- class SampleSet:
21
- """Schema for sampleset.
22
-
23
- Attributes:
24
- record (Record): Record object. This means basic infomation of solutions.
25
- evaluation (Evaluation): Evaluation object. This means evaluation results of solutions.
26
- measuring_time (MeasuringTime): MeasuringTime object. This means measuring time of various processing until solutions is obtained.
27
- """
28
-
29
- record: Record
30
- evaluation: Evaluation
31
- measuring_time: MeasuringTime
32
-
33
- def __post_init__(self):
34
- self._is_dense = False
35
- self._current_index = 0
36
- self._metadata = {}
37
-
38
- def __len__(self) -> int:
39
- """
40
- Perform the operation __len__.
41
- """
42
- return self.record.__len__()
43
-
44
- def __iter__(self):
45
- """
46
- Perform the operation __iter__.
47
- """
48
- return self
49
-
50
- def __next__(self):
51
- """
52
- Perform the operation __next__.
53
- """
54
- if self._current_index == len(self):
55
- self._current_index = 0
56
- raise StopIteration()
57
- ret = self[self._current_index]
58
- self._current_index += 1
59
- return ret
60
-
61
- def __getitem__(
62
- self, item: Union[int, slice, List[int], Tuple[int], np.ndarray]
63
- ) -> SampleSet:
64
- """Perform the operation __getitem__.
65
-
66
- Args:
67
- item (Union[int, slice, List[int], Tuple[int], np.ndarray]): Index of sampleset.
68
-
69
- Returns:
70
- Record: SampleSet object.
71
- """
72
- record = self.record[item]
73
- evaluation = self.evaluation[item]
74
- return SampleSet(
75
- record=record, evaluation=evaluation, measuring_time=self.measuring_time
76
- )
77
-
78
- @property
79
- def is_dense(self) -> bool:
80
- """SparseSolution or DenseSolution:
81
- - If True, DenseSolution,
82
- - Else, SparseSolution.
83
-
84
- Returns:
85
- bool: True or False.
86
- """
87
- return self._is_dense
88
-
89
- @property
90
- def metadata(self) -> Dict:
91
- """Store information which is not in SampleSet schema.
92
-
93
- Returns:
94
- dict: Metadata.
95
- """
96
- return self._metadata
97
-
98
- @is_dense.setter
99
- def is_dense(self, b: bool):
100
- self._is_dense = b
101
-
102
- def to_pandas_dataframe(self) -> pd.DataFrame:
103
- """Convert SampleSet object to pandas.DataFrame object.
104
-
105
- Returns:
106
- pandas.DataFrame: pandas.DataFrame object.
107
- """
108
- record = self.record.to_pandas_dataframe()
109
- evaluation = self.evaluation.to_pandas_dataframe()
110
-
111
- return pd.concat([record, evaluation], axis=1)
112
-
113
- def to_dense(self, inplace: bool = False):
114
- """Convert SparseSolution to DenseSolution.
115
-
116
- Args:
117
- inplace (bool, optional): Modify the SampleSet object in place (do not create a new object). Defaults to False.
118
-
119
- Returns:
120
- SampleSet or None: SampleSet with dense solution or None if inplace=True.
121
- """
122
- if self.is_dense:
123
- if inplace:
124
- return None
125
- else:
126
- return self
127
- elif inplace:
128
- self.record.to_dense(inplace=inplace)
129
- self._is_dense = True
130
- return None
131
- else:
132
- record = self.record.to_dense(inplace=inplace)
133
- sampleset = SampleSet(
134
- record=record,
135
- evaluation=self.evaluation,
136
- measuring_time=self.measuring_time,
137
- )
138
- sampleset.is_dense = True
139
- return sampleset
140
-
141
- @classmethod
142
- def from_serializable(cls, obj: Dict):
143
- """To SampleSet object from Dict of SampleSet.
144
-
145
- Args:
146
- obj (Dict): Dict of SampleSet.
147
-
148
- Returns:
149
- SampleSet: SampleSet obj.
150
- """
151
- for key in ["record", "evaluation", "measuring_time"]:
152
- if key not in obj.keys():
153
- raise SerializeSampleSetError(f'"obj" does not contain "{key}" key')
154
-
155
- if "metadata" in obj:
156
- if isinstance(obj["metadata"], dict):
157
- metadata = obj["metadata"]
158
- else:
159
- raise TypeError('Type of "metadata" must be dict')
160
- else:
161
- metadata = {}
162
-
163
- solution = {}
164
- for k, v in obj["record"]["solution"].items():
165
- solution[k] = [(tuple(vi[0]), vi[1], tuple(vi[2])) for vi in v]
166
- obj["record"]["solution"] = solution
167
-
168
- record = Record.from_serializable(obj["record"])
169
- evaluation = Evaluation.from_serializable(obj["evaluation"])
170
- measuring_time = MeasuringTime.from_serializable(obj["measuring_time"])
171
-
172
- sampleset = cls(
173
- record=record,
174
- evaluation=evaluation,
175
- measuring_time=measuring_time,
176
- )
177
- sampleset.metadata.update(metadata)
178
-
179
- return sampleset
180
-
181
- def to_serializable(self) -> Dict:
182
- """To Dict of SampleSet from SampleSet object.
183
-
184
- Returns:
185
- SampleSet: Dict of SampleSet.
186
- """
187
-
188
- class _NumpyEncoder(json.JSONEncoder):
189
- def default(self, o):
190
- if isinstance(o, np.integer):
191
- return int(o)
192
- elif isinstance(o, np.floating):
193
- return float(o)
194
- elif isinstance(o, np.ndarray):
195
- return o.tolist()
196
- else:
197
- return super().default(o)
198
-
199
- evaluation_to_serializable_obj = self.evaluation.to_serializable()
200
- to_serializable_obj = asdict(self)
201
- to_serializable_obj["evaluation"] = evaluation_to_serializable_obj
202
- to_serializable_obj["metadata"] = json.loads(
203
- json.dumps(self.metadata, cls=_NumpyEncoder)
204
- )
205
- return to_serializable_obj
206
-
207
- def feasible(self):
208
- """Return feasible solutions.
209
-
210
- Returns:
211
- SampleSet: Output only feasible solutions from self.record.solution.
212
- """
213
-
214
- if self.evaluation.constraint_violations is None:
215
- raise SampleSetNotEvaluatedError("Your SampleSet object is not evaluated.")
216
- else:
217
- constraint_violations = np.array(
218
- list(self.evaluation.constraint_violations.values())
219
- )
220
- if len(constraint_violations):
221
- is_feas = constraint_violations.sum(axis=0) == 0
222
- return SampleSet(
223
- record=self.record[is_feas],
224
- evaluation=self.evaluation[is_feas],
225
- measuring_time=self.measuring_time,
226
- )
227
- else:
228
- return self
229
-
230
- def infeasible(self):
231
- """Return infeasible solutions.
232
-
233
- Returns:
234
- SampleSet: Output only feasible solutions from self.record.solution.
235
- """
236
- if self.evaluation.constraint_violations is None:
237
- raise SampleSetNotEvaluatedError("Your SampleSet object is not evaluated.")
238
- else:
239
- constraint_violations = np.array(
240
- list(self.evaluation.constraint_violations.values())
241
- )
242
- if len(constraint_violations):
243
- is_infeas = constraint_violations.sum(axis=0) != 0
244
- return SampleSet(
245
- record=self.record[is_infeas],
246
- evaluation=self.evaluation[is_infeas],
247
- measuring_time=self.measuring_time,
248
- )
249
- else:
250
- return self[[]]
251
-
252
- def lowest(self):
253
- """Return solutions with lowest objective in feasible solutions.
254
-
255
- Returns:
256
- SampleSet: Output only lowest objecive solutions in feasibles from self.record.solution.
257
- """
258
-
259
- if self.evaluation.objective is None:
260
- raise SampleSetNotEvaluatedError("Your SampleSet object is not evaluated.")
261
- else:
262
- feas = self.feasible()
263
- objective = np.array(feas.evaluation.objective)
264
- is_lowest = objective == objective.min() if len(objective) else []
265
- return SampleSet(
266
- record=feas.record[is_lowest],
267
- evaluation=feas.evaluation[is_lowest],
268
- measuring_time=feas.measuring_time,
269
- )
270
-
271
- def get_backend_calculation_time(self):
272
- """You can check calculation time for each process in detail.
273
-
274
- Returns:
275
- Dict: Processed metadata for describing JijZept backends.
276
- """
277
-
278
- def _get_root_keys(obj: Dict):
279
- if not isinstance(obj, dict):
280
- raise TypeError(f"Type of 'obj' must be Dict, not {obj.__class__}.")
281
-
282
- root_keys = []
283
- for k, v in obj.items():
284
- if isinstance(v, dict):
285
- parent_id = v.get("parent_id", "")
286
- if parent_id is None:
287
- root_keys.append(k)
288
- return root_keys
289
-
290
- def _timedelta(start: str, end: str):
291
- s = dt.datetime.strptime(start, "%Y-%m-%dT%H:%M:%S.%fZ")
292
- e = dt.datetime.strptime(end, "%Y-%m-%dT%H:%M:%S.%fZ")
293
- return (e - s).total_seconds()
294
-
295
- def _get_timedelata_by_span(obj: Dict, res: Optional[Dict] = None):
296
- if res is None:
297
- res = {}
298
-
299
- for k, v in obj.items():
300
- if isinstance(v, dict):
301
- if "start_time" in v:
302
- res[k] = {
303
- "time": _timedelta(v["start_time"], v["end_time"]),
304
- "span_id": v["context"]["span_id"],
305
- "parent_id": v["parent_id"],
306
- }
307
- else:
308
- res[k] = _get_timedelata_by_span(v, {})
309
- return res
310
-
311
- def _aggregate(obj: Dict, root_key: str, res: Optional[Dict] = None):
312
- if res is None:
313
- v = obj.pop(root_key, None)
314
- if v is None:
315
- return {}
316
- else:
317
- res = {
318
- root_key: {
319
- "id": v["span_id"],
320
- "time": v["time"],
321
- }
322
- }
323
- for v_res in res.values():
324
- time_map = {
325
- k: {"id": v["span_id"], "time": v["time"]}
326
- for k, v in obj.items()
327
- if v.get("parent_id", "") == v_res["id"]
328
- }
329
-
330
- if time_map:
331
- del v_res["id"], v_res["time"]
332
- v_res.update(_aggregate(obj, root_key, time_map))
333
- else:
334
- del v_res["id"]
335
- return res
336
-
337
- def _reformat(obj: Dict):
338
- for k, v in obj.items():
339
- if isinstance(v, dict):
340
- if "time" in v:
341
- obj[k] = v["time"]
342
- else:
343
- obj[k] = _reformat(v)
344
- return obj
345
-
346
- root_keys = _get_root_keys(self.metadata)
347
- time = {}
348
- for root_key in root_keys:
349
- metadata = _get_timedelata_by_span(self.metadata)
350
- metadata = _aggregate(metadata, root_key)
351
- metadata = _reformat(metadata)
352
- time.update(metadata)
353
- return time
354
-
355
- def _extend(self, other):
356
- self.record._extend(other.record)
357
- self.evaluation._extend(other.evaluation)
358
- # TODO: concatenates MeasuringTime objects
359
-
360
-
361
- def concatenate(
362
- jm_sampleset_list: List[SampleSet],
363
- ) -> SampleSet:
364
- """
365
- Concatenates SampleSet objects into a single SampleSet object.
366
-
367
- Args:
368
- jm_sampleset_list (List[SampleSet]): a list of SampleSet objects
369
-
370
- Returns:
371
- SampleSet: a SampleSet object that be concatenated
372
- """
373
- if len(jm_sampleset_list) == 0:
374
- raise ValueError("empty list is invalid")
375
- elif len(jm_sampleset_list) == 1:
376
- return jm_sampleset_list[0]
377
- else:
378
- concat_sampleset = deepcopy(jm_sampleset_list[0])
379
- for jm_sampleset in jm_sampleset_list[1:]:
380
- concat_sampleset._extend(jm_sampleset)
381
- return concat_sampleset
@@ -1,38 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from dataclasses import dataclass
4
- from typing import Dict, Optional
5
-
6
- from jijmodeling.exceptions import SerializeSampleSetError
7
-
8
-
9
- @dataclass
10
- class SolvingTime:
11
- """Schema for solver running time.
12
-
13
- Attributes:
14
- preprocess (Optional[float], optional): Time to preprocess. Defaults to None.
15
- solve (Optional[float], optional): Time to solve. Defaults to None.
16
- postprocess (Optional[float], optional): Time to postprocess. Defaults to None.
17
- """
18
-
19
- preprocess: Optional[float] = None
20
- solve: Optional[float] = None
21
- postprocess: Optional[float] = None
22
-
23
- @classmethod
24
- def from_serializable(cls, obj: Dict):
25
- """To SolvingTime object from Dict of SampleSet.
26
-
27
- Args:
28
- obj (Dict): Dict of SolvingTime.
29
-
30
- Returns:
31
- SolvingTime: SolvingTime obj.
32
- """
33
-
34
- for key in ["preprocess", "solve", "postprocess"]:
35
- if key not in obj.keys():
36
- raise SerializeSampleSetError(f'"obj" does not contain "{key}" key')
37
-
38
- return cls(**obj)
@@ -1,48 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from dataclasses import dataclass
4
- from typing import Dict, Optional
5
-
6
- from jijmodeling.exceptions import SerializeSampleSetError
7
-
8
-
9
- @dataclass
10
- class SystemTime:
11
- """Schema for system of jijzept running time.
12
-
13
- Args:
14
- post_problem_and_instance_data (Optional[float], optional): Time to upload problem and instance_data to blob. Defaults to None.
15
- request_queue (Optional[float], optional): Time to send request to queue. Defaults to None.
16
- fetch_problem_and_instance_data (Optional[float], optional): Time to fetch problme and instance_data from blob. Defaults to None.
17
- fetch_result (Optional[float], optional): Time to fetch result. Defaults to None.
18
- deserialize_solution (Optional[float], optional): Time to deserialize json object. Defaults to None.
19
- """
20
-
21
- post_problem_and_instance_data: Optional[float] = None
22
- request_queue: Optional[float] = None
23
- fetch_problem_and_instance_data: Optional[float] = None
24
- fetch_result: Optional[float] = None
25
- deserialize_solution: Optional[float] = None
26
-
27
- @classmethod
28
- def from_serializable(cls, obj: Dict):
29
- """To SystemTime object from Dict of SampleSet.
30
-
31
- Args:
32
- obj (Dict): Dict of SystemTime.
33
-
34
- Returns:
35
- SystemTime: SystemTime obj.
36
- """
37
-
38
- for key in [
39
- "post_problem_and_instance_data",
40
- "request_queue",
41
- "fetch_problem_and_instance_data",
42
- "fetch_result",
43
- "deserialize_solution",
44
- ]:
45
- if key not in obj.keys():
46
- raise SerializeSampleSetError(f'"obj" does not contain "{key}" key')
47
-
48
- return cls(**obj)
@@ -1,38 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from pkgutil import extend_path
4
-
5
- __path__ = extend_path(__path__, __name__)
6
-
7
- import jijmodeling.type_annotations.type_annotations as type_annotations
8
-
9
- from jijmodeling.type_annotations.type_annotations import (
10
- DECI_VALUES_INTEREFACE,
11
- DECISION_VALUES,
12
- FIXED_VARIABLES,
13
- FIXED_VARS_INTERFACE,
14
- PH_VALUES_INTERFACE,
15
- PLACEHOLDER_VALUES,
16
- VARIABLE_KEY,
17
- DenseSolution,
18
- ListValue,
19
- NumberValue,
20
- SparseSolution,
21
- TensorValue,
22
- )
23
-
24
- __all__ = [
25
- "type_annotations",
26
- "NumberValue",
27
- "TensorValue",
28
- "ListValue",
29
- "VARIABLE_KEY",
30
- "PH_VALUES_INTERFACE",
31
- "PLACEHOLDER_VALUES",
32
- "DECI_VALUES_INTEREFACE",
33
- "DECISION_VALUES",
34
- "FIXED_VARS_INTERFACE",
35
- "FIXED_VARIABLES",
36
- "SparseSolution",
37
- "DenseSolution",
38
- ]
@@ -1,44 +0,0 @@
1
- from __future__ import annotations
2
-
3
- """TYPE ANNOTATIONS.
4
-
5
- Describe the types related to the data needed to change from JijModeling to another type, such as to_pyqubo or calc_value.
6
- """
7
-
8
- import typing as tp
9
-
10
- import numpy as np
11
-
12
- from jijmodeling.expression.variables.deci_vars import DecisionVariable
13
- from jijmodeling.expression.variables.placeholders import Placeholder
14
-
15
- NumberValue = tp.Union[int, float]
16
- TensorValue = tp.Union[NumberValue, np.ndarray]
17
- ListValue = tp.List[NumberValue]
18
- NonZeroIndices = tp.Tuple[tp.List[int], ...]
19
- NonZeroValues = tp.Union[tp.List[tp.Union[int, float]], tp.Union[int, float]]
20
- Shape = tp.Tuple[int, ...]
21
- SparseSolution = tp.Tuple[
22
- NonZeroIndices,
23
- NonZeroValues,
24
- Shape,
25
- ]
26
- DenseSolution = np.ndarray
27
-
28
- VARIABLE_KEY = tp.Union[str, Placeholder]
29
- # User interface for values of placeholder.
30
- PH_VALUES_INTERFACE = tp.Dict[VARIABLE_KEY, tp.Union[TensorValue, ListValue]]
31
- # type of value of placholders for inner handling.
32
- PLACEHOLDER_VALUES = tp.Dict[Placeholder, tp.Union[TensorValue, ListValue]]
33
-
34
- DECI_VALUES_INTEREFACE = tp.Dict[tp.Union[str, DecisionVariable], TensorValue]
35
- DECISION_VALUES = tp.Dict[DecisionVariable, TensorValue]
36
-
37
- # fixed variable
38
- # ex. fix array element : {"x": {(0, 1, 2): 1}} means x[0, 1, 2] = 1
39
- # fix scalar variable: {"y": {(): 0}} means y = 0
40
- FIXED_VARS_INTERFACE = tp.Dict[
41
- tp.Union[str, DecisionVariable],
42
- tp.Dict[tp.Tuple[int, ...], NumberValue],
43
- ]
44
- FIXED_VARIABLES = tp.Dict[DecisionVariable, tp.Dict[tp.Tuple[int, ...], NumberValue]]
@@ -1,28 +0,0 @@
1
- from pkgutil import extend_path
2
-
3
- __path__ = extend_path(__path__, __name__)
4
-
5
- import jijmodeling.utils.utils as utils
6
-
7
- from jijmodeling.utils.utils import (
8
- FixedVariables,
9
- SerializedFixedVariables,
10
- deserialize_fixed_var,
11
- serialize_fixed_var,
12
- simple_dict_validation,
13
- simple_list_validation,
14
- validate_value,
15
- with_measuring_time,
16
- )
17
-
18
- __all__ = [
19
- "utils",
20
- "validate_value",
21
- "FixedVariables",
22
- "SerializedFixedVariables",
23
- "simple_list_validation",
24
- "simple_dict_validation",
25
- "with_measuring_time",
26
- "serialize_fixed_var",
27
- "deserialize_fixed_var",
28
- ]