jijmodeling 2.0.0a10__cp38-abi3-win_amd64.whl → 2.0.0a11__cp38-abi3-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.

jijmodeling/__init__.pyi CHANGED
@@ -858,6 +858,33 @@ class Problem:
858
858
  - `name` (`str`): A name of the optimization problem.
859
859
  - `sense` (optional): Sense of the optimization problem. Defaults to `ProblemSense.MINIMIZE`.
860
860
  """
861
+ @property
862
+ def objective(self) -> Expression: ...
863
+ @property
864
+ def constraints(self) -> builtins.dict[builtins.str, builtins.list[Constraint]]: ...
865
+ @property
866
+ def used_placeholders(self) -> builtins.list[Placeholder]: ...
867
+ @property
868
+ def decision_vars(self) -> builtins.dict[builtins.str, DecisionVar]:
869
+ r"""
870
+ Returns a dictionary of decision variables in the problem.
871
+ The dictionary may contain decision variables that are not used in the problem.
872
+
873
+ Returns
874
+ --------
875
+ `dict[str, DecisionVar]`: Dictionary mapping variable names to DecisionVar objects.
876
+ """
877
+ @property
878
+ def placeholders(self) -> builtins.dict[builtins.str, Placeholder]:
879
+ r"""
880
+ Returns a dictionary of placeholders in the problem.
881
+ The dictionary may contain placeholders that are not used in the problem;
882
+ to get only used placeholders, use `used_placeholders` method.
883
+
884
+ Returns
885
+ --------
886
+ `dict[str, Placeholder]`: Dictionary mapping placeholder names to Placeholder objects.
887
+ """
861
888
  def __iadd__(self, other:typing.Any) -> Problem: ...
862
889
  def __repr__(self) -> builtins.str: ...
863
890
  def _repr_latex_(self) -> builtins.str: ...
@@ -1108,7 +1135,6 @@ class Problem:
1108
1135
  >>> instance = problem.eval(instance_data)
1109
1136
  ```
1110
1137
  """
1111
- def used_placeholders(self) -> builtins.list[Placeholder]: ...
1112
1138
  def get_problem_schema(self) -> dict:
1113
1139
  r"""
1114
1140
  Returns the schema of the problem.
@@ -1248,25 +1274,6 @@ class Problem:
1248
1274
  """
1249
1275
  def type_of(self, name:builtins.str) -> Type: ...
1250
1276
  def infer(self, expr:Expression | builtins.int | builtins.float | DecisionVar | Placeholder | list | tuple | typing.Callable[[Expression], typing.Any] | typing.Callable[[Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression, Expression], typing.Any]) -> Type: ...
1251
- def decision_vars(self) -> builtins.dict[builtins.str, DecisionVar]:
1252
- r"""
1253
- Returns a dictionary of decision variables in the problem.
1254
- The dictionary may contain decision variables that are not used in the problem.
1255
-
1256
- Returns
1257
- --------
1258
- `dict[str, DecisionVar]`: Dictionary mapping variable names to DecisionVar objects.
1259
- """
1260
- def placeholders(self) -> builtins.dict[builtins.str, Placeholder]:
1261
- r"""
1262
- Returns a dictionary of placeholders in the problem.
1263
- The dictionary may contain placeholders that are not used in the problem;
1264
- to get only used placeholders, use `used_placeholders` method.
1265
-
1266
- Returns
1267
- --------
1268
- `dict[str, Placeholder]`: Dictionary mapping placeholder names to Placeholder objects.
1269
- """
1270
1277
  @typing.overload
1271
1278
  def Constraint(self, name:builtins.str, expression:Expression | builtins.int | builtins.float | DecisionVar | Placeholder | list | tuple | typing.Callable[[Expression], typing.Any] | typing.Callable[[Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression, Expression], typing.Any], domain:typing.Callable[[Expression], typing.Any] | typing.Callable[[Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression, Expression], typing.Any], description:typing.Optional[builtins.str]=None) -> Constraint:
1272
1279
  r"""
@@ -1345,6 +1352,59 @@ def flat_map(func:typing.Callable[[Expression], typing.Any] | typing.Callable[[E
1345
1352
 
1346
1353
  def floor(expr:Expression | builtins.int | builtins.float | DecisionVar | Placeholder | list | tuple | typing.Callable[[Expression], typing.Any] | typing.Callable[[Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression, Expression], typing.Any]) -> Expression: ...
1347
1354
 
1355
+ def is_same(src:typing.Any, dst:typing.Any) -> builtins.bool:
1356
+ r"""
1357
+ Return `true` if `src` and `dst` are the same object defined by Jijmodeling.
1358
+
1359
+
1360
+ Args
1361
+ -----
1362
+ - `src`: An object defined by Jijmodeling module, or an iterable of Jijmodeling objects.
1363
+ - `dst`: An object defined by Jijmodeling module, or an iterable of Jijmodeling objects.
1364
+
1365
+ Returns
1366
+ --------
1367
+ `bool`: `true` if `src` and `dst` is the same object. Otherwise `false`.
1368
+
1369
+ Examples
1370
+ ---------
1371
+ Check if the two placeholders are the same.
1372
+
1373
+ ```python
1374
+ >>> import jijmodeling as jm
1375
+ >>> problem = jm.Problem("problem")
1376
+ >>> a = problem.Placeholder("name")
1377
+ >>> b = problem.Placeholder("name")
1378
+ >>> assert jm.is_same(a, b)
1379
+ >>> c = problem.Placeholder("name", ndim=2)
1380
+ >>> assert not jm.is_same(a, c) # the value of `ndim` is different
1381
+ ```
1382
+
1383
+ Raises
1384
+ -------
1385
+ `TypeError`: Raises if
1386
+ - `src` and `dst` are of different types which are not iterable
1387
+ - called on a type not defined by Jijmodeling (e.g. `str`)
1388
+
1389
+ Note
1390
+ -----
1391
+ This function does not check the following attributes:
1392
+ - `description`
1393
+ - `latex`
1394
+
1395
+ For example,
1396
+
1397
+ ```python
1398
+ >>> import jijmodeling as jm
1399
+ >>> problem = jm.Problem("problem")
1400
+ >>> src = problem.Placeholder("placeholder", latex="src")
1401
+ >>> dst = problem.Placeholder("placeholder", latex="dst")
1402
+ >>> assert jm.is_same(src, dst)
1403
+ ```
1404
+
1405
+ this code works without any exception.
1406
+ """
1407
+
1348
1408
  def ln(expr:Expression | builtins.int | builtins.float | DecisionVar | Placeholder | list | tuple | typing.Callable[[Expression], typing.Any] | typing.Callable[[Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression, Expression], typing.Any]) -> Expression: ...
1349
1409
 
1350
1410
  def log10(expr:Expression | builtins.int | builtins.float | DecisionVar | Placeholder | list | tuple | typing.Callable[[Expression], typing.Any] | typing.Callable[[Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression], typing.Any] | typing.Callable[[Expression, Expression, Expression, Expression, Expression], typing.Any]) -> Expression: ...
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jijmodeling
3
- Version: 2.0.0a10
3
+ Version: 2.0.0a11
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Operating System :: POSIX :: Linux
6
6
  Classifier: Operating System :: MacOS
@@ -21,6 +21,7 @@ Requires-Dist: numpy
21
21
  Requires-Dist: pandas
22
22
  Requires-Dist: orjson>=3.8.0,<4.0.0
23
23
  Requires-Dist: ommx>=2.0.0,<3.0.0
24
+ Requires-Dist: typing-extensions
24
25
  License-File: LICENSE.txt
25
26
  Summary: Mathematical modeling tool for optimization problem
26
27
  Author: Jij Inc.
@@ -0,0 +1,9 @@
1
+ jijmodeling-2.0.0a11.dist-info/METADATA,sha256=uuJyImUudg3CLo4qm4SNlUo3PPk5hLXSQ17PA7QhzUo,2529
2
+ jijmodeling-2.0.0a11.dist-info/WHEEL,sha256=lvaVdaNOIbpDjZxhxQcXMmDSpIrmQUI6MiaH-nloUu8,94
3
+ jijmodeling-2.0.0a11.dist-info/licenses/LICENSE.txt,sha256=yFkplSxnOyfXDNYhBo2F7XC3xIQdANn-tk9LZsDekW8,3495
4
+ jijmodeling/__init__.py,sha256=jJ6o5wp3MPAP1uR3dqSvjaXG57t1IwcS8ojqPpZL-gU,45
5
+ jijmodeling/__init__.pyi,sha256=8ioYgzObMHM_ArgNif8FmNmECr4R72MN1z7o9itm_iE,151703
6
+ jijmodeling/_jijmodeling.pyd,sha256=di2OMlm4rrAR2qA24jsCi8GdmUWyfpL6Vb_5y7BNxNU,14270464
7
+ jijmodeling/_jijmodeling.pyi,sha256=DNNHcMrqQWMefF5936RoeVtH9OEnw2kYlX_c6pZ7idU,175
8
+ jijmodeling/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ jijmodeling-2.0.0a11.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- jijmodeling-2.0.0a10.dist-info/METADATA,sha256=H7K1eWAPnsY1uxGaTSCIJrEAXMLMBqUBcAega1yG46w,2496
2
- jijmodeling-2.0.0a10.dist-info/WHEEL,sha256=lvaVdaNOIbpDjZxhxQcXMmDSpIrmQUI6MiaH-nloUu8,94
3
- jijmodeling-2.0.0a10.dist-info/licenses/LICENSE.txt,sha256=yFkplSxnOyfXDNYhBo2F7XC3xIQdANn-tk9LZsDekW8,3495
4
- jijmodeling/__init__.py,sha256=jJ6o5wp3MPAP1uR3dqSvjaXG57t1IwcS8ojqPpZL-gU,45
5
- jijmodeling/__init__.pyi,sha256=r4NcN9vXa4ZW70nFmf4TZ0nZDu1g1VY_sBGN1aUbxc0,149914
6
- jijmodeling/_jijmodeling.pyd,sha256=HsZVDVz9umhCfcjym_pybA6UQtlnHXYgv6S7XAFG9Fk,14277120
7
- jijmodeling/_jijmodeling.pyi,sha256=DNNHcMrqQWMefF5936RoeVtH9OEnw2kYlX_c6pZ7idU,175
8
- jijmodeling/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- jijmodeling-2.0.0a10.dist-info/RECORD,,