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