gurobipy 11.0.0__cp311-cp311-macosx_10_9_universal2.whl → 13.0.0__cp311-cp311-macosx_10_9_universal2.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.
@@ -7,6 +7,7 @@ from typing import (
7
7
  Dict,
8
8
  Generator,
9
9
  List,
10
+ Literal,
10
11
  Iterable,
11
12
  Mapping,
12
13
  Optional,
@@ -23,6 +24,7 @@ _T = TypeVar('_T')
23
24
  _U = TypeVar('_U')
24
25
  _LinExprLike = Union[float, Var, LinExpr]
25
26
  _QuadExprLike = Union[float, Var, LinExpr, QuadExpr]
27
+ _NLExprLike = Union[float, Var, LinExpr, QuadExpr, NLExpr]
26
28
  _Scalar = Union[int, float, str]
27
29
  _ConstComponent = Union[int, float, np.ndarray]
28
30
  _LinearComponent = Union[Var, LinExpr, MVar, MLinExpr]
@@ -32,6 +34,7 @@ _ShapeLike = Union[int, Tuple[int, ...]]
32
34
  _IndexLike = Union[int, slice, Tuple[int, ...], Sequence[int], Tuple[Union[Sequence[int], int, slice], ...]]
33
35
  _MLinExprLike = Union[np.ndarray, MVar, MLinExpr]
34
36
  _MQuadExprLike = Union[np.ndarray, MVar, MLinExpr, MQuadExpr]
37
+ _MNLExprLike = Union[np.ndarray, MVar, MLinExpr, MQuadExpr, MNLExpr]
35
38
 
36
39
  def abs_(__var: Var) -> GenExprAbs: ...
37
40
  @overload
@@ -82,7 +85,6 @@ def getParamInfo(
82
85
  __paramname: str
83
86
  ) -> Tuple[str, Type[Any], Any, Any, Any, Any]: ...
84
87
  def help(argument: Any = None) -> None: ...
85
- def models() -> None: ...
86
88
  @overload
87
89
  def multidict(
88
90
  __data: Mapping[_T, float]
@@ -102,13 +104,17 @@ def quicksum(__x: tupledict[Any, Var]) -> LinExpr: ... # type: ignore[misc]
102
104
  @overload
103
105
  def quicksum(__x: Iterable[_LinExprLike]) -> LinExpr: ... # type: ignore[misc]
104
106
  @overload
105
- def quicksum(__x: Iterable[_QuadExprLike]) -> QuadExpr: ...
107
+ def quicksum(__x: Iterable[_QuadExprLike]) -> QuadExpr: ... # type: ignore[misc]
108
+ @overload
109
+ def quicksum(__x: Iterable[_NLExprLike]) -> NLExpr: ...
106
110
  @overload
107
111
  def hstack(tup: Iterable[MVar]) -> MVar: ... # type: ignore[misc]
108
112
  @overload
109
113
  def hstack(tup: Iterable[_MLinExprLike]) -> MLinExpr: ... # type: ignore[misc]
110
114
  @overload
111
- def hstack(tup: Iterable[_MQuadExprLike]) -> MQuadExpr: ...
115
+ def hstack(tup: Iterable[_MQuadExprLike]) -> MQuadExpr: ... # type: ignore[misc]
116
+ @overload
117
+ def hstack(tup: Iterable[_MNLExprLike]) -> MNLExpr: ...
112
118
  @overload
113
119
  def hstack(tup: Iterable[MConstr]) -> MConstr: ...
114
120
  @overload
@@ -118,7 +124,9 @@ def vstack(tup: Iterable[MVar]) -> MVar: ... # type: ignore[misc]
118
124
  @overload
119
125
  def vstack(tup: Iterable[_MLinExprLike]) -> MLinExpr: ... # type: ignore[misc]
120
126
  @overload
121
- def vstack(tup: Iterable[_MQuadExprLike]) -> MQuadExpr: ...
127
+ def vstack(tup: Iterable[_MQuadExprLike]) -> MQuadExpr: ... # type: ignore[misc]
128
+ @overload
129
+ def vstack(tup: Iterable[_MNLExprLike]) -> MNLExpr: ...
122
130
  @overload
123
131
  def vstack(tup: Iterable[MConstr]) -> MConstr: ...
124
132
  @overload
@@ -128,7 +136,9 @@ def concatenate(tup: Iterable[MVar], axis: Optional[int] = None) -> MVar: ... #
128
136
  @overload
129
137
  def concatenate(tup: Iterable[_MLinExprLike], axis: Optional[int] = None) -> MLinExpr: ... # type: ignore[misc]
130
138
  @overload
131
- def concatenate(tup: Iterable[_MQuadExprLike], axis: Optional[int] = None) -> MQuadExpr: ...
139
+ def concatenate(tup: Iterable[_MQuadExprLike], axis: Optional[int] = None) -> MQuadExpr: ... # type: ignore[misc]
140
+ @overload
141
+ def concatenate(tup: Iterable[_MNLExprLike], axis: Optional[int] = None) -> MNLExpr: ...
132
142
  @overload
133
143
  def concatenate(tup: Iterable[MConstr], axis: Optional[int] = None) -> MConstr: ...
134
144
  @overload
@@ -140,12 +150,14 @@ def resetParams() -> None: ...
140
150
  def setParam(paramname: str, newvalue: float) -> None: ...
141
151
  @overload
142
152
  def setParam(paramname: str, newvalue: str) -> None: ...
143
- def system(__command: str) -> None: ...
144
153
  def writeParams(__filename: str) -> None: ...
145
154
 
146
155
  class AttrConstClass:
156
+ BarStatus: str = ...
147
157
  BarIterCount: str = ...
158
+ PDHGIterCount: str = ...
148
159
  BarX: str = ...
160
+ BarPi: str = ...
149
161
  BatchErrorCode: str = ...
150
162
  BatchErrorMessage: str = ...
151
163
  BatchID: str = ...
@@ -229,6 +241,7 @@ class AttrConstClass:
229
241
  MIPGap: str = ...
230
242
  MaxBound: str = ...
231
243
  MaxCoeff: str = ...
244
+ MaxMemUsed: str = ...
232
245
  MaxObjCoeff: str = ...
233
246
  MaxQCCoeff: str = ...
234
247
  MaxQCLCoeff: str = ...
@@ -236,6 +249,7 @@ class AttrConstClass:
236
249
  MaxQObjCoeff: str = ...
237
250
  MaxRHS: str = ...
238
251
  MaxVio: str = ...
252
+ MemUsed: str = ...
239
253
  MinBound: str = ...
240
254
  MinCoeff: str = ...
241
255
  MinObjCoeff: str = ...
@@ -246,6 +260,7 @@ class AttrConstClass:
246
260
  MinRHS: str = ...
247
261
  ModelName: str = ...
248
262
  ModelSense: str = ...
263
+ NLBarIterCount: str = ...
249
264
  NodeCount: str = ...
250
265
  NumBinVars: str = ...
251
266
  NumConstrs: str = ...
@@ -253,6 +268,7 @@ class AttrConstClass:
253
268
  NumIntVars: str = ...
254
269
  NumNZs: str = ...
255
270
  NumObj: str = ...
271
+ NumObjPasses: str = ...
256
272
  NumPWLObjVars: str = ...
257
273
  NumQCNZs: str = ...
258
274
  NumQConstrs: str = ...
@@ -269,17 +285,39 @@ class AttrConstClass:
269
285
  ObjNAbsTol: str = ...
270
286
  ObjNCon: str = ...
271
287
  ObjNName: str = ...
288
+ ObjNPass: str = ...
272
289
  ObjNPriority: str = ...
273
290
  ObjNRelTol: str = ...
274
291
  ObjNVal: str = ...
275
292
  ObjNWeight: str = ...
293
+ ObjPassNIterCount: str = ...
294
+ ObjPassNMIPGap: str = ...
295
+ ObjPassNNodeCount: str = ...
296
+ ObjPassObjBound: str = ...
297
+ ObjPassObjVal: str = ...
298
+ ObjPassNOpenNodeCount: str = ...
299
+ ObjPassNRuntime: str = ...
300
+ ObjPassNStatus: str = ...
301
+ ObjPassNWork: str = ...
276
302
  ObjVal: str = ...
277
303
  OpenNodeCount: str = ...
304
+ PoolNBoundVio: str = ...
305
+ PoolNBoundVioIndex: str = ...
306
+ PoolNBoundVioSum: str = ...
307
+ PoolNConstrVio: str = ...
308
+ PoolNConstrVioIndex: str = ...
309
+ PoolNConstrVioSum: str = ...
310
+ PoolNIntVio: str = ...
311
+ PoolNIntVioIndex: str = ...
312
+ PoolNIntVioSum: str = ...
313
+ PoolNMaxVio: str = ...
278
314
  PStart: str = ...
279
315
  PWLObjCvx: str = ...
280
316
  Partition: str = ...
281
317
  Pi: str = ...
282
318
  PoolIgnore: str = ...
319
+ PoolNObjVal: str = ...
320
+ PoolNX: str = ...
283
321
  PoolObjBound: str = ...
284
322
  PoolObjVal: str = ...
285
323
  PreFixVal: str = ...
@@ -365,6 +403,8 @@ class CallbackClass:
365
403
  IIS_CONSTRGUESS: int = ...
366
404
  IIS_CONSTRMAX: int = ...
367
405
  IIS_CONSTRMIN: int = ...
406
+ MAXMEMUSED: int = ...
407
+ MEMUSED: int = ...
368
408
  MESSAGE: int = ...
369
409
  MIP: int = ...
370
410
  MIPNODE: int = ...
@@ -400,6 +440,22 @@ class CallbackClass:
400
440
  MULTIOBJ_OBJCNT: int = ...
401
441
  MULTIOBJ_SOL: int = ...
402
442
  MULTIOBJ_SOLCNT: int = ...
443
+ MULTIOBJ_ITRCNT: int = ...
444
+ MULTIOBJ_OBJBST: int = ...
445
+ MULTIOBJ_OBJBND: int = ...
446
+ MULTIOBJ_STATUS: int = ...
447
+ MULTIOBJ_MIPGAP: int = ...
448
+ MULTIOBJ_NODCNT: int = ...
449
+ MULTIOBJ_NODLFT: int = ...
450
+ MULTIOBJ_RUNTIME: int = ...
451
+ MULTIOBJ_WORK: int = ...
452
+ PDHG: int = ...
453
+ PDHG_COMPL: int = ...
454
+ PDHG_DUALINF: int = ...
455
+ PDHG_DUALOBJ: int = ...
456
+ PDHG_ITRCNT: int = ...
457
+ PDHG_PRIMINF: int = ...
458
+ PDHG_PRIMOBJ: int = ...
403
459
  POLLING: int = ...
404
460
  PRESOLVE: int = ...
405
461
  PRE_BNDCHG: int = ...
@@ -446,6 +502,7 @@ class Column:
446
502
  def size(self) -> int: ...
447
503
 
448
504
  class Constr:
505
+ BarPi: float = ...
449
506
  CBasis: int = ...
450
507
  CTag: str = ...
451
508
  ConstrName: str = ...
@@ -632,6 +689,7 @@ class GRB:
632
689
  METHOD_DETERMINISTIC_CONCURRENT_SIMPLEX: int = ...
633
690
  METHOD_DUAL: int = ...
634
691
  METHOD_NONE: int = ...
692
+ METHOD_PDHG: int = ...
635
693
  METHOD_PRIMAL: int = ...
636
694
  MINIMIZE: int = ...
637
695
  NODE_LIMIT: int = ...
@@ -666,6 +724,7 @@ class GRB:
666
724
  status: StatusConstClass = ...
667
725
 
668
726
  class GenConstr:
727
+ FuncNonlinear: int = ...
669
728
  FuncPieceError: float = ...
670
729
  FuncPieceLength: float = ...
671
730
  FuncPieceRatio: float = ...
@@ -777,6 +836,8 @@ class LinExpr:
777
836
  @overload
778
837
  def __imul__(self, __expr: LinExpr) -> QuadExpr: ...
779
838
  @overload
839
+ def __imul__(self, __expr: QuadExpr) -> NLExpr: ...
840
+ @overload
780
841
  def __isub__(self, __expr: float) -> LinExpr: ...
781
842
  @overload
782
843
  def __isub__(self, __expr: Var) -> LinExpr: ...
@@ -796,8 +857,18 @@ class LinExpr:
796
857
  def __mul__(self, __expr: Var) -> QuadExpr: ...
797
858
  @overload
798
859
  def __mul__(self, __expr: LinExpr) -> QuadExpr: ...
860
+ @overload
861
+ def __mul__(self, expr: QuadExpr) -> NLExpr: ...
799
862
  def __neg__(self) -> LinExpr: ...
800
- def __pow__(self, __exponent: int) -> QuadExpr: ...
863
+ @overload
864
+ def __pow__(self, exponent: Literal[0]) -> float: ...
865
+ @overload
866
+ def __pow__(self, exponent: Literal[1]) -> LinExpr: ...
867
+ @overload
868
+ def __pow__(self, exponent: Literal[2]) -> QuadExpr: ...
869
+ @overload
870
+ def __pow__(self, exponent: _NLExprLike) -> NLExpr: ...
871
+ def __rpow__(self, base: float) -> NLExpr: ...
801
872
  @overload
802
873
  def __radd__(self, __expr: float) -> LinExpr: ...
803
874
  @overload
@@ -822,9 +893,14 @@ class LinExpr:
822
893
  def __sub__(self, __expr: Var) -> LinExpr: ...
823
894
  @overload
824
895
  def __sub__(self, __expr: LinExpr) -> LinExpr: ...
825
- def __truediv__(self, __constant: float) -> LinExpr: ...
896
+ @overload
897
+ def __truediv__(self, expr: float) -> LinExpr: ...
898
+ @overload
899
+ def __truediv__(self, expr: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
900
+ def __rtruediv__(self, expr: float) -> NLExpr: ...
826
901
 
827
902
  class MConstr:
903
+ BarPi: float = ...
828
904
  CBasis: int = ...
829
905
  CTag: str = ...
830
906
  ConstrName: str = ...
@@ -919,7 +995,11 @@ class MLinExpr:
919
995
  def __isub__(self, other: _ConstComponent) -> MLinExpr: ...
920
996
  @overload
921
997
  def __isub__(self, other: _LinearComponent) -> MLinExpr: ...
922
- def __itruediv__(self, other: _ConstComponent) -> MLinExpr: ...
998
+ # (Accurate) inconsistency with truediv
999
+ def __itruediv__( # type: ignore[misc]
1000
+ self,
1001
+ other: _ConstComponent
1002
+ ) -> MLinExpr: ...
923
1003
  @overload
924
1004
  def __le__(self, other: Union[float, int]) -> TempMConstr: ...
925
1005
  @overload
@@ -940,30 +1020,71 @@ class MLinExpr:
940
1020
  def __mul__(self, other: _ConstComponent) -> MLinExpr: ...
941
1021
  @overload
942
1022
  def __mul__(self, other: _LinearComponent) -> MQuadExpr: ...
1023
+ @overload
1024
+ def __pow__(self, exponent: Literal[2]) -> MQuadExpr: ... # type: ignore[misc]
1025
+ @overload
1026
+ def __pow__(self, exponent: _ConstComponent) -> MNLExpr: ...
1027
+ @overload
1028
+ def __pow__(self, exponent: _LinearComponent) -> MNLExpr: ...
1029
+ # unsafe overlap with numpy
1030
+ @overload
1031
+ def __rpow__( # type: ignore[misc]
1032
+ self,
1033
+ base: _ConstComponent
1034
+ ) -> MNLExpr: ...
1035
+ @overload
1036
+ def __rpow__(self, base: _LinearComponent) -> MNLExpr: ...
943
1037
  def __neg__(self) -> MLinExpr: ...
1038
+ # Unsafe overlap with numpy
944
1039
  @overload
945
- def __radd__(self, other: _ConstComponent) -> MLinExpr: ...
1040
+ def __radd__( # type: ignore[misc]
1041
+ self,
1042
+ other: _ConstComponent
1043
+ ) -> MLinExpr: ...
946
1044
  @overload
947
1045
  def __radd__(self, other: _LinearComponent) -> MLinExpr: ...
948
1046
  @overload
949
1047
  def __rmatmul__(self, other: MVar) -> MQuadExpr: ...
950
1048
  @overload
951
1049
  def __rmatmul__(self, other: MLinExpr) -> MQuadExpr: ...
1050
+ # Unsafe overlap with numpy
952
1051
  @overload
953
- def __rmatmul__(self, other: np.ndarray) -> MQuadExpr: ...
1052
+ def __rmatmul__( # type: ignore[misc]
1053
+ self,
1054
+ other: np.ndarray
1055
+ ) -> MQuadExpr: ...
1056
+ # Unsafe overlap with numpy
954
1057
  @overload
955
- def __rmul__(self, other: _ConstComponent) -> MLinExpr: ...
1058
+ def __rmul__( # type: ignore[misc]
1059
+ self,
1060
+ other: _ConstComponent
1061
+ ) -> MLinExpr: ...
956
1062
  @overload
957
1063
  def __rmul__(self, other: _LinearComponent) -> MQuadExpr: ...
1064
+ # Unsafe overlap with numpy
958
1065
  @overload
959
- def __rsub__(self, other: _ConstComponent) -> MLinExpr: ...
1066
+ def __rsub__( # type: ignore[misc]
1067
+ self,
1068
+ other: _ConstComponent
1069
+ ) -> MLinExpr: ...
960
1070
  @overload
961
1071
  def __rsub__(self, other: _LinearComponent) -> MLinExpr: ...
962
1072
  @overload
963
1073
  def __sub__(self, other: _ConstComponent) -> MLinExpr: ...
964
1074
  @overload
965
1075
  def __sub__(self, other: _LinearComponent) -> MLinExpr: ...
1076
+ @overload
966
1077
  def __truediv__(self, other: _ConstComponent) -> MLinExpr: ...
1078
+ @overload
1079
+ def __truediv__(self, other: _LinearComponent) -> MNLExpr: ...
1080
+ # unsafe overlap with numpy
1081
+ @overload
1082
+ def __rtruediv__( # type: ignore[misc]
1083
+ self,
1084
+ other: _ConstComponent
1085
+ ) -> MNLExpr: ...
1086
+ @overload
1087
+ def __rtruediv__(self, other: _LinearComponent) -> MNLExpr: ...
967
1088
  @property
968
1089
  def ndim(self) -> int: ...
969
1090
  @property
@@ -1014,7 +1135,11 @@ class MQuadExpr:
1014
1135
  def __iadd__(self, other: _LinearComponent) -> MQuadExpr: ...
1015
1136
  @overload
1016
1137
  def __iadd__(self, other: _QuadComponent) -> MQuadExpr: ...
1017
- def __imul__(self, other: _ConstComponent) -> MQuadExpr: ...
1138
+ # (Accurate) inconsistency with truediv
1139
+ def __imul__( # type: ignore[misc]
1140
+ self,
1141
+ other: _ConstComponent
1142
+ ) -> MQuadExpr: ...
1018
1143
  @overload
1019
1144
  def __isub__(self, other: _ConstComponent) -> MQuadExpr: ...
1020
1145
  @overload
@@ -1033,17 +1158,65 @@ class MQuadExpr:
1033
1158
  def __le__(self, other: _LinearComponent) -> TempMQConstr: ...
1034
1159
  @overload
1035
1160
  def __le__(self, other: _QuadComponent) -> TempMQConstr: ...
1161
+ @overload
1036
1162
  def __mul__(self, other: _ConstComponent) -> MQuadExpr: ...
1163
+ @overload
1164
+ def __mul__(self, expr: _LinearComponent) -> MNLExpr: ...
1165
+ @overload
1166
+ def __mul__(self, expr: _QuadComponent) -> MNLExpr: ...
1167
+ @overload
1168
+ def __truediv__(self, other: _ConstComponent) -> MQuadExpr: ...
1169
+ @overload
1170
+ def __truediv__(self, other: _LinearComponent) -> MNLExpr: ...
1171
+ @overload
1172
+ def __truediv__(self, other: _QuadComponent) -> MNLExpr: ...
1173
+ # unsafe overlap with numpy
1174
+ @overload
1175
+ def __rtruediv__( # type: ignore[misc]
1176
+ self,
1177
+ other: _ConstComponent,
1178
+ ) -> MNLExpr: ...
1179
+ @overload
1180
+ def __rtruediv__(self, other: _LinearComponent) -> MNLExpr: ...
1181
+ @overload
1182
+ def __pow__(self, exponent: _ConstComponent) -> MNLExpr: ...
1183
+ @overload
1184
+ def __pow__(self, exponent: _LinearComponent) -> MNLExpr: ...
1185
+ @overload
1186
+ def __pow__(self, exponent: _QuadComponent) -> MNLExpr: ...
1187
+ # Unsafe overlap with numpy
1188
+ @overload
1189
+ def __rpow__( # type: ignore[misc]
1190
+ self,
1191
+ base: _ConstComponent
1192
+ ) -> MNLExpr: ...
1193
+ @overload
1194
+ def __rpow__(self, base: _LinearComponent) -> MNLExpr: ...
1037
1195
  def __neg__(self) -> MQuadExpr: ...
1196
+ # Unsafe overlap with numpy
1038
1197
  @overload
1039
- def __radd__(self, other: _ConstComponent) -> MQuadExpr: ...
1198
+ def __radd__( # type: ignore[misc]
1199
+ self,
1200
+ other: _ConstComponent
1201
+ ) -> MQuadExpr: ...
1040
1202
  @overload
1041
1203
  def __radd__(self, other: _LinearComponent) -> MQuadExpr: ...
1042
1204
  @overload
1043
1205
  def __radd__(self, other: _QuadComponent) -> MQuadExpr: ...
1044
- def __rmul__(self, other: _ConstComponent) -> TempMConstr: ...
1206
+ # Unsafe overlap with numpy
1045
1207
  @overload
1046
- def __rsub__(self, other: _ConstComponent) -> MQuadExpr: ...
1208
+ def __rmul__( # type: ignore[misc]
1209
+ self,
1210
+ other: _ConstComponent
1211
+ ) -> MQuadExpr: ...
1212
+ @overload
1213
+ def __rmul__(self, other: _LinearComponent) -> MNLExpr: ...
1214
+ # Unsafe overlap with numpy
1215
+ @overload
1216
+ def __rsub__( # type: ignore[misc]
1217
+ self,
1218
+ other: _ConstComponent
1219
+ ) -> MQuadExpr: ...
1047
1220
  @overload
1048
1221
  def __rsub__(self, other: _LinearComponent) -> MQuadExpr: ...
1049
1222
  @overload
@@ -1067,6 +1240,75 @@ class MQuadExpr:
1067
1240
  def sum(self, axis: int) -> MQuadExpr: ...
1068
1241
  def item(self) -> QuadExpr: ...
1069
1242
 
1243
+ class MNLExpr:
1244
+
1245
+ @overload
1246
+ def __add__(self, exponent: _NLExprLike) -> MNLExpr: ...
1247
+ @overload
1248
+ def __add__(self, exponent: _MNLExprLike) -> MNLExpr: ...
1249
+ @overload
1250
+ def __radd__(self, exponent: _NLExprLike) -> MNLExpr: ...
1251
+ # Unsafe overlap with numpy
1252
+ @overload
1253
+ def __radd__( # type: ignore[misc]
1254
+ self,
1255
+ exponent: _MQuadExprLike
1256
+ ) -> MNLExpr: ...
1257
+
1258
+ @overload
1259
+ def __sub__(self, exponent: _NLExprLike) -> MNLExpr: ...
1260
+ @overload
1261
+ def __sub__(self, exponent: _MNLExprLike) -> MNLExpr: ...
1262
+ @overload
1263
+ def __rsub__(self, exponent: _NLExprLike) -> MNLExpr: ...
1264
+ # Unsafe overlap with numpy
1265
+ @overload
1266
+ def __rsub__( # type: ignore[misc]
1267
+ self,
1268
+ exponent: _MQuadExprLike
1269
+ ) -> MNLExpr: ...
1270
+
1271
+ @overload
1272
+ def __mul__(self, exponent: _NLExprLike) -> MNLExpr: ...
1273
+ @overload
1274
+ def __mul__(self, exponent: _MNLExprLike) -> MNLExpr: ...
1275
+ @overload
1276
+ def __rmul__(self, exponent: _NLExprLike) -> MNLExpr: ...
1277
+ # Unsafe overlap with numpy
1278
+ @overload
1279
+ def __rmul__( # type: ignore[misc]
1280
+ self,
1281
+ exponent: _MQuadExprLike
1282
+ ) -> MNLExpr: ...
1283
+
1284
+ @overload
1285
+ def __pow__(self, exponent: _NLExprLike) -> MNLExpr: ...
1286
+ @overload
1287
+ def __pow__(self, exponent: _MNLExprLike) -> MNLExpr: ...
1288
+ @overload
1289
+ def __rpow__(self, exponent: _NLExprLike) -> MNLExpr: ...
1290
+ # Unsafe overlap with numpy
1291
+ @overload
1292
+ def __rpow__( # type: ignore[misc]
1293
+ self,
1294
+ exponent: _MQuadExprLike
1295
+ ) -> MNLExpr: ...
1296
+
1297
+ @overload
1298
+ def __truediv__(self, exponent: _NLExprLike) -> MNLExpr: ...
1299
+ @overload
1300
+ def __truediv__(self, exponent: _MNLExprLike) -> MNLExpr: ...
1301
+ @overload
1302
+ def __rtruediv__(self, exponent: _NLExprLike) -> MNLExpr: ...
1303
+ # Unsafe overlap with numpy
1304
+ @overload
1305
+ def __rtruediv__( # type: ignore[misc]
1306
+ self,
1307
+ exponent: _MQuadExprLike
1308
+ ) -> MNLExpr: ...
1309
+
1310
+ def __neg__(self) -> MNLExpr: ...
1311
+
1070
1312
  class MVar:
1071
1313
  BarX: float = ...
1072
1314
  BranchPriority: int = ...
@@ -1081,6 +1323,7 @@ class MVar:
1081
1323
  PWLObjCvx: int = ...
1082
1324
  Partition: int = ...
1083
1325
  PoolIgnore: int = ...
1326
+ PoolNX: float = ...
1084
1327
  RC: float = ...
1085
1328
  SALBLow: float = ...
1086
1329
  SALBUp: float = ...
@@ -1130,6 +1373,8 @@ class MVar:
1130
1373
  @overload
1131
1374
  def __eq__(self, other: _LinearComponent) -> TempMConstr: ...
1132
1375
  @overload
1376
+ def __eq__(self, other: MNLExpr) -> TempMGenConstr: ...
1377
+ @overload
1133
1378
  def __ge__(self, other: Union[float, int]) -> TempMConstr: ...
1134
1379
  @overload
1135
1380
  def __ge__(self, other: _LinearComponent) -> TempMConstr: ...
@@ -1140,7 +1385,11 @@ class MVar:
1140
1385
  other: np.ndarray
1141
1386
  ) -> TempMConstr: ...
1142
1387
  def __getitem__(self, obj: _IndexLike) -> MVar: ...
1143
- def __itruediv__(self, other: _ConstComponent) -> MLinExpr: ...
1388
+ # (Accurate) inconsistency with truediv
1389
+ def __itruediv__( # type: ignore[misc]
1390
+ self,
1391
+ other: _ConstComponent
1392
+ ) -> MLinExpr: ...
1144
1393
  @overload
1145
1394
  def __le__(self, other: Union[float, int]) -> TempMConstr: ...
1146
1395
  @overload
@@ -1164,28 +1413,63 @@ class MVar:
1164
1413
  def __neg__(self) -> MLinExpr: ...
1165
1414
  def __pos__(self) -> MVar: ...
1166
1415
  @overload
1167
- def __radd__(self, other: _ConstComponent) -> MLinExpr: ...
1416
+ def __pow__(self, exponent: Literal[2]) -> MQuadExpr: ...
1417
+ @overload
1418
+ def __pow__(self, exponent: float) -> MNLExpr: ...
1419
+ @overload
1420
+ def __pow__(self, exponent: _MNLExprLike) -> MNLExpr: ...
1421
+ # (Accurate) inconsistency with truediv
1422
+ def __rpow__( # type: ignore[misc]
1423
+ self,
1424
+ base: _ConstComponent
1425
+ ) -> MNLExpr: ...
1426
+ # Unsafe overlap with numpy
1427
+ @overload
1428
+ def __radd__( # type: ignore[misc]
1429
+ self,
1430
+ other: _ConstComponent
1431
+ ) -> MLinExpr: ...
1168
1432
  @overload
1169
1433
  def __radd__(self, other: _LinearComponent) -> MLinExpr: ...
1170
1434
  @overload
1171
1435
  def __rmatmul__(self, other: MLinExpr) -> MQuadExpr: ...
1172
1436
  @overload
1173
1437
  def __rmatmul__(self, other: MVar) -> MQuadExpr: ...
1438
+ # Unsafe overlap with numpy
1174
1439
  @overload
1175
- def __rmatmul__(self, other: np.ndarray) -> MLinExpr: ...
1440
+ def __rmatmul__( # type: ignore[misc]
1441
+ self,
1442
+ other: np.ndarray
1443
+ ) -> MLinExpr: ...
1444
+ # Unsafe overlap with numpy
1176
1445
  @overload
1177
- def __rmul__(self, other: _ConstComponent) -> MLinExpr: ...
1446
+ def __rmul__( # type: ignore[misc]
1447
+ self,
1448
+ other: _ConstComponent
1449
+ ) -> MLinExpr: ...
1178
1450
  @overload
1179
1451
  def __rmul__(self, other: _LinearComponent) -> MQuadExpr: ...
1180
1452
  @overload
1181
1453
  def __rsub__(self, other: _LinearComponent) -> MLinExpr: ...
1454
+ # Unsafe overlap with numpy
1182
1455
  @overload
1183
- def __rsub__(self, other: _ConstComponent) -> MLinExpr: ...
1456
+ def __rsub__( # type: ignore[misc]
1457
+ self,
1458
+ other: _ConstComponent
1459
+ ) -> MLinExpr: ...
1184
1460
  @overload
1185
1461
  def __sub__(self, other: _LinearComponent) -> MLinExpr: ...
1186
1462
  @overload
1187
1463
  def __sub__(self, other: _ConstComponent) -> MLinExpr: ...
1464
+ @overload
1188
1465
  def __truediv__(self, other: _ConstComponent) -> MLinExpr: ...
1466
+ @overload
1467
+ def __truediv__(self, other: _LinearComponent) -> MNLExpr: ...
1468
+ # Unsafe overlap with numpy
1469
+ def __rtruediv__( # type: ignore[misc]
1470
+ self,
1471
+ other: _ConstComponent
1472
+ ) -> MNLExpr: ...
1189
1473
  @property
1190
1474
  def ndim(self) -> int: ...
1191
1475
  @property
@@ -1204,6 +1488,7 @@ class MVar:
1204
1488
 
1205
1489
  class Model:
1206
1490
  BarIterCount: int = ...
1491
+ PDHGIterCount: int = ...
1207
1492
  BoundSVio: float = ...
1208
1493
  BoundSVioIndex: int = ...
1209
1494
  BoundSVioSum: float = ...
@@ -1256,6 +1541,7 @@ class Model:
1256
1541
  MIPGap: float = ...
1257
1542
  MaxBound: float = ...
1258
1543
  MaxCoeff: float = ...
1544
+ MaxMemUsed: float = ...
1259
1545
  MaxObjCoeff: float = ...
1260
1546
  MaxQCCoeff: float = ...
1261
1547
  MaxQCLCoeff: float = ...
@@ -1263,6 +1549,7 @@ class Model:
1263
1549
  MaxQObjCoeff: float = ...
1264
1550
  MaxRHS: float = ...
1265
1551
  MaxVio: float = ...
1552
+ MemUsed: float = ...
1266
1553
  MinBound: float = ...
1267
1554
  MinCoeff: float = ...
1268
1555
  MinObjCoeff: float = ...
@@ -1273,6 +1560,7 @@ class Model:
1273
1560
  MinRHS: float = ...
1274
1561
  ModelName: str = ...
1275
1562
  ModelSense: int = ...
1563
+ NLBarIterCount: int = ...
1276
1564
  NodeCount: float = ...
1277
1565
  NumBinVars: int = ...
1278
1566
  NumConstrs: int = ...
@@ -1280,6 +1568,7 @@ class Model:
1280
1568
  NumIntVars: int = ...
1281
1569
  NumNZs: int = ...
1282
1570
  NumObj: int = ...
1571
+ NumObjPasses: int = ...
1283
1572
  NumPWLObjVars: int = ...
1284
1573
  NumQCNZs: int = ...
1285
1574
  NumQConstrs: int = ...
@@ -1294,13 +1583,34 @@ class Model:
1294
1583
  ObjNAbsTol: float = ...
1295
1584
  ObjNCon: float = ...
1296
1585
  ObjNName: str = ...
1586
+ ObjNPass: int = ...
1297
1587
  ObjNPriority: int = ...
1298
1588
  ObjNRelTol: float = ...
1299
1589
  ObjNVal: float = ...
1300
1590
  ObjNWeight: float = ...
1591
+ ObjPassNIterCount: float = ...
1592
+ ObjPassNMIPGap: float = ...
1593
+ ObjPassNNodeCount: float = ...
1594
+ ObjPassNObjBound: float = ...
1595
+ ObjPassNObjVal: float = ...
1596
+ ObjPassNOpenNodeCount: float = ...
1597
+ ObjPassNRuntime: float = ...
1598
+ ObjPassNStatus: int = ...
1599
+ ObjPassNWork: float = ...
1301
1600
  ObjVal: float = ...
1302
1601
  OpenNodeCount: float = ...
1303
1602
  Params: ParamClass = ...
1603
+ PoolNBoundVio: float = ...
1604
+ PoolNBoundVioIndex: int = ...
1605
+ PoolNBoundVioSum: float = ...
1606
+ PoolNConstrVio: float = ...
1607
+ PoolNConstrVioIndex: int = ...
1608
+ PoolNConstrVioSum: float = ...
1609
+ PoolNIntVio: float = ...
1610
+ PoolNIntVioIndex: int = ...
1611
+ PoolNIntVioSum: float = ...
1612
+ PoolNMaxVio: float = ...
1613
+ PoolNObjVal: float = ...
1304
1614
  PoolObjBound: float = ...
1305
1615
  PoolObjVal: float = ...
1306
1616
  Runtime: float = ...
@@ -1325,6 +1635,8 @@ class Model:
1325
1635
  @overload
1326
1636
  def addConstr(self, __tc: TempGenConstr, name: str = ...) -> GenConstr: ...
1327
1637
  @overload
1638
+ def addConstr(self, __tc: TempMGenConstr, name: str = ...) -> MGenConstr: ...
1639
+ @overload
1328
1640
  def addConstrs(
1329
1641
  self,
1330
1642
  constrs: Generator[TempLConstr, None, None],
@@ -1485,6 +1797,28 @@ class Model:
1485
1797
  name: str = ...
1486
1798
  ) -> GenConstr: ...
1487
1799
  @overload
1800
+ def addGenConstrNL(
1801
+ self,
1802
+ resvar: Var,
1803
+ expr: _NLExprLike,
1804
+ name: str = ...
1805
+ ) -> GenConstr: ...
1806
+ @overload
1807
+ def addGenConstrNL(
1808
+ self,
1809
+ resvar: MVar,
1810
+ expr: _MNLExprLike,
1811
+ name: str = ...
1812
+ ) -> MGenConstr: ...
1813
+ def addGenConstrNLAdv(
1814
+ self,
1815
+ resvar: Var,
1816
+ opcode: List[int],
1817
+ data: List[float],
1818
+ parent: List[int],
1819
+ name: str = ...
1820
+ ) -> GenConstr: ...
1821
+ @overload
1488
1822
  def addGenConstrNorm(
1489
1823
  self,
1490
1824
  resvar: Var,
@@ -1753,12 +2087,11 @@ class Model:
1753
2087
  vtype: Union[str, Iterable[str]] = GRB.CONTINUOUS,
1754
2088
  name: Union[str, Iterable[str]] = ...
1755
2089
  ) -> tupledict[Tuple[Any, ...], Var]: ...
1756
- # single list of tuples arg + scalar/dict kwargs
2090
+ # multiple lists of tuples args + scalar/dict kwargs
1757
2091
  @overload
1758
2092
  def addVars(
1759
2093
  self,
1760
- __indices: Iterable[Tuple[_Scalar, ...]],
1761
- *,
2094
+ *indices: Union[Iterable[_Scalar], Iterable[Tuple[_Scalar, ...]]],
1762
2095
  lb: Union[float, Mapping[Any, float]] = 0.0,
1763
2096
  ub: Union[float, Mapping[Any, float]] = float('inf'),
1764
2097
  obj: Union[float, Mapping[Any, float]] = 0.0,
@@ -1860,6 +2193,11 @@ class Model:
1860
2193
  def fixed(self) -> Model: ...
1861
2194
  # no type hinting for scipy.sparse
1862
2195
  def getA(self) -> Any: ...
2196
+ def getQ(self) -> Any: ...
2197
+ @overload
2198
+ def getQCMatrices(self, qc: QConstr) -> Tuple[Any, Any]: ...
2199
+ @overload
2200
+ def getQCMatrices(self, qc: MQConstr) -> Tuple[Any, Any]: ...
1863
2201
  @overload
1864
2202
  def getAttr(self, attrname: str) -> Any: ...
1865
2203
  @overload
@@ -1959,6 +2297,14 @@ class Model:
1959
2297
  self,
1960
2298
  genconstr: GenConstr
1961
2299
  ) -> Tuple[Var, List[Var], float]: ...
2300
+ def getGenConstrNL(
2301
+ self,
2302
+ genconstr: GenConstr
2303
+ ) -> Tuple[Var, NLExpr]: ...
2304
+ def getGenConstrNLAdv(
2305
+ self,
2306
+ genconstr: GenConstr
2307
+ ) -> Tuple[Var, List[int], List[float], List[int]]: ...
1962
2308
  def getGenConstrNorm(
1963
2309
  self,
1964
2310
  genconstr: GenConstr
@@ -2045,6 +2391,8 @@ class Model:
2045
2391
  @overload
2046
2392
  def setAttr(self, attrname: str, arg1: str) -> None: ...
2047
2393
  @overload
2394
+ def setAttr(self, attrname: str, arg1: Sequence[_Scalar]) -> None: ...
2395
+ @overload
2048
2396
  def setAttr(
2049
2397
  self,
2050
2398
  attrname: str,
@@ -2271,9 +2619,11 @@ class ParamClass:
2271
2619
  DualReductions: int = ...
2272
2620
  FeasRelaxBigM: float = ...
2273
2621
  FeasibilityTol: float = ...
2622
+ FixVarsInIndicators: int = ...
2274
2623
  FlowCoverCuts: int = ...
2275
2624
  FlowPathCuts: int = ...
2276
2625
  FuncMaxVal: float = ...
2626
+ FuncNonlinear: int = ...
2277
2627
  FuncPieceError: float = ...
2278
2628
  FuncPieceLength: float = ...
2279
2629
  FuncPieceRatio: float = ...
@@ -2287,8 +2637,10 @@ class ParamClass:
2287
2637
  ImproveStartGap: float = ...
2288
2638
  ImproveStartNodes: float = ...
2289
2639
  ImproveStartTime: float = ...
2640
+ ImproveStartWork: float = ...
2290
2641
  InfProofCuts: int = ...
2291
2642
  InfUnbdInfo: int = ...
2643
+ InheritParams: int = ...
2292
2644
  IntFeasTol: float = ...
2293
2645
  IntegralityFocus: int = ...
2294
2646
  IterationLimit: float = ...
@@ -2316,6 +2668,11 @@ class ParamClass:
2316
2668
  NLPHeur: int = ...
2317
2669
  NetworkAlg: int = ...
2318
2670
  NetworkCuts: int = ...
2671
+ NLBarCFeasTol: float = ...
2672
+ NLBarDFeasTol: float = ...
2673
+ NLBarIterLimit: int = ...
2674
+ NLBarPFeasTol: float = ...
2675
+ NoRelHeurSolutions: int = ...
2319
2676
  NoRelHeurTime: float = ...
2320
2677
  NoRelHeurWork: float = ...
2321
2678
  NodeLimit: float = ...
@@ -2327,9 +2684,16 @@ class ParamClass:
2327
2684
  NumericFocus: int = ...
2328
2685
  OBBT: int = ...
2329
2686
  ObjNumber: int = ...
2687
+ ObjPassNumber: int = ...
2330
2688
  ObjScale: float = ...
2689
+ OptimalityTarget: int = ...
2331
2690
  OptimalityTol: float = ...
2332
2691
  OutputFlag: int = ...
2692
+ PDHGIterLimit: float = ...
2693
+ PDHGRelTol: float = ...
2694
+ PDHGAbsTol: float = ...
2695
+ PDHGConvTol: float = ...
2696
+ PDHGGPU: int = ...
2333
2697
  PSDCuts: int = ...
2334
2698
  PSDTol: float = ...
2335
2699
  PartitionPlace: int = ...
@@ -2373,11 +2737,14 @@ class ParamClass:
2373
2737
  SolutionNumber: int = ...
2374
2738
  StartNodeLimit: int = ...
2375
2739
  StartNumber: int = ...
2740
+ StartTimeLimit: float = ...
2741
+ StartWorkLimit: float = ...
2376
2742
  StrongCGCuts: int = ...
2377
2743
  SubMIPCuts: int = ...
2378
2744
  SubMIPNodes: int = ...
2379
2745
  Symmetry: int = ...
2380
2746
  TSPort: int = ...
2747
+ ThreadLimit: int = ...
2381
2748
  Threads: int = ...
2382
2749
  TimeLimit: float = ...
2383
2750
  TokenServer: str = ...
@@ -2454,9 +2821,11 @@ class ParamConstClass:
2454
2821
  DualReductions: str = ...
2455
2822
  FeasRelaxBigM: str = ...
2456
2823
  FeasibilityTol: str = ...
2824
+ FixVarsInIndicators: str = ...
2457
2825
  FlowCoverCuts: str = ...
2458
2826
  FlowPathCuts: str = ...
2459
2827
  FuncMaxVal: str = ...
2828
+ FuncNonlinear: int = ...
2460
2829
  FuncPieceError: str = ...
2461
2830
  FuncPieceLength: str = ...
2462
2831
  FuncPieceRatio: str = ...
@@ -2470,8 +2839,10 @@ class ParamConstClass:
2470
2839
  ImproveStartGap: str = ...
2471
2840
  ImproveStartNodes: str = ...
2472
2841
  ImproveStartTime: str = ...
2842
+ ImproveStartWork: str = ...
2473
2843
  InfProofCuts: str = ...
2474
2844
  InfUnbdInfo: str = ...
2845
+ InheritParams: str = ...
2475
2846
  IntFeasTol: str = ...
2476
2847
  IntegralityFocus: str = ...
2477
2848
  IterationLimit: str = ...
@@ -2499,6 +2870,11 @@ class ParamConstClass:
2499
2870
  NLPHeur: str = ...
2500
2871
  NetworkAlg: str = ...
2501
2872
  NetworkCuts: str = ...
2873
+ NLBarCFeasTol: str = ...
2874
+ NLBarDFeasTol: str = ...
2875
+ NLBarIterLimit: str = ...
2876
+ NLBarPFeasTol: str = ...
2877
+ NoRelHeurSolutions: str = ...
2502
2878
  NoRelHeurTime: str = ...
2503
2879
  NoRelHeurWork: str = ...
2504
2880
  NodeLimit: str = ...
@@ -2510,9 +2886,16 @@ class ParamConstClass:
2510
2886
  NumericFocus: str = ...
2511
2887
  OBBT: str = ...
2512
2888
  ObjNumber: str = ...
2889
+ ObjPassNumber: str = ...
2513
2890
  ObjScale: str = ...
2514
2891
  OptimalityTol: str = ...
2892
+ OptimalityTarget: str = ...
2515
2893
  OutputFlag: str = ...
2894
+ PDHGIterLimit: str = ...
2895
+ PDHGRelTol: str = ...
2896
+ PDHGAbsTol: str = ...
2897
+ PDHGConvTol: str = ...
2898
+ PDHGGPU: str = ...
2516
2899
  PSDCuts: str = ...
2517
2900
  PSDTol: str = ...
2518
2901
  PartitionPlace: str = ...
@@ -2556,11 +2939,14 @@ class ParamConstClass:
2556
2939
  SolutionNumber: str = ...
2557
2940
  StartNodeLimit: str = ...
2558
2941
  StartNumber: str = ...
2942
+ StartTimeLimit: str = ...
2943
+ StartWorkLimit: str = ...
2559
2944
  StrongCGCuts: str = ...
2560
2945
  SubMIPCuts: str = ...
2561
2946
  SubMIPNodes: str = ...
2562
2947
  Symmetry: str = ...
2563
2948
  TSPort: str = ...
2949
+ ThreadLimit: str = ...
2564
2950
  Threads: str = ...
2565
2951
  TimeLimit: str = ...
2566
2952
  TokenServer: str = ...
@@ -2683,8 +3069,11 @@ class QuadExpr:
2683
3069
  def __iadd__(self, __expr: LinExpr) -> QuadExpr: ...
2684
3070
  @overload
2685
3071
  def __iadd__(self, __expr: QuadExpr) -> QuadExpr: ...
3072
+ @overload
2686
3073
  def __imul__(self, __constant: float) -> QuadExpr: ...
2687
3074
  @overload
3075
+ def __imul__(self, __constant: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
3076
+ @overload
2688
3077
  def __isub__(self, __expr: float) -> QuadExpr: ...
2689
3078
  @overload
2690
3079
  def __isub__(self, __expr: Var) -> QuadExpr: ...
@@ -2700,9 +3089,19 @@ class QuadExpr:
2700
3089
  def __le__(self, __rhs: LinExpr) -> TempQConstr: ...
2701
3090
  @overload
2702
3091
  def __le__(self, __rhs: QuadExpr) -> TempQConstr: ...
2703
- def __mul__(self, __constant: float) -> QuadExpr: ...
3092
+ @overload
3093
+ def __mul__(self, expr: float) -> QuadExpr: ...
3094
+ @overload
3095
+ def __mul__(self, expr: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
2704
3096
  def __neg__(self) -> QuadExpr: ...
2705
3097
  @overload
3098
+ def __pow__(self, exponent: Literal[0]) -> float: ...
3099
+ @overload
3100
+ def __pow__(self, exponent: Literal[1]) -> QuadExpr: ...
3101
+ @overload
3102
+ def __pow__(self, exponent: _NLExprLike) -> NLExpr: ...
3103
+ def __rpow__(self, base: float) -> NLExpr: ...
3104
+ @overload
2706
3105
  def __radd__(self, __expr: float) -> QuadExpr: ...
2707
3106
  @overload
2708
3107
  def __radd__(self, __expr: Var) -> QuadExpr: ...
@@ -2727,7 +3126,24 @@ class QuadExpr:
2727
3126
  def __sub__(self, __expr: LinExpr) -> QuadExpr: ...
2728
3127
  @overload
2729
3128
  def __sub__(self, __expr: QuadExpr) -> QuadExpr: ...
2730
- def __truediv__(self, __constant: float) -> QuadExpr: ...
3129
+ @overload
3130
+ def __truediv__(self, expr: float) -> QuadExpr: ...
3131
+ @overload
3132
+ def __truediv__(self, expr: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
3133
+ def __rtruediv__(self, expr: float) -> NLExpr: ...
3134
+
3135
+ class NLExpr(GenExpr):
3136
+ def __add__(self, exponent: _NLExprLike) -> NLExpr: ...
3137
+ def __radd__(self, exponent: _QuadExprLike) -> NLExpr: ...
3138
+ def __sub__(self, exponent: _NLExprLike) -> NLExpr: ...
3139
+ def __rsub__(self, exponent: _QuadExprLike) -> NLExpr: ...
3140
+ def __neg__(self) -> NLExpr: ...
3141
+ def __mul__(self, exponent: _NLExprLike) -> NLExpr: ...
3142
+ def __rmul__(self, exponent: _QuadExprLike) -> NLExpr: ...
3143
+ def __pow__(self, exponent: _NLExprLike) -> NLExpr: ...
3144
+ def __rpow__(self, base: float) -> NLExpr: ...
3145
+ def __truediv__(self, expr: _NLExprLike) -> NLExpr: ...
3146
+ def __rtruediv__(self, expr: _NLExprLike) -> NLExpr: ...
2731
3147
 
2732
3148
  class SOS:
2733
3149
  IISSOS: int = ...
@@ -2758,11 +3174,13 @@ class StatusConstClass:
2758
3174
 
2759
3175
  class TempConstr: ...
2760
3176
 
2761
- # the following four classes are helper classes specifically for type hinting
3177
+ # the following six classes are helper classes specifically for type hinting
2762
3178
  # they are not part of gurobipy
2763
3179
 
2764
3180
  class TempGenConstr(TempConstr): ...
2765
3181
 
3182
+ class TempMGenConstr(TempConstr): ...
3183
+
2766
3184
  class TempLConstr(TempConstr):
2767
3185
  def __rshift__(self, other: TempLConstr) -> TempGenConstr: ...
2768
3186
 
@@ -2786,6 +3204,7 @@ class Var:
2786
3204
  PWLObjCvx: int = ...
2787
3205
  Partition: int = ...
2788
3206
  PoolIgnore: int = ...
3207
+ PoolNX: float = ...
2789
3208
  RC: float = ...
2790
3209
  SALBLow: float = ...
2791
3210
  SALBUp: float = ...
@@ -2855,6 +3274,8 @@ class Var:
2855
3274
  @overload
2856
3275
  def __imul__(self, expr: LinExpr) -> QuadExpr: ...
2857
3276
  @overload
3277
+ def __imul__(self, expr: QuadExpr) -> NLExpr: ...
3278
+ @overload
2858
3279
  def __isub__(self, expr: float) -> LinExpr: ...
2859
3280
  @overload
2860
3281
  def __isub__(self, expr: Var) -> LinExpr: ...
@@ -2874,8 +3295,18 @@ class Var:
2874
3295
  def __mul__(self, expr: Var) -> QuadExpr: ...
2875
3296
  @overload
2876
3297
  def __mul__(self, expr: LinExpr) -> QuadExpr: ...
3298
+ @overload
3299
+ def __mul__(self, expr: QuadExpr) -> NLExpr: ...
2877
3300
  def __neg__(self) -> LinExpr: ...
2878
- def __pow__(self, exponent: int) -> QuadExpr: ...
3301
+ @overload
3302
+ def __pow__(self, exponent: Literal[0]) -> float: ...
3303
+ @overload
3304
+ def __pow__(self, exponent: Literal[1]) -> LinExpr: ...
3305
+ @overload
3306
+ def __pow__(self, exponent: Literal[2]) -> QuadExpr: ...
3307
+ @overload
3308
+ def __pow__(self, exponent: _NLExprLike) -> NLExpr: ...
3309
+ def __rpow__(self, base: float) -> NLExpr: ...
2879
3310
  @overload
2880
3311
  def __radd__(self, expr: float) -> LinExpr: ...
2881
3312
  @overload
@@ -2900,7 +3331,11 @@ class Var:
2900
3331
  def __sub__(self, expr: Var) -> LinExpr: ...
2901
3332
  @overload
2902
3333
  def __sub__(self, expr: LinExpr) -> LinExpr: ...
2903
- def __truediv__(self, constant: float) -> LinExpr: ...
3334
+ @overload
3335
+ def __truediv__(self, expr: float) -> LinExpr: ...
3336
+ @overload
3337
+ def __truediv__(self, expr: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
3338
+ def __rtruediv__(self, expr: float) -> NLExpr: ...
2904
3339
  @property
2905
3340
  def index(self) -> int: ...
2906
3341
 
@@ -2929,3 +3364,36 @@ class tuplelist(List[_T]):
2929
3364
  def select(self, *args: Union[_Scalar, Sequence[_Scalar]]) -> List[_T]: ...
2930
3365
  def __add__(self, other: Iterable[_U]) -> tuplelist[Union[_T, _U]]: ...
2931
3366
  def __iadd__(self, other: Iterable[_U]) -> tuplelist[Union[_T, _U]]: ...
3367
+
3368
+ def loadModel(
3369
+ *,
3370
+ env: Env,
3371
+ numvars: int,
3372
+ numconstrs: int,
3373
+ modelsense: int = ...,
3374
+ objcon: float = ...,
3375
+ obj: Optional[Union[Sequence[float], np.ndarray]] = None,
3376
+ lb: Optional[Union[Sequence[float], np.ndarray]] = None,
3377
+ ub: Optional[Union[Sequence[float], np.ndarray]] = None,
3378
+ vtype: Optional[Union[Sequence[str], np.ndarray]] = None,
3379
+ constr_csc: Optional[
3380
+ Tuple[
3381
+ Union[Sequence[float], np.ndarray],
3382
+ Union[Sequence[int], np.ndarray],
3383
+ Union[Sequence[int], np.ndarray],
3384
+ ]
3385
+ ] = None,
3386
+ sense: Optional[Union[Sequence[str], np.ndarray]] = None,
3387
+ rhs: Optional[Union[Sequence[float], np.ndarray]] = None,
3388
+ qobj_coo: Optional[
3389
+ Tuple[
3390
+ Union[Sequence[float], np.ndarray],
3391
+ Tuple[
3392
+ Union[Sequence[int], np.ndarray],
3393
+ Union[Sequence[int], np.ndarray],
3394
+ ],
3395
+ ]
3396
+ ] = None,
3397
+ name: Optional[str] = None,
3398
+ ) -> Model:
3399
+ ...