gurobipy 13.0.0b1__cp312-cp312-manylinux_2_26_aarch64.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 gurobipy might be problematic. Click here for more details.

gurobipy/__init__.pyi ADDED
@@ -0,0 +1,3364 @@
1
+ # Copyright 2021, Gurobi Optimization, LLC
2
+
3
+ from types import TracebackType
4
+ from typing import (
5
+ Any,
6
+ Callable,
7
+ Dict,
8
+ Generator,
9
+ List,
10
+ Literal,
11
+ Iterable,
12
+ Mapping,
13
+ Optional,
14
+ Sequence,
15
+ Tuple,
16
+ Type,
17
+ TypeVar,
18
+ Union,
19
+ overload
20
+ )
21
+ import numpy as np
22
+
23
+ _T = TypeVar('_T')
24
+ _U = TypeVar('_U')
25
+ _LinExprLike = Union[float, Var, LinExpr]
26
+ _QuadExprLike = Union[float, Var, LinExpr, QuadExpr]
27
+ _NLExprLike = Union[float, Var, LinExpr, QuadExpr, NLExpr]
28
+ _Scalar = Union[int, float, str]
29
+ _ConstComponent = Union[int, float, np.ndarray]
30
+ _LinearComponent = Union[Var, LinExpr, MVar, MLinExpr]
31
+ _QuadComponent = Union[QuadExpr, MQuadExpr]
32
+ _ModelComponent = Union[Var, MVar, Constr, MConstr, QConstr, SOS, GenConstr]
33
+ _ShapeLike = Union[int, Tuple[int, ...]]
34
+ _IndexLike = Union[int, slice, Tuple[int, ...], Sequence[int], Tuple[Union[Sequence[int], int, slice], ...]]
35
+ _MLinExprLike = Union[np.ndarray, MVar, MLinExpr]
36
+ _MQuadExprLike = Union[np.ndarray, MVar, MLinExpr, MQuadExpr]
37
+ _MNLExprLike = Union[np.ndarray, MVar, MLinExpr, MQuadExpr, MNLExpr]
38
+
39
+ def abs_(__var: Var) -> GenExprAbs: ...
40
+ @overload
41
+ def and_(*args: Var) -> GenExprAnd: ...
42
+ @overload
43
+ def and_(__vars: Sequence[Var]) -> GenExprAnd: ...
44
+ @overload
45
+ def and_(__vars: tupledict[Any, Var]) -> GenExprAnd: ...
46
+ @overload
47
+ def max_(*args: Var, constant: Optional[float] = None) -> GenExprMax: ...
48
+ @overload
49
+ def max_(
50
+ __vars: Sequence[Var],
51
+ constant: Optional[float] = None
52
+ ) -> GenExprMax: ...
53
+ @overload
54
+ def max_(
55
+ __vars: tupledict[Any, Var],
56
+ constant: Optional[float] = None
57
+ ) -> GenExprMax: ...
58
+ @overload
59
+ def min_(*args: Var, constant: Optional[float] = None) -> GenExprMin: ...
60
+ @overload
61
+ def min_(
62
+ __vars: Sequence[Var],
63
+ constant: Optional[float] = None
64
+ ) -> GenExprMin: ...
65
+ @overload
66
+ def min_(
67
+ __vars: tupledict[Any, Var],
68
+ constant: Optional[float] = None
69
+ ) -> GenExprMin: ...
70
+ @overload
71
+ def norm(argvars: Sequence[Var], which: float) -> GenExprNorm: ...
72
+ @overload
73
+ def norm(argvars: tupledict[Any, Var], which: float) -> GenExprNorm: ...
74
+ @overload
75
+ def norm(argvars: MVar, which: float) -> GenExprNorm: ...
76
+ @overload
77
+ def or_(*args: Var) -> GenExprOr: ...
78
+ @overload
79
+ def or_(__vars: Sequence[Var]) -> GenExprOr: ...
80
+ @overload
81
+ def or_(__vars: tupledict[Any, Var]) -> GenExprOr: ...
82
+
83
+ def disposeDefaultEnv() -> None: ...
84
+ def getParamInfo(
85
+ __paramname: str
86
+ ) -> Tuple[str, Type[Any], Any, Any, Any, Any]: ...
87
+ def help(argument: Any = None) -> None: ...
88
+ @overload
89
+ def multidict(
90
+ __data: Mapping[_T, float]
91
+ ) -> Tuple[tuplelist[_T], tupledict[_T, float]]: ...
92
+ @overload
93
+ def multidict(
94
+ __data: Mapping[Any, Iterable[float]]
95
+ ) -> Tuple[Any, ...]: ...
96
+ @overload
97
+ def multidict(
98
+ __data: Iterable[Tuple[Any, Iterable[float]]]
99
+ ) -> Tuple[Any, ...]: ...
100
+ def paramHelp(paramname: Optional[str] = None) -> None: ...
101
+ @overload
102
+ def quicksum(__x: tupledict[Any, Var]) -> LinExpr: ... # type: ignore[misc]
103
+ # Cannot write concisely without overlapping signature 3
104
+ @overload
105
+ def quicksum(__x: Iterable[_LinExprLike]) -> LinExpr: ... # type: ignore[misc]
106
+ @overload
107
+ def quicksum(__x: Iterable[_QuadExprLike]) -> QuadExpr: ... # type: ignore[misc]
108
+ @overload
109
+ def quicksum(__x: Iterable[_NLExprLike]) -> NLExpr: ...
110
+ @overload
111
+ def hstack(tup: Iterable[MVar]) -> MVar: ... # type: ignore[misc]
112
+ @overload
113
+ def hstack(tup: Iterable[_MLinExprLike]) -> MLinExpr: ... # type: ignore[misc]
114
+ @overload
115
+ def hstack(tup: Iterable[_MQuadExprLike]) -> MQuadExpr: ... # type: ignore[misc]
116
+ @overload
117
+ def hstack(tup: Iterable[_MNLExprLike]) -> MNLExpr: ...
118
+ @overload
119
+ def hstack(tup: Iterable[MConstr]) -> MConstr: ...
120
+ @overload
121
+ def hstack(tup: Iterable[MQConstr]) -> MQConstr: ...
122
+ @overload
123
+ def vstack(tup: Iterable[MVar]) -> MVar: ... # type: ignore[misc]
124
+ @overload
125
+ def vstack(tup: Iterable[_MLinExprLike]) -> MLinExpr: ... # type: ignore[misc]
126
+ @overload
127
+ def vstack(tup: Iterable[_MQuadExprLike]) -> MQuadExpr: ... # type: ignore[misc]
128
+ @overload
129
+ def vstack(tup: Iterable[_MNLExprLike]) -> MNLExpr: ...
130
+ @overload
131
+ def vstack(tup: Iterable[MConstr]) -> MConstr: ...
132
+ @overload
133
+ def vstack(tup: Iterable[MQConstr]) -> MQConstr: ...
134
+ @overload
135
+ def concatenate(tup: Iterable[MVar], axis: Optional[int] = None) -> MVar: ... # type: ignore[misc]
136
+ @overload
137
+ def concatenate(tup: Iterable[_MLinExprLike], axis: Optional[int] = None) -> MLinExpr: ... # type: ignore[misc]
138
+ @overload
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: ...
142
+ @overload
143
+ def concatenate(tup: Iterable[MConstr], axis: Optional[int] = None) -> MConstr: ...
144
+ @overload
145
+ def concatenate(tup: Iterable[MQConstr], axis: Optional[int] = None) -> MQConstr: ...
146
+ def read(filename: str, env: Optional[Env] = None) -> Model: ...
147
+ def readParams(__filename: str) -> None: ...
148
+ def resetParams() -> None: ...
149
+ @overload
150
+ def setParam(paramname: str, newvalue: float) -> None: ...
151
+ @overload
152
+ def setParam(paramname: str, newvalue: str) -> None: ...
153
+ def writeParams(__filename: str) -> None: ...
154
+
155
+ class AttrConstClass:
156
+ BarStatus: str = ...
157
+ BarIterCount: str = ...
158
+ PDHGIterCount: str = ...
159
+ BarX: str = ...
160
+ BarPi: str = ...
161
+ BatchErrorCode: str = ...
162
+ BatchErrorMessage: str = ...
163
+ BatchID: str = ...
164
+ BatchStatus: str = ...
165
+ BoundSVio: str = ...
166
+ BoundSVioIndex: str = ...
167
+ BoundSVioSum: str = ...
168
+ BoundVio: str = ...
169
+ BoundVioIndex: str = ...
170
+ BoundVioSum: str = ...
171
+ BranchPriority: str = ...
172
+ CBasis: str = ...
173
+ CTag: str = ...
174
+ ComplVio: str = ...
175
+ ComplVioIndex: str = ...
176
+ ComplVioSum: str = ...
177
+ ConcurrentWinMethod: str = ...
178
+ ConstrName: str = ...
179
+ ConstrResidual: str = ...
180
+ ConstrResidualIndex: str = ...
181
+ ConstrResidualSum: str = ...
182
+ ConstrSResidual: str = ...
183
+ ConstrSResidualIndex: str = ...
184
+ ConstrSResidualSum: str = ...
185
+ ConstrSVio: str = ...
186
+ ConstrSVioIndex: str = ...
187
+ ConstrSVioSum: str = ...
188
+ ConstrVio: str = ...
189
+ ConstrVioIndex: str = ...
190
+ ConstrVioSum: str = ...
191
+ DNumNZs: str = ...
192
+ DStart: str = ...
193
+ DualResidual: str = ...
194
+ DualResidualIndex: str = ...
195
+ DualResidualSum: str = ...
196
+ DualSResidual: str = ...
197
+ DualSResidualIndex: str = ...
198
+ DualSResidualSum: str = ...
199
+ DualSVio: str = ...
200
+ DualSVioIndex: str = ...
201
+ DualSVioSum: str = ...
202
+ DualVio: str = ...
203
+ DualVioIndex: str = ...
204
+ DualVioSum: str = ...
205
+ FarkasDual: str = ...
206
+ FarkasProof: str = ...
207
+ Fingerprint: str = ...
208
+ FuncPieceError: str = ...
209
+ FuncPieceLength: str = ...
210
+ FuncPieceRatio: str = ...
211
+ FuncPieces: str = ...
212
+ GenConstrName: str = ...
213
+ GenConstrType: str = ...
214
+ IISConstr: str = ...
215
+ IISConstrForce: str = ...
216
+ IISGenConstr: str = ...
217
+ IISGenConstrForce: str = ...
218
+ IISLB: str = ...
219
+ IISLBForce: str = ...
220
+ IISMinimal: str = ...
221
+ IISQConstr: str = ...
222
+ IISQConstrForce: str = ...
223
+ IISSOS: str = ...
224
+ IISSOSForce: str = ...
225
+ IISUB: str = ...
226
+ IISUBForce: str = ...
227
+ IntVio: str = ...
228
+ IntVioIndex: str = ...
229
+ IntVioSum: str = ...
230
+ IsMIP: str = ...
231
+ IsMultiObj: str = ...
232
+ IsQCP: str = ...
233
+ IsQP: str = ...
234
+ IterCount: str = ...
235
+ JobID: str = ...
236
+ Kappa: str = ...
237
+ KappaExact: str = ...
238
+ LB: str = ...
239
+ Lazy: str = ...
240
+ LicenseExpiration: str = ...
241
+ MIPGap: str = ...
242
+ MaxBound: str = ...
243
+ MaxCoeff: str = ...
244
+ MaxMemUsed: str = ...
245
+ MaxObjCoeff: str = ...
246
+ MaxQCCoeff: str = ...
247
+ MaxQCLCoeff: str = ...
248
+ MaxQCRHS: str = ...
249
+ MaxQObjCoeff: str = ...
250
+ MaxRHS: str = ...
251
+ MaxVio: str = ...
252
+ MemUsed: str = ...
253
+ MinBound: str = ...
254
+ MinCoeff: str = ...
255
+ MinObjCoeff: str = ...
256
+ MinQCCoeff: str = ...
257
+ MinQCLCoeff: str = ...
258
+ MinQCRHS: str = ...
259
+ MinQObjCoeff: str = ...
260
+ MinRHS: str = ...
261
+ ModelName: str = ...
262
+ ModelSense: str = ...
263
+ NLBarIterCount: str = ...
264
+ NodeCount: str = ...
265
+ NumBinVars: str = ...
266
+ NumConstrs: str = ...
267
+ NumGenConstrs: str = ...
268
+ NumIntVars: str = ...
269
+ NumNZs: str = ...
270
+ NumObj: str = ...
271
+ NumObjPasses: str = ...
272
+ NumPWLObjVars: str = ...
273
+ NumQCNZs: str = ...
274
+ NumQConstrs: str = ...
275
+ NumQNZs: str = ...
276
+ NumSOS: str = ...
277
+ NumScenarios: str = ...
278
+ NumStart: str = ...
279
+ NumVars: str = ...
280
+ Obj: str = ...
281
+ ObjBound: str = ...
282
+ ObjBoundC: str = ...
283
+ ObjCon: str = ...
284
+ ObjN: str = ...
285
+ ObjNAbsTol: str = ...
286
+ ObjNCon: str = ...
287
+ ObjNPass: str = ...
288
+ ObjNPassIterCount: str = ...
289
+ ObjNPassMIPGap: str = ...
290
+ ObjNName: str = ...
291
+ ObjNPassNodeCount: str = ...
292
+ ObjNPassObjBound: str = ...
293
+ ObjNPassObjVal: str = ...
294
+ ObjNPassOpenNodeCount: str = ...
295
+ ObjNPriority: str = ...
296
+ ObjNRelTol: str = ...
297
+ ObjNPassRuntime: str = ...
298
+ ObjNPassStatus: str = ...
299
+ ObjNVal: str = ...
300
+ ObjNWeight: str = ...
301
+ ObjNPassWork: str = ...
302
+ ObjVal: str = ...
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 = ...
314
+ PStart: str = ...
315
+ PWLObjCvx: str = ...
316
+ Partition: str = ...
317
+ Pi: str = ...
318
+ PoolIgnore: str = ...
319
+ PoolNObjVal: str = ...
320
+ PoolNX: str = ...
321
+ PoolObjBound: str = ...
322
+ PoolObjVal: str = ...
323
+ PreFixVal: str = ...
324
+ QCName: str = ...
325
+ QCPi: str = ...
326
+ QCRHS: str = ...
327
+ QCSense: str = ...
328
+ QCSlack: str = ...
329
+ QCTag: str = ...
330
+ RC: str = ...
331
+ RHS: str = ...
332
+ Runtime: str = ...
333
+ Work: str = ...
334
+ SALBLow: str = ...
335
+ SALBUp: str = ...
336
+ SAObjLow: str = ...
337
+ SAObjUp: str = ...
338
+ SARHSLow: str = ...
339
+ SARHSUp: str = ...
340
+ SAUBLow: str = ...
341
+ SAUBUp: str = ...
342
+ ScenNLB: str = ...
343
+ ScenNName: str = ...
344
+ ScenNObj: str = ...
345
+ ScenNObjBound: str = ...
346
+ ScenNObjVal: str = ...
347
+ ScenNRHS: str = ...
348
+ ScenNUB: str = ...
349
+ ScenNX: str = ...
350
+ Sense: str = ...
351
+ Server: str = ...
352
+ Slack: str = ...
353
+ SolCount: str = ...
354
+ Start: str = ...
355
+ Status: str = ...
356
+ TuneResultCount: str = ...
357
+ UB: str = ...
358
+ UnbdRay: str = ...
359
+ VBasis: str = ...
360
+ VTag: str = ...
361
+ VType: str = ...
362
+ VarHintPri: str = ...
363
+ VarHintVal: str = ...
364
+ VarName: str = ...
365
+ VarPreStat: str = ...
366
+ X: str = ...
367
+ Xn: str = ...
368
+
369
+ class Batch:
370
+ BatchErrorCode: int = ...
371
+ BatchErrorMessage: str = ...
372
+ BatchID: str = ...
373
+ BatchStatus: int = ...
374
+ def __init__(self, batchID: str, env: Env) -> None: ...
375
+ def abort(self) -> None: ...
376
+ def close(self) -> None: ...
377
+ def discard(self) -> None: ...
378
+ def dispose(self) -> None: ...
379
+ def getJSONSolution(self) -> str: ...
380
+ def retry(self) -> None: ...
381
+ def update(self) -> None: ...
382
+ def writeJSONSolution(self, filename: str) -> None: ...
383
+ def __enter__(self) -> Batch: ...
384
+ def __exit__(
385
+ self,
386
+ exc_type: Optional[Type[BaseException]],
387
+ exc_value: Optional[BaseException],
388
+ traceback: Optional[TracebackType]
389
+ ) -> Optional[bool]: ...
390
+
391
+ class CallbackClass:
392
+ BARRIER: int = ...
393
+ BARRIER_COMPL: int = ...
394
+ BARRIER_DUALINF: int = ...
395
+ BARRIER_DUALOBJ: int = ...
396
+ BARRIER_ITRCNT: int = ...
397
+ BARRIER_PRIMINF: int = ...
398
+ BARRIER_PRIMOBJ: int = ...
399
+ IIS: int = ...
400
+ IIS_BOUNDGUESS: int = ...
401
+ IIS_BOUNDMAX: int = ...
402
+ IIS_BOUNDMIN: int = ...
403
+ IIS_CONSTRGUESS: int = ...
404
+ IIS_CONSTRMAX: int = ...
405
+ IIS_CONSTRMIN: int = ...
406
+ MAXMEMUSED: int = ...
407
+ MEMUSED: int = ...
408
+ MESSAGE: int = ...
409
+ MIP: int = ...
410
+ MIPNODE: int = ...
411
+ MIPNODE_BRVAR: int = ...
412
+ MIPNODE_NODCNT: int = ...
413
+ MIPNODE_OBJBND: int = ...
414
+ MIPNODE_OBJBST: int = ...
415
+ MIPNODE_OPENSCENARIOS: int = ...
416
+ MIPNODE_PHASE: int = ...
417
+ MIPNODE_REL: int = ...
418
+ MIPNODE_SOLCNT: int = ...
419
+ MIPNODE_STATUS: int = ...
420
+ MIPSOL: int = ...
421
+ MIPSOL_NODCNT: int = ...
422
+ MIPSOL_OBJ: int = ...
423
+ MIPSOL_OBJBND: int = ...
424
+ MIPSOL_OBJBST: int = ...
425
+ MIPSOL_OPENSCENARIOS: int = ...
426
+ MIPSOL_PHASE: int = ...
427
+ MIPSOL_SOL: int = ...
428
+ MIPSOL_SOLCNT: int = ...
429
+ MIP_CUTCNT: int = ...
430
+ MIP_ITRCNT: int = ...
431
+ MIP_NODCNT: int = ...
432
+ MIP_NODLFT: int = ...
433
+ MIP_OBJBND: int = ...
434
+ MIP_OBJBST: int = ...
435
+ MIP_OPENSCENARIOS: int = ...
436
+ MIP_PHASE: int = ...
437
+ MIP_SOLCNT: int = ...
438
+ MSG_STRING: int = ...
439
+ MULTIOBJ: int = ...
440
+ MULTIOBJ_OBJCNT: int = ...
441
+ MULTIOBJ_SOL: int = ...
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 = ...
459
+ POLLING: int = ...
460
+ PRESOLVE: int = ...
461
+ PRE_BNDCHG: int = ...
462
+ PRE_COECHG: int = ...
463
+ PRE_COLDEL: int = ...
464
+ PRE_ROWDEL: int = ...
465
+ PRE_SENCHG: int = ...
466
+ RUNTIME: int = ...
467
+ SIMPLEX: int = ...
468
+ SPX_DUALINF: int = ...
469
+ SPX_ISPERT: int = ...
470
+ SPX_ITRCNT: int = ...
471
+ SPX_OBJVAL: int = ...
472
+ SPX_PRIMINF: int = ...
473
+ WORK: int = ...
474
+
475
+ class Column:
476
+ @overload
477
+ def __init__(self) -> None: ...
478
+ @overload
479
+ def __init__(self, coeffs: float, constrs: Constr) -> None: ...
480
+ @overload
481
+ def __init__(
482
+ self,
483
+ coeffs: Sequence[float],
484
+ constrs: Sequence[Constr]
485
+ ) -> None: ...
486
+ @overload
487
+ def addTerms(self, coeffs: float, constrs: Constr) -> None: ...
488
+ @overload
489
+ def addTerms(
490
+ self,
491
+ coeffs: Sequence[float],
492
+ constrs: Sequence[Constr]
493
+ ) -> None: ...
494
+ def clear(self) -> None: ...
495
+ def copy(self) -> Column: ...
496
+ def getCoeff(self, i: int) -> float: ...
497
+ def getConstr(self, i: int) -> Constr: ...
498
+ @overload
499
+ def remove(self, which: int) -> None: ...
500
+ @overload
501
+ def remove(self, which: Constr) -> None: ...
502
+ def size(self) -> int: ...
503
+
504
+ class Constr:
505
+ BarPi: float = ...
506
+ CBasis: int = ...
507
+ CTag: str = ...
508
+ ConstrName: str = ...
509
+ DStart: float = ...
510
+ FarkasDual: float = ...
511
+ IISConstr: int = ...
512
+ IISConstrForce: int = ...
513
+ Lazy: int = ...
514
+ Pi: float = ...
515
+ RHS: float = ...
516
+ SARHSLow: float = ...
517
+ SARHSUp: float = ...
518
+ ScenNRHS: float = ...
519
+ Sense: str = ...
520
+ Slack: float = ...
521
+ def getAttr(self, attrname: str) -> Any: ...
522
+ def sameAs(self, other: Constr) -> bool: ...
523
+ @overload
524
+ def setAttr(self, attrname: str, newval: float) -> None: ...
525
+ @overload
526
+ def setAttr(self, attrname: str, newval: str) -> None: ...
527
+ @property
528
+ def index(self) -> int: ...
529
+
530
+ class Env:
531
+ def __init__(
532
+ self,
533
+ logfilename: str = ...,
534
+ empty: bool = False,
535
+ params: Optional[Mapping[str, _Scalar]] = None
536
+ ) -> None: ...
537
+ def close(self) -> None: ...
538
+ def dispose(self) -> None: ...
539
+ def readParams(self, filename: str) -> None: ...
540
+ def resetParams(self) -> None: ...
541
+ @overload
542
+ def setParam(self, paramname: str, newval: float) -> None: ...
543
+ @overload
544
+ def setParam(self, paramname: str, newval: str) -> None: ...
545
+ def getParam(self, paramname: str) -> Union[float, str]: ...
546
+ def start(self) -> Env: ...
547
+ def writeParams(self, filename: str) -> None: ...
548
+ def __enter__(self) -> Env: ...
549
+ def __exit__(
550
+ self,
551
+ exc_type: Optional[Type[BaseException]],
552
+ exc_value: Optional[BaseException],
553
+ traceback: Optional[TracebackType]
554
+ ) -> Optional[bool]: ...
555
+
556
+ class ErrorConstClass:
557
+ CALLBACK: int = ...
558
+ CLOUD: int = ...
559
+ CSWORKER: int = ...
560
+ DATA_NOT_AVAILABLE: int = ...
561
+ DUPLICATES: int = ...
562
+ EXCEED_2B_NONZEROS: int = ...
563
+ FAILED_TO_CREATE_MODEL: int = ...
564
+ FILE_READ: int = ...
565
+ FILE_WRITE: int = ...
566
+ IIS_NOT_INFEASIBLE: int = ...
567
+ INDEX_OUT_OF_RANGE: int = ...
568
+ INTERNAL: int = ...
569
+ INVALID_ARGUMENT: int = ...
570
+ INVALID_PIECEWISE_OBJ: int = ...
571
+ JOB_REJECTED: int = ...
572
+ MODEL_MODIFICATION: int = ...
573
+ NETWORK: int = ...
574
+ NODEFILE: int = ...
575
+ NOT_FOR_MIP: int = ...
576
+ NOT_IN_MODEL: int = ...
577
+ NOT_SUPPORTED: int = ...
578
+ NO_LICENSE: int = ...
579
+ NULL_ARGUMENT: int = ...
580
+ NUMERIC: int = ...
581
+ OPTIMIZATION_IN_PROGRESS: int = ...
582
+ OUT_OF_MEMORY: int = ...
583
+ QCP_EQUALITY_CONSTRAINT: int = ...
584
+ Q_NOT_PSD: int = ...
585
+ SIZE_LIMIT_EXCEEDED: int = ...
586
+ TUNE_MODEL_TYPES: int = ...
587
+ UNKNOWN_ATTRIBUTE: int = ...
588
+ UNKNOWN_PARAMETER: int = ...
589
+ UPDATEMODE_CHANGE: int = ...
590
+ VALUE_OUT_OF_RANGE: int = ...
591
+
592
+ class GRB:
593
+ Attr: AttrConstClass = ...
594
+ BASIC: int = ...
595
+ BATCH_ABORTED: int = ...
596
+ BATCH_COMPLETED: int = ...
597
+ BATCH_CREATED: int = ...
598
+ BATCH_FAILED: int = ...
599
+ BATCH_SUBMITTED: int = ...
600
+ BINARY: str = ...
601
+ CONTINUOUS: str = ...
602
+ CUTOFF: int = ...
603
+ CUTS_AGGRESSIVE: int = ...
604
+ CUTS_AUTO: int = ...
605
+ CUTS_CONSERVATIVE: int = ...
606
+ CUTS_OFF: int = ...
607
+ CUTS_VERYAGGRESSIVE: int = ...
608
+ Callback: CallbackClass = ...
609
+ DEFAULT_CS_PORT: int = ...
610
+ EQUAL: str = ...
611
+ ERROR_CALLBACK: int = ...
612
+ ERROR_CLOUD: int = ...
613
+ ERROR_CSWORKER: int = ...
614
+ ERROR_DATA_NOT_AVAILABLE: int = ...
615
+ ERROR_DUPLICATES: int = ...
616
+ ERROR_EXCEED_2B_NONZEROS: int = ...
617
+ ERROR_FAILED_TO_CREATE_MODEL: int = ...
618
+ ERROR_FILE_READ: int = ...
619
+ ERROR_FILE_WRITE: int = ...
620
+ ERROR_IIS_NOT_INFEASIBLE: int = ...
621
+ ERROR_INDEX_OUT_OF_RANGE: int = ...
622
+ ERROR_INTERNAL: int = ...
623
+ ERROR_INVALID_ARGUMENT: int = ...
624
+ ERROR_INVALID_PIECEWISE_OBJ: int = ...
625
+ ERROR_JOB_REJECTED: int = ...
626
+ ERROR_MODEL_MODIFICATION: int = ...
627
+ ERROR_NETWORK: int = ...
628
+ ERROR_NODEFILE: int = ...
629
+ ERROR_NOT_FOR_MIP: int = ...
630
+ ERROR_NOT_IN_MODEL: int = ...
631
+ ERROR_NOT_SUPPORTED: int = ...
632
+ ERROR_NO_LICENSE: int = ...
633
+ ERROR_NULL_ARGUMENT: int = ...
634
+ ERROR_NUMERIC: int = ...
635
+ ERROR_OPTIMIZATION_IN_PROGRESS: int = ...
636
+ ERROR_OUT_OF_MEMORY: int = ...
637
+ ERROR_QCP_EQUALITY_CONSTRAINT: int = ...
638
+ ERROR_Q_NOT_PSD: int = ...
639
+ ERROR_SECURITY: int = ...
640
+ ERROR_SIZE_LIMIT_EXCEEDED: int = ...
641
+ ERROR_TUNE_MODEL_TYPES: int = ...
642
+ ERROR_UNKNOWN_ATTRIBUTE: int = ...
643
+ ERROR_UNKNOWN_PARAMETER: int = ...
644
+ ERROR_UPDATEMODE_CHANGE: int = ...
645
+ ERROR_VALUE_OUT_OF_RANGE: int = ...
646
+ Error: ErrorConstClass = ...
647
+ FEASRELAX_CARDINALITY: int = ...
648
+ FEASRELAX_LINEAR: int = ...
649
+ FEASRELAX_QUADRATIC: int = ...
650
+ GENCONSTR_ABS: int = ...
651
+ GENCONSTR_AND: int = ...
652
+ GENCONSTR_COS: int = ...
653
+ GENCONSTR_EXP: int = ...
654
+ GENCONSTR_EXPA: int = ...
655
+ GENCONSTR_INDICATOR: int = ...
656
+ GENCONSTR_LOG: int = ...
657
+ GENCONSTR_LOGA: int = ...
658
+ GENCONSTR_LOGISTIC: int = ...
659
+ GENCONSTR_MAX: int = ...
660
+ GENCONSTR_MIN: int = ...
661
+ GENCONSTR_NORM: int = ...
662
+ GENCONSTR_OR: int = ...
663
+ GENCONSTR_POLY: int = ...
664
+ GENCONSTR_POW: int = ...
665
+ GENCONSTR_PWL: int = ...
666
+ GENCONSTR_SIN: int = ...
667
+ GENCONSTR_TAN: int = ...
668
+ GREATER_EQUAL: str = ...
669
+ INFEASIBLE: int = ...
670
+ INFINITY: float = ...
671
+ INF_OR_UNBD: int = ...
672
+ INPROGRESS: int = ...
673
+ INTEGER: str = ...
674
+ INTERRUPTED: int = ...
675
+ ITERATION_LIMIT: int = ...
676
+ LESS_EQUAL: str = ...
677
+ LOADED: int = ...
678
+ MAXIMIZE: int = ...
679
+ MAXINT: int = ...
680
+ MAX_CONCURRENT: int = ...
681
+ MAX_NAMELEN: int = ...
682
+ MAX_STRLEN: int = ...
683
+ MAX_TAGLEN: int = ...
684
+ MEM_LIMIT: int = ...
685
+ METHOD_AUTO: int = ...
686
+ METHOD_BARRIER: int = ...
687
+ METHOD_CONCURRENT: int = ...
688
+ METHOD_DETERMINISTIC_CONCURRENT: int = ...
689
+ METHOD_DETERMINISTIC_CONCURRENT_SIMPLEX: int = ...
690
+ METHOD_DUAL: int = ...
691
+ METHOD_NONE: int = ...
692
+ METHOD_PDHG: int = ...
693
+ METHOD_PRIMAL: int = ...
694
+ MINIMIZE: int = ...
695
+ NODE_LIMIT: int = ...
696
+ NONBASIC_LOWER: int = ...
697
+ NONBASIC_UPPER: int = ...
698
+ NUMERIC: int = ...
699
+ OPTIMAL: int = ...
700
+ PHASE_MIP_IMPROVE: int = ...
701
+ PHASE_MIP_NOREL: int = ...
702
+ PHASE_MIP_SEARCH: int = ...
703
+ Param: ParamConstClass = ...
704
+ SEMICONT: str = ...
705
+ SEMIINT: str = ...
706
+ SOLUTION_LIMIT: int = ...
707
+ SOS_TYPE1: int = ...
708
+ SOS_TYPE2: int = ...
709
+ SUBOPTIMAL: int = ...
710
+ SUPERBASIC: int = ...
711
+ Status: StatusConstClass = ...
712
+ TIME_LIMIT: int = ...
713
+ UNBOUNDED: int = ...
714
+ UNDEFINED: float = ...
715
+ USER_OBJ_LIMIT: int = ...
716
+ VERSION_MAJOR: int = ...
717
+ VERSION_MINOR: int = ...
718
+ VERSION_TECHNICAL: int = ...
719
+ WORK_LIMIT: int = ...
720
+ attr: AttrConstClass = ...
721
+ callback: CallbackClass = ...
722
+ error: ErrorConstClass = ...
723
+ param: ParamConstClass = ...
724
+ status: StatusConstClass = ...
725
+
726
+ class GenConstr:
727
+ FuncNonlinear: int = ...
728
+ FuncPieceError: float = ...
729
+ FuncPieceLength: float = ...
730
+ FuncPieceRatio: float = ...
731
+ FuncPieces: int = ...
732
+ GenConstrType: int = ...
733
+ GenConstrName: str = ...
734
+ IISGenConstr: int = ...
735
+ IISGenConstrForce: int = ...
736
+ def getAttr(self, attrname: str) -> Any: ...
737
+ @overload
738
+ def setAttr(self, attrname: str, newval: float) -> None: ...
739
+ @overload
740
+ def setAttr(self, attrname: str, newval: str) -> None: ...
741
+
742
+ class GenExpr: ...
743
+
744
+ class GenExprAbs(GenExpr): ...
745
+
746
+ class GenExprAnd(GenExpr): ...
747
+
748
+ class GenExprMax(GenExpr): ...
749
+
750
+ class GenExprMin(GenExpr): ...
751
+
752
+ class GenExprNorm(GenExpr): ...
753
+
754
+ class GenExprOr(GenExpr): ...
755
+
756
+ class GurobiError(Exception):
757
+ errno: int = ...
758
+ message: str = ...
759
+
760
+ class LinExpr:
761
+ @overload
762
+ def __init__(
763
+ self,
764
+ arg1: float = 0.0,
765
+ arg2: Optional[Var] = None
766
+ ) -> None: ...
767
+ @overload
768
+ def __init__(self, arg1: Var) -> None: ...
769
+ @overload
770
+ def __init__(self, arg1: LinExpr) -> None: ...
771
+ @overload
772
+ def __init__(self, arg1: Sequence[float], arg2: Sequence[Var]) -> None: ...
773
+ @overload
774
+ def __init__(self, arg1: Sequence[Tuple[float, Var]]) -> None: ...
775
+ @overload
776
+ def add(self, arg1: float, mult: float = 1.0) -> None: ...
777
+ @overload
778
+ def add(self, arg1: Var, mult: float = 1.0) -> None: ...
779
+ @overload
780
+ def add(self, arg1: LinExpr, mult: float = 1.0) -> None: ...
781
+ def addConstant(self, __constant: float) -> None: ...
782
+ @overload
783
+ def addTerms(self, newcoeffs: float, newvars: Var) -> None: ...
784
+ @overload
785
+ def addTerms(
786
+ self,
787
+ newcoeffs: Sequence[float],
788
+ newvars: Sequence[Var]
789
+ ) -> None: ...
790
+ def clear(self) -> None: ...
791
+ def copy(self) -> LinExpr: ...
792
+ def getCoeff(self, __i: int) -> float: ...
793
+ def getConstant(self) -> float: ...
794
+ def getValue(self) -> float: ...
795
+ def getVar(self, __i: int) -> Var: ...
796
+ @overload
797
+ def remove(self, __which: int) -> None: ...
798
+ @overload
799
+ def remove(self, __which: Var) -> None: ...
800
+ def size(self) -> int: ...
801
+ @overload
802
+ def __add__(self, __expr: float) -> LinExpr: ...
803
+ @overload
804
+ def __add__(self, __expr: Var) -> LinExpr: ...
805
+ @overload
806
+ def __add__(self, __expr: LinExpr) -> LinExpr: ...
807
+ # used as constraint sense, not comparison
808
+ @overload # type: ignore[override]
809
+ def __eq__(self, __rhs: float) -> TempLConstr: ...
810
+ @overload
811
+ def __eq__(self, __rhs: Var) -> TempLConstr: ...
812
+ @overload
813
+ def __eq__(self, __rhs: LinExpr) -> TempLConstr: ...
814
+ @overload
815
+ def __eq__(self, __rhs: QuadExpr) -> TempQConstr: ...
816
+ @overload
817
+ def __eq__(self, rhs: Sequence[float]) -> TempLConstr: ...
818
+ @overload
819
+ def __ge__(self, __rhs: float) -> TempLConstr: ...
820
+ @overload
821
+ def __ge__(self, __rhs: Var) -> TempLConstr: ...
822
+ @overload
823
+ def __ge__(self, __rhs: LinExpr) -> TempLConstr: ...
824
+ @overload
825
+ def __ge__(self, __rhs: QuadExpr) -> TempQConstr: ...
826
+ @overload
827
+ def __iadd__(self, __expr: float) -> LinExpr: ...
828
+ @overload
829
+ def __iadd__(self, __expr: Var) -> LinExpr: ...
830
+ @overload
831
+ def __iadd__(self, __expr: LinExpr) -> LinExpr: ...
832
+ @overload
833
+ def __imul__(self, __expr: float) -> LinExpr: ...
834
+ @overload
835
+ def __imul__(self, __expr: Var) -> QuadExpr: ...
836
+ @overload
837
+ def __imul__(self, __expr: LinExpr) -> QuadExpr: ...
838
+ @overload
839
+ def __imul__(self, __expr: QuadExpr) -> NLExpr: ...
840
+ @overload
841
+ def __isub__(self, __expr: float) -> LinExpr: ...
842
+ @overload
843
+ def __isub__(self, __expr: Var) -> LinExpr: ...
844
+ @overload
845
+ def __isub__(self, __expr: LinExpr) -> LinExpr: ...
846
+ @overload
847
+ def __le__(self, __rhs: float) -> TempLConstr: ...
848
+ @overload
849
+ def __le__(self, __rhs: Var) -> TempLConstr: ...
850
+ @overload
851
+ def __le__(self, __rhs: LinExpr) -> TempLConstr: ...
852
+ @overload
853
+ def __le__(self, __rhs: QuadExpr) -> TempQConstr: ...
854
+ @overload
855
+ def __mul__(self, __expr: float) -> LinExpr: ...
856
+ @overload
857
+ def __mul__(self, __expr: Var) -> QuadExpr: ...
858
+ @overload
859
+ def __mul__(self, __expr: LinExpr) -> QuadExpr: ...
860
+ @overload
861
+ def __mul__(self, expr: QuadExpr) -> NLExpr: ...
862
+ def __neg__(self) -> LinExpr: ...
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: ...
872
+ @overload
873
+ def __radd__(self, __expr: float) -> LinExpr: ...
874
+ @overload
875
+ def __radd__(self, __expr: Var) -> LinExpr: ...
876
+ @overload
877
+ def __radd__(self, __expr: LinExpr) -> LinExpr: ...
878
+ @overload
879
+ def __rmul__(self, __expr: float) -> LinExpr: ...
880
+ @overload
881
+ def __rmul__(self, __expr: Var) -> QuadExpr: ...
882
+ @overload
883
+ def __rmul__(self, __expr: LinExpr) -> QuadExpr: ...
884
+ @overload
885
+ def __rsub__(self, __expr: float) -> LinExpr: ...
886
+ @overload
887
+ def __rsub__(self, __expr: Var) -> LinExpr: ...
888
+ @overload
889
+ def __rsub__(self, __expr: LinExpr) -> LinExpr: ...
890
+ @overload
891
+ def __sub__(self, __expr: float) -> LinExpr: ...
892
+ @overload
893
+ def __sub__(self, __expr: Var) -> LinExpr: ...
894
+ @overload
895
+ def __sub__(self, __expr: LinExpr) -> 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: ...
901
+
902
+ class MConstr:
903
+ BarPi: float = ...
904
+ CBasis: int = ...
905
+ CTag: str = ...
906
+ ConstrName: str = ...
907
+ DStart: float = ...
908
+ FarkasDual: float = ...
909
+ IISConstr: int = ...
910
+ IISConstrForce: int = ...
911
+ Lazy: int = ...
912
+ Pi: float = ...
913
+ RHS: float = ...
914
+ SARHSLow: float = ...
915
+ SARHSUp: float = ...
916
+ ScenNRHS: float = ...
917
+ Sense: str = ...
918
+ Slack: float = ...
919
+ @classmethod
920
+ def fromlist(cls, varlist: List[Constr]) -> MConstr: ...
921
+ def getAttr(self, attrname: str) -> np.ndarray: ...
922
+ @overload
923
+ def setAttr(self, attrname: str, value: float) -> None: ...
924
+ @overload
925
+ def setAttr(self, attrname: str, value: str) -> None: ...
926
+ @overload
927
+ def setAttr(self, attrname: str, value: np.ndarray) -> None: ...
928
+ def tolist(self) -> List[Constr]: ...
929
+ @property
930
+ def ndim(self) -> int: ...
931
+ @property
932
+ def shape(self) -> Tuple[int, ...]: ...
933
+ @property
934
+ def size(self) -> int: ...
935
+
936
+ class MQConstr:
937
+ QConstrName: str = ...
938
+ QCRHS: float = ...
939
+ QCSense: str = ...
940
+ QCSlack: float = ...
941
+ @classmethod
942
+ def fromlist(cls, varlist: List[QConstr]) -> MQConstr: ...
943
+ def getAttr(self, attrname: str) -> np.ndarray: ...
944
+ @overload
945
+ def setAttr(self, attrname: str, value: float) -> None: ...
946
+ @overload
947
+ def setAttr(self, attrname: str, value: str) -> None: ...
948
+ @overload
949
+ def setAttr(self, attrname: str, value: np.ndarray) -> None: ...
950
+ def tolist(self) -> List[QConstr]: ...
951
+ @property
952
+ def ndim(self) -> int: ...
953
+ @property
954
+ def shape(self) -> Tuple[int, ...]: ...
955
+ @property
956
+ def size(self) -> int: ...
957
+
958
+ class MGenConstr:
959
+ GenConstrName: str = ...
960
+
961
+ class MLinExpr:
962
+ @classmethod
963
+ def zeros(self, shape: _ShapeLike) -> MLinExpr: ...
964
+ def copy(self) -> MLinExpr: ...
965
+ def getValue(self) -> np.ndarray: ...
966
+ @overload
967
+ def __add__(self, other: _ConstComponent) -> MLinExpr: ...
968
+ @overload
969
+ def __add__(self, other: _LinearComponent) -> MLinExpr: ...
970
+ # used as constraint sense, not comparison
971
+ @overload # type: ignore[override]
972
+ def __eq__(self, other: _ConstComponent) -> TempMConstr: ...
973
+ @overload
974
+ def __eq__(self, other: _LinearComponent) -> TempMConstr: ...
975
+ @overload
976
+ def __ge__(self, other: Union[float, int]) -> TempMConstr: ...
977
+ @overload
978
+ def __ge__(self, other: _LinearComponent) -> TempMConstr: ...
979
+ # unsafely overlaps with ndarray.__le__
980
+ @overload
981
+ def __ge__( # type: ignore[misc]
982
+ self,
983
+ other: np.ndarray
984
+ ) -> TempMConstr: ...
985
+ def __getitem__(self, obj: _IndexLike) -> MLinExpr: ...
986
+ @overload
987
+ def __iadd__(self, other: _ConstComponent) -> MLinExpr: ...
988
+ @overload
989
+ def __iadd__(self, other: _LinearComponent) -> MLinExpr: ...
990
+ @overload
991
+ def __imul__(self, other: _ConstComponent) -> MLinExpr: ...
992
+ @overload
993
+ def __imul__(self, other: _LinearComponent) -> MQuadExpr: ...
994
+ @overload
995
+ def __isub__(self, other: _ConstComponent) -> MLinExpr: ...
996
+ @overload
997
+ def __isub__(self, other: _LinearComponent) -> MLinExpr: ...
998
+ # (Accurate) inconsistency with truediv
999
+ def __itruediv__( # type: ignore[misc]
1000
+ self,
1001
+ other: _ConstComponent
1002
+ ) -> MLinExpr: ...
1003
+ @overload
1004
+ def __le__(self, other: Union[float, int]) -> TempMConstr: ...
1005
+ @overload
1006
+ def __le__(self, other: _LinearComponent) -> TempMConstr: ...
1007
+ # unsafely overlaps with ndarray.__ge__
1008
+ @overload
1009
+ def __le__( # type: ignore[misc]
1010
+ self,
1011
+ other: np.ndarray
1012
+ ) -> TempMConstr: ...
1013
+ @overload
1014
+ def __matmul__(self, other: MVar) -> MQuadExpr: ...
1015
+ @overload
1016
+ def __matmul__(self, other: MLinExpr) -> MQuadExpr: ...
1017
+ @overload
1018
+ def __matmul__(self, other: np.ndarray) -> MLinExpr: ...
1019
+ @overload
1020
+ def __mul__(self, other: _ConstComponent) -> MLinExpr: ...
1021
+ @overload
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: ...
1037
+ def __neg__(self) -> MLinExpr: ...
1038
+ # Unsafe overlap with numpy
1039
+ @overload
1040
+ def __radd__( # type: ignore[misc]
1041
+ self,
1042
+ other: _ConstComponent
1043
+ ) -> MLinExpr: ...
1044
+ @overload
1045
+ def __radd__(self, other: _LinearComponent) -> MLinExpr: ...
1046
+ @overload
1047
+ def __rmatmul__(self, other: MVar) -> MQuadExpr: ...
1048
+ @overload
1049
+ def __rmatmul__(self, other: MLinExpr) -> MQuadExpr: ...
1050
+ # Unsafe overlap with numpy
1051
+ @overload
1052
+ def __rmatmul__( # type: ignore[misc]
1053
+ self,
1054
+ other: np.ndarray
1055
+ ) -> MQuadExpr: ...
1056
+ # Unsafe overlap with numpy
1057
+ @overload
1058
+ def __rmul__( # type: ignore[misc]
1059
+ self,
1060
+ other: _ConstComponent
1061
+ ) -> MLinExpr: ...
1062
+ @overload
1063
+ def __rmul__(self, other: _LinearComponent) -> MQuadExpr: ...
1064
+ # Unsafe overlap with numpy
1065
+ @overload
1066
+ def __rsub__( # type: ignore[misc]
1067
+ self,
1068
+ other: _ConstComponent
1069
+ ) -> MLinExpr: ...
1070
+ @overload
1071
+ def __rsub__(self, other: _LinearComponent) -> MLinExpr: ...
1072
+ @overload
1073
+ def __sub__(self, other: _ConstComponent) -> MLinExpr: ...
1074
+ @overload
1075
+ def __sub__(self, other: _LinearComponent) -> MLinExpr: ...
1076
+ @overload
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: ...
1088
+ @property
1089
+ def ndim(self) -> int: ...
1090
+ @property
1091
+ def shape(self) -> Tuple[int, ...]: ...
1092
+ @property
1093
+ def size(self) -> int: ...
1094
+ def clear(self) -> None: ...
1095
+ @overload
1096
+ def sum(self) -> MLinExpr: ...
1097
+ @overload
1098
+ def sum(self, axis: int) -> MLinExpr: ...
1099
+ def item(self) -> LinExpr: ...
1100
+
1101
+ class MQuadExpr:
1102
+ @classmethod
1103
+ def zeros(self, shape: _ShapeLike) -> MQuadExpr: ...
1104
+ def copy(self) -> MQuadExpr: ...
1105
+ def getValue(self) -> np.ndarray: ...
1106
+ @overload
1107
+ def __add__(self, other: _ConstComponent) -> MQuadExpr: ...
1108
+ @overload
1109
+ def __add__(self, other: _LinearComponent) -> MQuadExpr: ...
1110
+ @overload
1111
+ def __add__(self, other: _QuadComponent) -> MQuadExpr: ...
1112
+ # used as constraint sense, not comparison
1113
+ @overload # type: ignore[override]
1114
+ def __eq__(self, other: _ConstComponent) -> TempMQConstr: ...
1115
+ @overload
1116
+ def __eq__(self, other: _LinearComponent) -> TempMQConstr: ...
1117
+ @overload
1118
+ def __eq__(self, other: _QuadComponent) -> TempMQConstr: ...
1119
+ @overload
1120
+ def __ge__(self, other: Union[float, int]) -> TempMQConstr: ...
1121
+ # unsafe overlap with ndarray.__le__
1122
+ @overload
1123
+ def __ge__( # type: ignore[misc]
1124
+ self,
1125
+ other: np.ndarray
1126
+ ) -> TempMQConstr: ...
1127
+ @overload
1128
+ def __ge__(self, other: _LinearComponent) -> TempMQConstr: ...
1129
+ @overload
1130
+ def __ge__(self, other: _QuadComponent) -> TempMQConstr: ...
1131
+ def __getitem__(self, obj: _IndexLike) -> MQuadExpr: ...
1132
+ @overload
1133
+ def __iadd__(self, other: _ConstComponent) -> MQuadExpr: ...
1134
+ @overload
1135
+ def __iadd__(self, other: _LinearComponent) -> MQuadExpr: ...
1136
+ @overload
1137
+ def __iadd__(self, other: _QuadComponent) -> MQuadExpr: ...
1138
+ # (Accurate) inconsistency with truediv
1139
+ def __imul__( # type: ignore[misc]
1140
+ self,
1141
+ other: _ConstComponent
1142
+ ) -> MQuadExpr: ...
1143
+ @overload
1144
+ def __isub__(self, other: _ConstComponent) -> MQuadExpr: ...
1145
+ @overload
1146
+ def __isub__(self, other: _LinearComponent) -> MQuadExpr: ...
1147
+ @overload
1148
+ def __isub__(self, other: _QuadComponent) -> MQuadExpr: ...
1149
+ @overload
1150
+ def __le__(self, other: Union[float, int]) -> TempMQConstr: ...
1151
+ # unsafe overlap with ndarray.__le__
1152
+ @overload
1153
+ def __le__( # type: ignore[misc]
1154
+ self,
1155
+ other: np.ndarray
1156
+ ) -> TempMQConstr: ...
1157
+ @overload
1158
+ def __le__(self, other: _LinearComponent) -> TempMQConstr: ...
1159
+ @overload
1160
+ def __le__(self, other: _QuadComponent) -> TempMQConstr: ...
1161
+ @overload
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: ...
1195
+ def __neg__(self) -> MQuadExpr: ...
1196
+ # Unsafe overlap with numpy
1197
+ @overload
1198
+ def __radd__( # type: ignore[misc]
1199
+ self,
1200
+ other: _ConstComponent
1201
+ ) -> MQuadExpr: ...
1202
+ @overload
1203
+ def __radd__(self, other: _LinearComponent) -> MQuadExpr: ...
1204
+ @overload
1205
+ def __radd__(self, other: _QuadComponent) -> MQuadExpr: ...
1206
+ # Unsafe overlap with numpy
1207
+ @overload
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: ...
1220
+ @overload
1221
+ def __rsub__(self, other: _LinearComponent) -> MQuadExpr: ...
1222
+ @overload
1223
+ def __rsub__(self, other: _QuadComponent) -> MQuadExpr: ...
1224
+ @overload
1225
+ def __sub__(self, other: _ConstComponent) -> MQuadExpr: ...
1226
+ @overload
1227
+ def __sub__(self, other: _LinearComponent) -> MQuadExpr: ...
1228
+ @overload
1229
+ def __sub__(self, other: _QuadComponent) -> MQuadExpr: ...
1230
+ @property
1231
+ def ndim(self) -> int: ...
1232
+ @property
1233
+ def shape(self) -> Tuple[int, ...]: ...
1234
+ @property
1235
+ def size(self) -> int: ...
1236
+ def clear(self) -> None: ...
1237
+ @overload
1238
+ def sum(self) -> MQuadExpr: ...
1239
+ @overload
1240
+ def sum(self, axis: int) -> MQuadExpr: ...
1241
+ def item(self) -> QuadExpr: ...
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
+
1312
+ class MVar:
1313
+ BarX: float = ...
1314
+ BranchPriority: int = ...
1315
+ IISLB: int = ...
1316
+ IISLBForce: int = ...
1317
+ IISUB: int = ...
1318
+ IISUBForce: int = ...
1319
+ LB: float = ...
1320
+ Obj: float = ...
1321
+ ObjN: float = ...
1322
+ PStart: float = ...
1323
+ PWLObjCvx: int = ...
1324
+ Partition: int = ...
1325
+ PoolIgnore: int = ...
1326
+ PoolNX: float = ...
1327
+ RC: float = ...
1328
+ SALBLow: float = ...
1329
+ SALBUp: float = ...
1330
+ SAObjLow: float = ...
1331
+ SAObjUp: float = ...
1332
+ SAUBLow: float = ...
1333
+ SAUBUp: float = ...
1334
+ ScenNLB: float = ...
1335
+ ScenNObj: float = ...
1336
+ ScenNUB: float = ...
1337
+ ScenNX: float = ...
1338
+ Start: float = ...
1339
+ UB: float = ...
1340
+ UnbdRay: float = ...
1341
+ VBasis: int = ...
1342
+ VTag: str = ...
1343
+ VType: str = ...
1344
+ VarHintPri: int = ...
1345
+ VarHintVal: float = ...
1346
+ VarName: str = ...
1347
+ X: float = ...
1348
+ Xn: float = ...
1349
+ @classmethod
1350
+ def fromvar(cls, var: Var) -> MVar: ...
1351
+ @classmethod
1352
+ def fromlist(cls, varlist: List[Var]) -> MVar: ...
1353
+ def copy(self) -> MVar: ...
1354
+ def getAttr(self, attrname: str) -> np.ndarray: ...
1355
+ @overload
1356
+ def setAttr(self, attrname: str, value: float) -> None: ...
1357
+ @overload
1358
+ def setAttr(self, attrname: str, value: str) -> None: ...
1359
+ @overload
1360
+ def setAttr(self, attrname: str, value: np.ndarray) -> None: ...
1361
+ @overload
1362
+ def sum(self) -> MLinExpr: ...
1363
+ @overload
1364
+ def sum(self, axis: int) -> MLinExpr: ...
1365
+ def tolist(self) -> List[Var]: ...
1366
+ @overload
1367
+ def __add__(self, other: _ConstComponent) -> MLinExpr: ...
1368
+ @overload
1369
+ def __add__(self, other: _LinearComponent) -> MLinExpr: ...
1370
+ # used as constraint sense, not comparison
1371
+ @overload # type: ignore[override]
1372
+ def __eq__(self, other: _ConstComponent) -> TempMConstr: ...
1373
+ @overload
1374
+ def __eq__(self, other: _LinearComponent) -> TempMConstr: ...
1375
+ @overload
1376
+ def __eq__(self, other: MNLExpr) -> TempMGenConstr: ...
1377
+ @overload
1378
+ def __ge__(self, other: Union[float, int]) -> TempMConstr: ...
1379
+ @overload
1380
+ def __ge__(self, other: _LinearComponent) -> TempMConstr: ...
1381
+ # unsafely overlaps with ndarray.__le__
1382
+ @overload
1383
+ def __ge__( # type: ignore[misc]
1384
+ self,
1385
+ other: np.ndarray
1386
+ ) -> TempMConstr: ...
1387
+ def __getitem__(self, obj: _IndexLike) -> MVar: ...
1388
+ # (Accurate) inconsistency with truediv
1389
+ def __itruediv__( # type: ignore[misc]
1390
+ self,
1391
+ other: _ConstComponent
1392
+ ) -> MLinExpr: ...
1393
+ @overload
1394
+ def __le__(self, other: Union[float, int]) -> TempMConstr: ...
1395
+ @overload
1396
+ def __le__(self, other: _LinearComponent) -> TempMConstr: ...
1397
+ # unsafely overlaps with ndarray.__ge__
1398
+ @overload
1399
+ def __le__( # type: ignore[misc]
1400
+ self,
1401
+ other: np.ndarray
1402
+ ) -> TempMConstr: ...
1403
+ @overload
1404
+ def __matmul__(self, other: MVar) -> MQuadExpr: ...
1405
+ @overload
1406
+ def __matmul__(self, other: MLinExpr) -> MQuadExpr: ...
1407
+ @overload
1408
+ def __matmul__(self, other: np.ndarray) -> MLinExpr: ...
1409
+ @overload
1410
+ def __mul__(self, other: _ConstComponent) -> MLinExpr: ...
1411
+ @overload
1412
+ def __mul__(self, other: _LinearComponent) -> MQuadExpr: ...
1413
+ def __neg__(self) -> MLinExpr: ...
1414
+ def __pos__(self) -> MVar: ...
1415
+ @overload
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: ...
1432
+ @overload
1433
+ def __radd__(self, other: _LinearComponent) -> MLinExpr: ...
1434
+ @overload
1435
+ def __rmatmul__(self, other: MLinExpr) -> MQuadExpr: ...
1436
+ @overload
1437
+ def __rmatmul__(self, other: MVar) -> MQuadExpr: ...
1438
+ # Unsafe overlap with numpy
1439
+ @overload
1440
+ def __rmatmul__( # type: ignore[misc]
1441
+ self,
1442
+ other: np.ndarray
1443
+ ) -> MLinExpr: ...
1444
+ # Unsafe overlap with numpy
1445
+ @overload
1446
+ def __rmul__( # type: ignore[misc]
1447
+ self,
1448
+ other: _ConstComponent
1449
+ ) -> MLinExpr: ...
1450
+ @overload
1451
+ def __rmul__(self, other: _LinearComponent) -> MQuadExpr: ...
1452
+ @overload
1453
+ def __rsub__(self, other: _LinearComponent) -> MLinExpr: ...
1454
+ # Unsafe overlap with numpy
1455
+ @overload
1456
+ def __rsub__( # type: ignore[misc]
1457
+ self,
1458
+ other: _ConstComponent
1459
+ ) -> MLinExpr: ...
1460
+ @overload
1461
+ def __sub__(self, other: _LinearComponent) -> MLinExpr: ...
1462
+ @overload
1463
+ def __sub__(self, other: _ConstComponent) -> MLinExpr: ...
1464
+ @overload
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: ...
1473
+ @property
1474
+ def ndim(self) -> int: ...
1475
+ @property
1476
+ def shape(self) -> Tuple[int, ...]: ...
1477
+ @property
1478
+ def size(self) -> int: ...
1479
+ def transpose(self) -> MVar: ...
1480
+ @property
1481
+ def T(self) -> MVar: ...
1482
+ def reshape(self, shape: _ShapeLike) -> MVar: ...
1483
+ def item(self) -> Var: ...
1484
+ @overload
1485
+ def diagonal(self) -> MVar: ...
1486
+ @overload
1487
+ def diagonal(self, k: int) -> MVar: ...
1488
+
1489
+ class Model:
1490
+ BarIterCount: int = ...
1491
+ PDHGIterCount: int = ...
1492
+ BoundSVio: float = ...
1493
+ BoundSVioIndex: int = ...
1494
+ BoundSVioSum: float = ...
1495
+ BoundVio: float = ...
1496
+ BoundVioIndex: int = ...
1497
+ BoundVioSum: float = ...
1498
+ ComplVio: float = ...
1499
+ ComplVioIndex: int = ...
1500
+ ComplVioSum: float = ...
1501
+ ConcurrentWinMethod: int = ...
1502
+ ConstrResidual: float = ...
1503
+ ConstrResidualIndex: int = ...
1504
+ ConstrResidualSum: float = ...
1505
+ ConstrSResidual: float = ...
1506
+ ConstrSResidualIndex: int = ...
1507
+ ConstrSResidualSum: float = ...
1508
+ ConstrSVio: float = ...
1509
+ ConstrSVioIndex: int = ...
1510
+ ConstrSVioSum: float = ...
1511
+ ConstrVio: float = ...
1512
+ ConstrVioIndex: int = ...
1513
+ ConstrVioSum: float = ...
1514
+ DNumNZs: float = ...
1515
+ DualResidual: float = ...
1516
+ DualResidualIndex: int = ...
1517
+ DualResidualSum: float = ...
1518
+ DualSResidual: float = ...
1519
+ DualSResidualIndex: int = ...
1520
+ DualSResidualSum: float = ...
1521
+ DualSVio: float = ...
1522
+ DualSVioIndex: int = ...
1523
+ DualSVioSum: float = ...
1524
+ DualVio: float = ...
1525
+ DualVioIndex: int = ...
1526
+ DualVioSum: float = ...
1527
+ FarkasProof: float = ...
1528
+ Fingerprint: int = ...
1529
+ IISMinimal: int = ...
1530
+ IntVio: float = ...
1531
+ IntVioIndex: int = ...
1532
+ IntVioSum: float = ...
1533
+ IsMIP: int = ...
1534
+ IsMultiObj: int = ...
1535
+ IsQCP: int = ...
1536
+ IsQP: int = ...
1537
+ IterCount: float = ...
1538
+ Kappa: float = ...
1539
+ KappaExact: float = ...
1540
+ LicenseExpiration: int = ...
1541
+ MIPGap: float = ...
1542
+ MaxBound: float = ...
1543
+ MaxCoeff: float = ...
1544
+ MaxMemUsed: float = ...
1545
+ MaxObjCoeff: float = ...
1546
+ MaxQCCoeff: float = ...
1547
+ MaxQCLCoeff: float = ...
1548
+ MaxQCRHS: float = ...
1549
+ MaxQObjCoeff: float = ...
1550
+ MaxRHS: float = ...
1551
+ MaxVio: float = ...
1552
+ MemUsed: float = ...
1553
+ MinBound: float = ...
1554
+ MinCoeff: float = ...
1555
+ MinObjCoeff: float = ...
1556
+ MinQCCoeff: float = ...
1557
+ MinQCLCoeff: float = ...
1558
+ MinQCRHS: float = ...
1559
+ MinQObjCoeff: float = ...
1560
+ MinRHS: float = ...
1561
+ ModelName: str = ...
1562
+ ModelSense: int = ...
1563
+ NLBarIterCount: int = ...
1564
+ NodeCount: float = ...
1565
+ NumBinVars: int = ...
1566
+ NumConstrs: int = ...
1567
+ NumGenConstrs: int = ...
1568
+ NumIntVars: int = ...
1569
+ NumNZs: int = ...
1570
+ NumObj: int = ...
1571
+ NumObjPasses: int = ...
1572
+ NumPWLObjVars: int = ...
1573
+ NumQCNZs: int = ...
1574
+ NumQConstrs: int = ...
1575
+ NumQNZs: int = ...
1576
+ NumSOS: int = ...
1577
+ NumScenarios: int = ...
1578
+ NumStart: int = ...
1579
+ NumVars: int = ...
1580
+ ObjBound: float = ...
1581
+ ObjBoundC: float = ...
1582
+ ObjCon: float = ...
1583
+ ObjNAbsTol: float = ...
1584
+ ObjNCon: float = ...
1585
+ ObjNPass: int = ...
1586
+ ObjNPassIterCount: float = ...
1587
+ ObjNPassMIPGap: float = ...
1588
+ ObjNPassNodeCount: float = ...
1589
+ ObjNName: str = ...
1590
+ ObjNPassObjBound: float = ...
1591
+ ObjNPassObjVal: float = ...
1592
+ ObjNPassOpenNodeCount: float = ...
1593
+ ObjNPriority: int = ...
1594
+ ObjNRelTol: float = ...
1595
+ ObjNPassRuntime: float = ...
1596
+ ObjNPassStatus: int = ...
1597
+ ObjNVal: float = ...
1598
+ ObjNWeight: float = ...
1599
+ ObjNPassWork: float = ...
1600
+ ObjVal: float = ...
1601
+ OpenNodeCount: float = ...
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 = ...
1614
+ PoolObjBound: float = ...
1615
+ PoolObjVal: float = ...
1616
+ Runtime: float = ...
1617
+ Work: float = ...
1618
+ ScenNName: str = ...
1619
+ ScenNObjBound: float = ...
1620
+ ScenNObjVal: float = ...
1621
+ Server: str = ...
1622
+ SolCount: int = ...
1623
+ Status: int = ...
1624
+ TuneResultCount: int = ...
1625
+ params: ParamClass = ...
1626
+ def __init__(self, name: str = ..., env: Optional[Env] = None) -> None: ...
1627
+ @overload
1628
+ def addConstr(self, __tc: TempLConstr, name: str = ...) -> Constr: ...
1629
+ @overload
1630
+ def addConstr(self, __tc: TempQConstr, name: str = ...) -> QConstr: ...
1631
+ @overload
1632
+ def addConstr(self, __tc: TempMConstr, name: str = ...) -> MConstr: ...
1633
+ @overload
1634
+ def addConstr(self, __tc: TempMQConstr, name: str = ...) -> MQConstr: ...
1635
+ @overload
1636
+ def addConstr(self, __tc: TempGenConstr, name: str = ...) -> GenConstr: ...
1637
+ @overload
1638
+ def addConstr(self, __tc: TempMGenConstr, name: str = ...) -> MGenConstr: ...
1639
+ @overload
1640
+ def addConstrs(
1641
+ self,
1642
+ constrs: Generator[TempLConstr, None, None],
1643
+ name: str = ...
1644
+ ) -> tupledict[Any, Constr]: ...
1645
+ @overload
1646
+ def addConstrs(
1647
+ self,
1648
+ constrs: Generator[TempQConstr, None, None],
1649
+ name: str = ...
1650
+ ) -> tupledict[Any, QConstr]: ...
1651
+ @overload
1652
+ def addConstrs(
1653
+ self,
1654
+ constrs: Generator[TempMConstr, None, None],
1655
+ name: str = ...
1656
+ ) -> tupledict[Any, MConstr]: ...
1657
+ @overload
1658
+ def addConstrs(
1659
+ self,
1660
+ constrs: Generator[TempGenConstr, None, None],
1661
+ name: str = ...
1662
+ ) -> tupledict[Any, GenConstr]: ...
1663
+ def addGenConstrAbs(
1664
+ self,
1665
+ resvar: Var,
1666
+ argvar: Var,
1667
+ name: str = ...
1668
+ ) -> GenConstr: ...
1669
+ @overload
1670
+ def addGenConstrAnd(
1671
+ self,
1672
+ resvar: Var,
1673
+ vars: Sequence[Var],
1674
+ name: str = ...
1675
+ ) -> GenConstr: ...
1676
+ @overload
1677
+ def addGenConstrAnd(
1678
+ self,
1679
+ resvar: Var,
1680
+ vars: tupledict[Any, Var],
1681
+ name: str = ...
1682
+ ) -> GenConstr: ...
1683
+ def addGenConstrCos(
1684
+ self,
1685
+ xvar: Var,
1686
+ yvar: Var,
1687
+ name: str = ...,
1688
+ options: str = ...
1689
+ ) -> GenConstr: ...
1690
+ def addGenConstrExp(
1691
+ self,
1692
+ xvar: Var,
1693
+ yvar: Var,
1694
+ name: str = ...,
1695
+ options: str = ...
1696
+ ) -> GenConstr: ...
1697
+ def addGenConstrExpA(
1698
+ self,
1699
+ xvar: Var,
1700
+ yvar: Var,
1701
+ a: float,
1702
+ name: str = ...,
1703
+ options: str = ...
1704
+ ) -> GenConstr: ...
1705
+ @overload
1706
+ def addGenConstrIndicator(
1707
+ self,
1708
+ binvar: Var,
1709
+ binval: bool,
1710
+ lhs: _LinExprLike,
1711
+ sense: str,
1712
+ rhs: float,
1713
+ name: str = ...,
1714
+ options: str = ...
1715
+ ) -> GenConstr: ...
1716
+ @overload
1717
+ def addGenConstrIndicator(
1718
+ self,
1719
+ binvar: MVar,
1720
+ binval: Union[bool, float, int, np.ndarray],
1721
+ lhs: Union[MVar, MLinExpr],
1722
+ sense: str,
1723
+ rhs: Union[float, int, np.ndarray],
1724
+ name: str = ...,
1725
+ options: str = ...
1726
+ ) -> MGenConstr: ...
1727
+ @overload
1728
+ def addGenConstrIndicator(
1729
+ self,
1730
+ binvar: Var,
1731
+ binval: bool,
1732
+ __tc: TempGenConstr,
1733
+ name: str = ...,
1734
+ options: str = ...
1735
+ ) -> GenConstr: ...
1736
+ @overload
1737
+ def addGenConstrIndicator(
1738
+ self,
1739
+ binvar: MVar,
1740
+ binval: Union[bool, float, int, np.ndarray],
1741
+ __tc: TempMConstr,
1742
+ name: str = ...,
1743
+ options: str = ...
1744
+ ) -> MGenConstr: ...
1745
+ def addGenConstrLog(
1746
+ self,
1747
+ xvar: Var,
1748
+ yvar: Var,
1749
+ name: str = ...,
1750
+ options: str = ...
1751
+ ) -> GenConstr: ...
1752
+ def addGenConstrLogA(
1753
+ self,
1754
+ xvar: Var,
1755
+ yvar: Var,
1756
+ a: float,
1757
+ name: str = ...,
1758
+ options: str = ...
1759
+ ) -> GenConstr: ...
1760
+ def addGenConstrLogistic(
1761
+ self,
1762
+ xvar: Var,
1763
+ yvar: Var,
1764
+ name: str = ...,
1765
+ options: str = ...
1766
+ ) -> GenConstr: ...
1767
+ @overload
1768
+ def addGenConstrMax(
1769
+ self,
1770
+ resvar: Var,
1771
+ vars: Sequence[Var],
1772
+ constant: Optional[float] = None,
1773
+ name: str = ...
1774
+ ) -> GenConstr: ...
1775
+ @overload
1776
+ def addGenConstrMax(
1777
+ self,
1778
+ resvar: Var,
1779
+ vars: tupledict[Any, Var],
1780
+ constant: Optional[float] = None,
1781
+ name: str = ...
1782
+ ) -> GenConstr: ...
1783
+ @overload
1784
+ def addGenConstrMin(
1785
+ self,
1786
+ resvar: Var,
1787
+ vars: Sequence[Var],
1788
+ constant: Optional[float] = None,
1789
+ name: str = ...
1790
+ ) -> GenConstr: ...
1791
+ @overload
1792
+ def addGenConstrMin(
1793
+ self,
1794
+ resvar: Var,
1795
+ vars: tupledict[Any, Var],
1796
+ constant: Optional[float] = None,
1797
+ name: str = ...
1798
+ ) -> GenConstr: ...
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
1822
+ def addGenConstrNorm(
1823
+ self,
1824
+ resvar: Var,
1825
+ vars: Sequence[Var],
1826
+ which: float,
1827
+ name: str = ...
1828
+ ) -> GenConstr: ...
1829
+ @overload
1830
+ def addGenConstrNorm(
1831
+ self,
1832
+ resvar: Var,
1833
+ vars: tupledict[Any, Var],
1834
+ which: float,
1835
+ name: str = ...
1836
+ ) -> GenConstr: ...
1837
+ @overload
1838
+ def addGenConstrNorm(
1839
+ self,
1840
+ resvar: Var,
1841
+ vars: MVar,
1842
+ which: float,
1843
+ name: str = ...
1844
+ ) -> GenConstr: ...
1845
+ @overload
1846
+ def addGenConstrOr(
1847
+ self,
1848
+ resvar: Var,
1849
+ vars: Sequence[Var],
1850
+ name: str = ...
1851
+ ) -> GenConstr: ...
1852
+ @overload
1853
+ def addGenConstrOr(
1854
+ self,
1855
+ resvar: Var,
1856
+ vars: tupledict[Any, Var],
1857
+ name: str = ...
1858
+ ) -> GenConstr: ...
1859
+ def addGenConstrPWL(
1860
+ self,
1861
+ xvar: Var,
1862
+ yvar: Var,
1863
+ xpts: Sequence[float],
1864
+ ypts: Sequence[float],
1865
+ name: str = ...
1866
+ ) -> GenConstr: ...
1867
+ def addGenConstrPoly(
1868
+ self,
1869
+ xvar: Var,
1870
+ yvar: Var,
1871
+ p: Sequence[float],
1872
+ name: str = ...,
1873
+ options: str = ...
1874
+ ) -> GenConstr: ...
1875
+ def addGenConstrPow(
1876
+ self,
1877
+ xvar: Var,
1878
+ yvar: Var,
1879
+ a: float,
1880
+ name: str = ...,
1881
+ options: str = ...
1882
+ ) -> GenConstr: ...
1883
+ def addGenConstrSin(
1884
+ self,
1885
+ xvar: Var,
1886
+ yvar: Var,
1887
+ name: str = ...,
1888
+ options: str = ...,
1889
+ ) -> GenConstr: ...
1890
+ def addGenConstrTan(
1891
+ self,
1892
+ xvar: Var,
1893
+ yvar: Var,
1894
+ name: str = ...,
1895
+ options: str = ...
1896
+ ) -> GenConstr: ...
1897
+ @overload
1898
+ def addLConstr(
1899
+ self,
1900
+ __tc: TempLConstr,
1901
+ name: str = ...
1902
+ ) -> Constr: ...
1903
+ @overload
1904
+ def addLConstr(
1905
+ self,
1906
+ lhs: _LinExprLike,
1907
+ sense: str,
1908
+ rhs: _LinExprLike,
1909
+ name: str = ...
1910
+ ) -> Constr: ...
1911
+ @overload
1912
+ def addMConstr(
1913
+ self,
1914
+ A: np.ndarray,
1915
+ x: Optional[MVar],
1916
+ sense: Union[np.ndarray, str],
1917
+ b: np.ndarray,
1918
+ name: str = ...
1919
+ ) -> MConstr: ...
1920
+ @overload
1921
+ def addMConstr(
1922
+ self,
1923
+ A: np.ndarray,
1924
+ x: Sequence[Var],
1925
+ sense: Union[np.ndarray, str],
1926
+ b: np.ndarray,
1927
+ name: str = ...
1928
+ ) -> MConstr: ...
1929
+ @overload
1930
+ def addMQConstr(
1931
+ self,
1932
+ Q: np.ndarray,
1933
+ c: Optional[np.ndarray],
1934
+ sense: str,
1935
+ xQ_L: Optional[MVar] = None,
1936
+ xQ_R: Optional[MVar] = None,
1937
+ xc: Optional[MVar] = None,
1938
+ name: str = ...
1939
+ ) -> None: ...
1940
+ @overload
1941
+ def addMQConstr(
1942
+ self,
1943
+ Q: np.ndarray,
1944
+ c: Optional[np.ndarray],
1945
+ sense: str,
1946
+ xQ_L: Optional[Sequence[Var]] = None,
1947
+ xQ_R: Optional[Sequence[Var]] = None,
1948
+ xc: Optional[Sequence[Var]] = None,
1949
+ name: str = ...
1950
+ ) -> None: ...
1951
+ @overload
1952
+ def addMVar(
1953
+ self,
1954
+ shape: Tuple[int, ...],
1955
+ lb: Optional[Union[float, np.ndarray]] = None,
1956
+ ub: Optional[Union[float, np.ndarray]] = None,
1957
+ obj: Optional[Union[float, np.ndarray]] = None,
1958
+ vtype: Optional[Union[str, np.ndarray]] = None,
1959
+ name: Optional[Union[str, Sequence[str]]] = None
1960
+ ) -> MVar: ...
1961
+ @overload
1962
+ def addMVar(
1963
+ self,
1964
+ shape: int,
1965
+ lb: Optional[Union[float, np.ndarray]] = None,
1966
+ ub: Optional[Union[float, np.ndarray]] = None,
1967
+ obj: Optional[Union[float, np.ndarray]] = None,
1968
+ vtype: Optional[Union[str, np.ndarray]] = None,
1969
+ name: Optional[Union[str, Sequence[str]]] = None
1970
+ ) -> MVar: ...
1971
+ @overload
1972
+ def addQConstr(
1973
+ self,
1974
+ __tc: TempQConstr,
1975
+ name: str = ...
1976
+ ) -> QConstr: ...
1977
+ @overload
1978
+ def addQConstr(
1979
+ self,
1980
+ lhs: _QuadExprLike,
1981
+ sense: str,
1982
+ rhs: _QuadExprLike,
1983
+ name: str = ...
1984
+ ) -> QConstr: ...
1985
+ @overload
1986
+ def addRange(
1987
+ self,
1988
+ expr: Var,
1989
+ lower: float,
1990
+ upper: float,
1991
+ name: str = ...
1992
+ ) -> Constr: ...
1993
+ @overload
1994
+ def addRange(
1995
+ self,
1996
+ expr: LinExpr,
1997
+ lower: float,
1998
+ upper: float,
1999
+ name: str = ...
2000
+ ) -> Constr: ...
2001
+ def addSOS(
2002
+ self,
2003
+ type: int,
2004
+ vars: Sequence[Var],
2005
+ wts: Optional[Sequence[float]] = None
2006
+ ) -> SOS: ...
2007
+ def addVar(
2008
+ self,
2009
+ lb: float = 0.0,
2010
+ ub: float = float('inf'),
2011
+ obj: float = 0.0,
2012
+ vtype: str = GRB.CONTINUOUS,
2013
+ name: str = ...,
2014
+ column: Optional[Column] = None
2015
+ ) -> Var: ...
2016
+ # single int arg + scalar kwargs
2017
+ @overload
2018
+ def addVars(
2019
+ self,
2020
+ __indices: int,
2021
+ *,
2022
+ lb: float = 0.0,
2023
+ ub: float = float('inf'),
2024
+ obj: float = 0.0,
2025
+ vtype: str = GRB.CONTINUOUS,
2026
+ name: str = ...
2027
+ ) -> tupledict[int, Var]: ...
2028
+ # multiple int args + scalar kwargs
2029
+ @overload
2030
+ def addVars(
2031
+ self,
2032
+ __indices1: int,
2033
+ __indices2: int,
2034
+ *indices: int,
2035
+ lb: float = 0.0,
2036
+ ub: float = float('inf'),
2037
+ obj: float = 0.0,
2038
+ vtype: str = GRB.CONTINUOUS,
2039
+ name: str = ...
2040
+ ) -> tupledict[Tuple[int, ...], Var]: ...
2041
+ # single scalar list arg + scalar/list kwargs
2042
+ @overload
2043
+ def addVars(
2044
+ self,
2045
+ __indices: Iterable[_Scalar],
2046
+ *,
2047
+ lb: Union[float, Iterable[float]] = 0.0,
2048
+ ub: Union[float, Iterable[float]] = float('inf'),
2049
+ obj: Union[float, Iterable[float]] = 0.0,
2050
+ vtype: Union[str, Iterable[str]] = GRB.CONTINUOUS,
2051
+ name: Union[str, Iterable[str]] = ...
2052
+ ) -> tupledict[Any, Var]: ...
2053
+ # single scalar list arg + scalar/dict kwargs
2054
+ @overload
2055
+ def addVars(
2056
+ self,
2057
+ __indices: Iterable[_Scalar],
2058
+ *,
2059
+ lb: Union[float, Mapping[Any, float]] = 0.0,
2060
+ ub: Union[float, Mapping[Any, float]] = float('inf'),
2061
+ obj: Union[float, Mapping[Any, float]] = 0.0,
2062
+ vtype: Union[str, Mapping[Any, str]] = GRB.CONTINUOUS,
2063
+ name: Union[str, Mapping[Any, str]] = ...
2064
+ ) -> tupledict[Any, Var]: ...
2065
+ # multiple scalar list args + scalar/dict kwargs
2066
+ @overload
2067
+ def addVars(
2068
+ self,
2069
+ __indices1: Iterable[_Scalar],
2070
+ __indices2: Iterable[_Scalar],
2071
+ *indices: Iterable[_Scalar],
2072
+ lb: Union[float, Mapping[Any, float]] = 0.0,
2073
+ ub: Union[float, Mapping[Any, float]] = float('inf'),
2074
+ obj: Union[float, Mapping[Any, float]] = 0.0,
2075
+ vtype: Union[str, Mapping[Any, str]] = GRB.CONTINUOUS,
2076
+ name: Union[str, Mapping[Any, str]] = ...
2077
+ ) -> tupledict[Tuple[Any, ...], Var]: ...
2078
+ # single list of tuples arg + scalar/list kwargs
2079
+ @overload
2080
+ def addVars(
2081
+ self,
2082
+ __indices: Iterable[Tuple[_Scalar, ...]],
2083
+ *,
2084
+ lb: Union[float, Iterable[float]] = 0.0,
2085
+ ub: Union[float, Iterable[float]] = float('inf'),
2086
+ obj: Union[float, Iterable[float]] = 0.0,
2087
+ vtype: Union[str, Iterable[str]] = GRB.CONTINUOUS,
2088
+ name: Union[str, Iterable[str]] = ...
2089
+ ) -> tupledict[Tuple[Any, ...], Var]: ...
2090
+ # multiple lists of tuples args + scalar/dict kwargs
2091
+ @overload
2092
+ def addVars(
2093
+ self,
2094
+ *indices: Union[Iterable[_Scalar], Iterable[Tuple[_Scalar, ...]]],
2095
+ lb: Union[float, Mapping[Any, float]] = 0.0,
2096
+ ub: Union[float, Mapping[Any, float]] = float('inf'),
2097
+ obj: Union[float, Mapping[Any, float]] = 0.0,
2098
+ vtype: Union[str, Mapping[Any, str]] = GRB.CONTINUOUS,
2099
+ name: Union[str, Mapping[Any, str]] = ...
2100
+ ) -> tupledict[Tuple[Any, ...], Var]: ...
2101
+ @overload
2102
+ def cbCut(self, __tc: Union[TempLConstr, TempMConstr]) -> None: ...
2103
+ @overload
2104
+ def cbCut(
2105
+ self,
2106
+ lhs: Union[_LinExprLike, _MLinExprLike],
2107
+ sense: str,
2108
+ rhs: Union[_LinExprLike, _MLinExprLike],
2109
+ ) -> None: ...
2110
+ def cbGet(self, what: int) -> Any: ...
2111
+ @overload
2112
+ def cbGetNodeRel(self, vars: Var) -> float: ...
2113
+ @overload
2114
+ def cbGetNodeRel(self, vars: Sequence[Var]) -> List[float]: ...
2115
+ @overload
2116
+ def cbGetNodeRel(self, vars: Mapping[_T, Var]) -> tupledict[_T, float]: ...
2117
+ @overload
2118
+ def cbGetNodeRel(self, vars: MVar) -> np.ndarray: ...
2119
+ @overload
2120
+ def cbGetNodeRel(self, vars: Sequence[MVar]) -> List[np.ndarray]: ...
2121
+ @overload
2122
+ def cbGetNodeRel(
2123
+ self,
2124
+ vars: Mapping[_T, MVar]
2125
+ ) -> tupledict[_T, np.ndarray]: ...
2126
+ @overload
2127
+ def cbGetSolution(self, vars: Var) -> float: ...
2128
+ @overload
2129
+ def cbGetSolution(self, vars: Sequence[Var]) -> List[float]: ...
2130
+ @overload
2131
+ def cbGetSolution(
2132
+ self,
2133
+ vars: Mapping[_T, Var]
2134
+ ) -> tupledict[_T, float]: ...
2135
+ @overload
2136
+ def cbGetSolution(self, vars: MVar) -> np.ndarray: ...
2137
+ @overload
2138
+ def cbGetSolution(self, vars: Sequence[MVar]) -> List[np.ndarray]: ...
2139
+ @overload
2140
+ def cbGetSolution(
2141
+ self,
2142
+ vars: Mapping[_T, MVar]
2143
+ ) -> tupledict[_T, np.ndarray]: ...
2144
+ @overload
2145
+ def cbLazy(self, __tc: Union[TempLConstr, TempMConstr]) -> None: ...
2146
+ @overload
2147
+ def cbLazy(
2148
+ self,
2149
+ lhs: Union[_LinExprLike, _MLinExprLike],
2150
+ sense: str,
2151
+ rhs: Union[_LinExprLike, _MLinExprLike],
2152
+ ) -> None: ...
2153
+ def cbProceed(self) -> None: ...
2154
+ @overload
2155
+ def cbSetSolution(self, vars: Var, solution: float) -> None: ...
2156
+ @overload
2157
+ def cbSetSolution(self, vars: MVar, solution: np.ndarray) -> None: ...
2158
+ @overload
2159
+ def cbSetSolution(
2160
+ self,
2161
+ vars: Sequence[Var],
2162
+ solution: Sequence[float]
2163
+ ) -> None: ...
2164
+ def cbStopOneMultiObj(self, objnum: int) -> None: ...
2165
+ def cbUseSolution(self) -> float: ...
2166
+ def chgCoeff(self, constr: Constr, var: Var, newvalue: float) -> None: ...
2167
+ def close(self) -> None: ...
2168
+ def computeIIS(
2169
+ self,
2170
+ callback: Optional[Callable[[Model, int], None]] = None
2171
+ ) -> None: ...
2172
+ def copy(self) -> Model: ...
2173
+ def discardConcurrentEnvs(self) -> None: ...
2174
+ def discardMultiobjEnvs(self) -> None: ...
2175
+ def dispose(self) -> None: ...
2176
+ def feasRelax(
2177
+ self,
2178
+ relaxobjtype: int,
2179
+ minrelax: bool,
2180
+ vars: Optional[Sequence[Var]],
2181
+ lbpen: Optional[Sequence[float]],
2182
+ ubpen: Optional[Sequence[float]],
2183
+ constrs: Optional[Sequence[Constr]],
2184
+ rhspen: Optional[Sequence[float]]
2185
+ ) -> float: ...
2186
+ def feasRelaxS(
2187
+ self,
2188
+ relaxobjtype: int,
2189
+ minrelax: bool,
2190
+ vrelax: bool,
2191
+ crelax: bool
2192
+ ) -> float: ...
2193
+ def fixed(self) -> Model: ...
2194
+ # no type hinting for scipy.sparse
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]: ...
2201
+ @overload
2202
+ def getAttr(self, attrname: str) -> Any: ...
2203
+ @overload
2204
+ def getAttr(
2205
+ self,
2206
+ attrname: str,
2207
+ objs: Sequence[Var]
2208
+ ) -> List[Any]: ...
2209
+ @overload
2210
+ def getAttr(
2211
+ self,
2212
+ attrname: str,
2213
+ objs: Sequence[Constr]
2214
+ ) -> List[Any]: ...
2215
+ @overload
2216
+ def getAttr(
2217
+ self,
2218
+ attrname: str,
2219
+ objs: Sequence[SOS]
2220
+ ) -> List[Any]: ...
2221
+ @overload
2222
+ def getAttr(
2223
+ self,
2224
+ attrname: str,
2225
+ objs: Sequence[QConstr]
2226
+ ) -> List[Any]: ...
2227
+ @overload
2228
+ def getAttr(
2229
+ self,
2230
+ attrname: str,
2231
+ objs: Sequence[GenConstr]
2232
+ ) -> List[Any]: ...
2233
+ @overload
2234
+ def getAttr(
2235
+ self,
2236
+ attrname: str,
2237
+ objs: Mapping[_T, Var]
2238
+ ) -> Dict[_T, Any]: ...
2239
+ @overload
2240
+ def getAttr(
2241
+ self,
2242
+ attrname: str,
2243
+ objs: Mapping[_T, Constr]
2244
+ ) -> Dict[_T, Any]: ...
2245
+ @overload
2246
+ def getAttr(
2247
+ self,
2248
+ attrname: str,
2249
+ objs: Mapping[_T, SOS]
2250
+ ) -> Dict[_T, Any]: ...
2251
+ @overload
2252
+ def getAttr(
2253
+ self,
2254
+ attrname: str,
2255
+ objs: Mapping[_T, QConstr]
2256
+ ) -> Dict[_T, Any]: ...
2257
+ @overload
2258
+ def getAttr(
2259
+ self,
2260
+ attrname: str,
2261
+ objs: Mapping[_T, GenConstr]
2262
+ ) -> Dict[_T, Any]: ...
2263
+ def getCoeff(self, constr: Constr, var: Var) -> float: ...
2264
+ def getCol(self, var: Var) -> Column: ...
2265
+ def getConcurrentEnv(self, num: int) -> Env: ...
2266
+ def getConstrByName(self, name: str) -> Optional[Constr]: ...
2267
+ def getConstrs(self) -> List[Constr]: ...
2268
+ def getGenConstrAbs(self, genconstr: GenConstr) -> Tuple[Var, Var]: ...
2269
+ def getGenConstrAnd(
2270
+ self,
2271
+ genconstr: GenConstr
2272
+ ) -> Tuple[Var, List[Var]]: ...
2273
+ def getGenConstrCos(self, genconstr: GenConstr) -> Tuple[Var, Var]: ...
2274
+ def getGenConstrExp(self, genconstr: GenConstr) -> Tuple[Var, Var]: ...
2275
+ def getGenConstrExpA(
2276
+ self,
2277
+ genconstr: GenConstr
2278
+ ) -> Tuple[Var, Var, float]: ...
2279
+ def getGenConstrIndicator(
2280
+ self,
2281
+ genconstr: GenConstr
2282
+ ) -> Tuple[Var, bool, LinExpr, str, float]: ...
2283
+ def getGenConstrLog(self, genconstr: GenConstr) -> Tuple[Var, Var]: ...
2284
+ def getGenConstrLogA(
2285
+ self,
2286
+ genconstr: GenConstr
2287
+ ) -> Tuple[Var, Var, float]: ...
2288
+ def getGenConstrLogistic(
2289
+ self,
2290
+ genconstr: GenConstr
2291
+ ) -> Tuple[Var, Var]: ...
2292
+ def getGenConstrMax(
2293
+ self,
2294
+ genconstr: GenConstr
2295
+ ) -> Tuple[Var, List[Var], float]: ...
2296
+ def getGenConstrMin(
2297
+ self,
2298
+ genconstr: GenConstr
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]]: ...
2308
+ def getGenConstrNorm(
2309
+ self,
2310
+ genconstr: GenConstr
2311
+ ) -> Tuple[Var, List[Var], float]: ...
2312
+ def getGenConstrOr(
2313
+ self,
2314
+ genconstr: GenConstr
2315
+ ) -> Tuple[Var, List[Var]]: ...
2316
+ def getGenConstrPWL(
2317
+ self,
2318
+ genconstr: GenConstr
2319
+ ) -> Tuple[Var, Var, List[float], List[float]]: ...
2320
+ def getGenConstrPoly(
2321
+ self,
2322
+ genconstr: GenConstr
2323
+ ) -> Tuple[Var, Var, List[float]]: ...
2324
+ def getGenConstrPow(
2325
+ self,
2326
+ genconstr: GenConstr
2327
+ ) -> Tuple[Var, Var, float]: ...
2328
+ def getGenConstrSin(self, genconstr: GenConstr) -> Tuple[Var, Var]: ...
2329
+ def getGenConstrTan(self, genconstr: GenConstr) -> Tuple[Var, Var]: ...
2330
+ def getGenConstrs(self) -> List[GenConstr]: ...
2331
+ def getJSONSolution(self) -> str: ...
2332
+ def getMultiobjEnv(self, num: int) -> Env: ...
2333
+ def getObjective(
2334
+ self,
2335
+ index: Optional[int] = None
2336
+ ) -> Union[LinExpr, QuadExpr]: ...
2337
+ def getPWLObj(self, var: Var) -> List[Tuple[float, float]]: ...
2338
+ def getParamInfo(
2339
+ self,
2340
+ paramname: str
2341
+ ) -> Tuple[str, Type[Any], Any, Any, Any, Any]: ...
2342
+ def getQCRow(self, qc: QConstr) -> QuadExpr: ...
2343
+ def getQConstrs(self) -> List[QConstr]: ...
2344
+ def getRow(self, constr: Constr) -> LinExpr: ...
2345
+ def getSOS(self, sos: SOS) -> Tuple[int, List[Var], List[float]]: ...
2346
+ def getSOSs(self) -> List[SOS]: ...
2347
+ def getTuneResult(self, i: int) -> None: ...
2348
+ def getVarByName(self, name: str) -> Optional[Var]: ...
2349
+ def getVars(self) -> List[Var]: ...
2350
+ def message(self, msg: str) -> None: ...
2351
+ def optimize(
2352
+ self,
2353
+ callback: Optional[Callable[[Model, int], None]] = None
2354
+ ) -> None: ...
2355
+ def optimizeBatch(self) -> str: ...
2356
+ def presolve(self) -> Model: ...
2357
+ @overload
2358
+ def printAttr(self, attrname: str, filter: str = '*') -> None: ...
2359
+ @overload
2360
+ def printAttr(
2361
+ self,
2362
+ attrname: Sequence[str],
2363
+ filter: str = '*'
2364
+ ) -> None: ...
2365
+ def printQuality(self) -> None: ...
2366
+ def printStats(self) -> None: ...
2367
+ def read(self, filename: str) -> None: ...
2368
+ def relax(self) -> Model: ...
2369
+ @overload
2370
+ def remove(self, items: Var) -> None: ...
2371
+ @overload
2372
+ def remove(self, items: MVar) -> None: ...
2373
+ @overload
2374
+ def remove(self, items: Constr) -> None: ...
2375
+ @overload
2376
+ def remove(self, items: MConstr) -> None: ...
2377
+ @overload
2378
+ def remove(self, items: SOS) -> None: ...
2379
+ @overload
2380
+ def remove(self, items: QConstr) -> None: ...
2381
+ @overload
2382
+ def remove(self, items: GenConstr) -> None: ...
2383
+ @overload
2384
+ def remove(self, items: Sequence[_ModelComponent]) -> None: ...
2385
+ @overload
2386
+ def remove(self, items: Mapping[Any, _ModelComponent]) -> None: ...
2387
+ def reset(self, clearall: int = 0) -> None: ...
2388
+ def resetParams(self) -> None: ...
2389
+ @overload
2390
+ def setAttr(self, attrname: str, arg1: float) -> None: ...
2391
+ @overload
2392
+ def setAttr(self, attrname: str, arg1: str) -> None: ...
2393
+ @overload
2394
+ def setAttr(self, attrname: str, arg1: Sequence[_Scalar]) -> None: ...
2395
+ @overload
2396
+ def setAttr(
2397
+ self,
2398
+ attrname: str,
2399
+ arg1: Sequence[_ModelComponent],
2400
+ arg2: Sequence[_Scalar]
2401
+ ) -> None: ...
2402
+ @overload
2403
+ def setAttr(
2404
+ self,
2405
+ attrname: str,
2406
+ arg1: Sequence[_ModelComponent],
2407
+ arg2: float
2408
+ ) -> None: ...
2409
+ @overload
2410
+ def setAttr(
2411
+ self,
2412
+ attrname: str,
2413
+ arg1: Mapping[Any, _ModelComponent],
2414
+ arg2: Mapping[Any, _Scalar]
2415
+ ) -> None: ...
2416
+ @overload
2417
+ def setAttr(
2418
+ self,
2419
+ attrname: str,
2420
+ arg1: Mapping[Any, _ModelComponent],
2421
+ arg2: float
2422
+ ) -> None: ...
2423
+ @overload
2424
+ def setAttr(
2425
+ self,
2426
+ attrname: str,
2427
+ arg1: Mapping[Any, _ModelComponent],
2428
+ arg2: str
2429
+ ) -> None: ...
2430
+ @overload
2431
+ def setMObjective(
2432
+ self,
2433
+ Q: np.ndarray,
2434
+ c: Optional[np.ndarray],
2435
+ constant: float,
2436
+ xQ_L: Optional[MVar] = None,
2437
+ xQ_R: Optional[MVar] = None,
2438
+ xc: Optional[MVar] = None,
2439
+ sense: Optional[int] = None
2440
+ ) -> None: ...
2441
+ @overload
2442
+ def setMObjective(
2443
+ self,
2444
+ Q: np.ndarray,
2445
+ c: Optional[np.ndarray],
2446
+ constant: float,
2447
+ xQ_L: Optional[Sequence[Var]] = None,
2448
+ xQ_R: Optional[Sequence[Var]] = None,
2449
+ xc: Optional[Sequence[Var]] = None,
2450
+ sense: Optional[int] = None
2451
+ ) -> None: ...
2452
+ @overload
2453
+ def setObjective(
2454
+ self,
2455
+ expr: float,
2456
+ sense: Optional[int] = None
2457
+ ) -> None: ...
2458
+ @overload
2459
+ def setObjective(
2460
+ self,
2461
+ expr: Var,
2462
+ sense: Optional[int] = None
2463
+ ) -> None: ...
2464
+ @overload
2465
+ def setObjective(
2466
+ self,
2467
+ expr: LinExpr,
2468
+ sense: Optional[int] = None
2469
+ ) -> None: ...
2470
+ @overload
2471
+ def setObjective(
2472
+ self,
2473
+ expr: QuadExpr,
2474
+ sense: Optional[int] = None
2475
+ ) -> None: ...
2476
+ @overload
2477
+ def setObjective(
2478
+ self,
2479
+ expr: MVar,
2480
+ sense: Optional[int] = None
2481
+ ) -> None: ...
2482
+ @overload
2483
+ def setObjective(
2484
+ self,
2485
+ expr: MLinExpr,
2486
+ sense: Optional[int] = None
2487
+ ) -> None: ...
2488
+ @overload
2489
+ def setObjective(
2490
+ self,
2491
+ expr: MQuadExpr,
2492
+ sense: Optional[int] = None
2493
+ ) -> None: ...
2494
+ @overload
2495
+ def setObjectiveN(
2496
+ self,
2497
+ expr: float,
2498
+ index: int,
2499
+ priority: int = 0,
2500
+ weight: float = 1.0,
2501
+ abstol: float = 1e-6,
2502
+ reltol: float = 0.0,
2503
+ name: str = ...
2504
+ ) -> None: ...
2505
+ @overload
2506
+ def setObjectiveN(
2507
+ self,
2508
+ expr: Var,
2509
+ index: int,
2510
+ priority: int = 0,
2511
+ weight: float = 1.0,
2512
+ abstol: float = 1e-6,
2513
+ reltol: float = 0.0,
2514
+ name: str = ...
2515
+ ) -> None: ...
2516
+ @overload
2517
+ def setObjectiveN(
2518
+ self,
2519
+ expr: LinExpr,
2520
+ index: int,
2521
+ priority: int = 0,
2522
+ weight: float = 1.0,
2523
+ abstol: float = 1e-6,
2524
+ reltol: float = 0.0,
2525
+ name: str = ...
2526
+ ) -> None: ...
2527
+ @overload
2528
+ def setObjectiveN(
2529
+ self,
2530
+ expr: MVar,
2531
+ index: int,
2532
+ priority: int = 0,
2533
+ weight: float = 1.0,
2534
+ abstol: float = 1e-6,
2535
+ reltol: float = 0.0,
2536
+ name: str = ...
2537
+ ) -> None: ...
2538
+ @overload
2539
+ def setObjectiveN(
2540
+ self,
2541
+ expr: MLinExpr,
2542
+ index: int,
2543
+ priority: int = 0,
2544
+ weight: float = 1.0,
2545
+ abstol: float = 1e-6,
2546
+ reltol: float = 0.0,
2547
+ name: str = ...
2548
+ ) -> None: ...
2549
+ def setPWLObj(
2550
+ self,
2551
+ var: Var,
2552
+ x: Sequence[float],
2553
+ y: Sequence[float]
2554
+ ) -> None: ...
2555
+ @overload
2556
+ def setParam(self, paramname: str, newvalue: float) -> None: ...
2557
+ @overload
2558
+ def setParam(self, paramname: str, newvalue: str) -> None: ...
2559
+ def singleScenarioModel(self) -> Model: ...
2560
+ def terminate(self) -> None: ...
2561
+ def tune(self) -> None: ...
2562
+ def update(self) -> None: ...
2563
+ def write(self, filename: str) -> None: ...
2564
+ def __enter__(self) -> Model: ...
2565
+ def __exit__(
2566
+ self,
2567
+ exc_type: Optional[Type[BaseException]],
2568
+ exc_value: Optional[BaseException],
2569
+ traceback: Optional[TracebackType]
2570
+ ) -> Optional[bool]: ...
2571
+ def __getattr__(self, name: str) -> Any: ...
2572
+ def __setattr__(self, name: str, value: Any) -> None: ...
2573
+
2574
+ class ParamClass:
2575
+ AggFill: int = ...
2576
+ Aggregate: int = ...
2577
+ BQPCuts: int = ...
2578
+ BarConvTol: float = ...
2579
+ BarCorrectors: int = ...
2580
+ BarHomogeneous: int = ...
2581
+ BarIterLimit: int = ...
2582
+ BarOrder: int = ...
2583
+ BarQCPConvTol: float = ...
2584
+ BestBdStop: float = ...
2585
+ BestObjStop: float = ...
2586
+ BranchDir: int = ...
2587
+ CSAPIAccessID: str = ...
2588
+ CSAPISecret: str = ...
2589
+ CSAppName: str = ...
2590
+ CSAuthToken: str = ...
2591
+ CSBatchMode: int = ...
2592
+ CSClientLog: int = ...
2593
+ CSGroup: str = ...
2594
+ CSIdleTimeout: int = ...
2595
+ CSManager: str = ...
2596
+ CSPriority: int = ...
2597
+ CSQueueTimeout: float = ...
2598
+ CSRouter: str = ...
2599
+ CSTLSInsecure: int = ...
2600
+ CliqueCuts: int = ...
2601
+ CloudAccessID: str = ...
2602
+ CloudHost: str = ...
2603
+ CloudPool: str = ...
2604
+ CloudSecretKey: str = ...
2605
+ ComputeServer: str = ...
2606
+ ConcurrentJobs: int = ...
2607
+ ConcurrentMIP: int = ...
2608
+ CoverCuts: int = ...
2609
+ Crossover: int = ...
2610
+ CrossoverBasis: int = ...
2611
+ CutAggPasses: int = ...
2612
+ CutPasses: int = ...
2613
+ Cutoff: float = ...
2614
+ Cuts: int = ...
2615
+ DegenMoves: int = ...
2616
+ Disconnected: int = ...
2617
+ DisplayInterval: int = ...
2618
+ DistributedMIPJobs: int = ...
2619
+ DualReductions: int = ...
2620
+ FeasRelaxBigM: float = ...
2621
+ FeasibilityTol: float = ...
2622
+ FixVarsInIndicators: int = ...
2623
+ FlowCoverCuts: int = ...
2624
+ FlowPathCuts: int = ...
2625
+ FuncMaxVal: float = ...
2626
+ FuncNonlinear: int = ...
2627
+ FuncPieceError: float = ...
2628
+ FuncPieceLength: float = ...
2629
+ FuncPieceRatio: float = ...
2630
+ FuncPieces: int = ...
2631
+ GUBCoverCuts: int = ...
2632
+ GomoryPasses: int = ...
2633
+ Heuristics: float = ...
2634
+ IISMethod: int = ...
2635
+ IgnoreNames: int = ...
2636
+ ImpliedCuts: int = ...
2637
+ ImproveStartGap: float = ...
2638
+ ImproveStartNodes: float = ...
2639
+ ImproveStartTime: float = ...
2640
+ ImproveStartWork: float = ...
2641
+ InfProofCuts: int = ...
2642
+ InfUnbdInfo: int = ...
2643
+ InheritParams: int = ...
2644
+ IntFeasTol: float = ...
2645
+ IntegralityFocus: int = ...
2646
+ IterationLimit: float = ...
2647
+ JSONSolDetail: int = ...
2648
+ JobID: str = ...
2649
+ LPWarmStart: int = ...
2650
+ LazyConstraints: int = ...
2651
+ LicenseID: int = ...
2652
+ LiftProjectCuts: int = ...
2653
+ LogFile: str = ...
2654
+ LogToConsole: int = ...
2655
+ MIPFocus: int = ...
2656
+ MIPGap: float = ...
2657
+ MIPGapAbs: float = ...
2658
+ MIPSepCuts: int = ...
2659
+ MIQCPMethod: int = ...
2660
+ MIRCuts: int = ...
2661
+ MarkowitzTol: float = ...
2662
+ MemLimit: float = ...
2663
+ Method: int = ...
2664
+ MinRelNodes: int = ...
2665
+ ModKCuts: int = ...
2666
+ MultiObjMethod: int = ...
2667
+ MultiObjPre: int = ...
2668
+ NLPHeur: int = ...
2669
+ NetworkAlg: int = ...
2670
+ NetworkCuts: int = ...
2671
+ NLBarCFeasTol: float = ...
2672
+ NLBarDFeasTol: float = ...
2673
+ NLBarIterLimit: int = ...
2674
+ NLBarPFeasTol: float = ...
2675
+ NoRelHeurSolutions: int = ...
2676
+ NoRelHeurTime: float = ...
2677
+ NoRelHeurWork: float = ...
2678
+ NodeLimit: float = ...
2679
+ NodeMethod: int = ...
2680
+ NodefileDir: str = ...
2681
+ NodefileStart: float = ...
2682
+ NonConvex: int = ...
2683
+ NormAdjust: int = ...
2684
+ NumericFocus: int = ...
2685
+ OBBT: int = ...
2686
+ ObjNumber: int = ...
2687
+ ObjScale: float = ...
2688
+ OptimalityTarget: int = ...
2689
+ OptimalityTol: float = ...
2690
+ OutputFlag: int = ...
2691
+ PDHGIterLimit: float = ...
2692
+ PDHGRelTol: float = ...
2693
+ PDHGAbsTol: float = ...
2694
+ PDHGConvTol: float = ...
2695
+ PDHGGPU: int = ...
2696
+ PSDCuts: int = ...
2697
+ PSDTol: float = ...
2698
+ PartitionPlace: int = ...
2699
+ PerturbValue: float = ...
2700
+ PoolGap: float = ...
2701
+ PoolGapAbs: float = ...
2702
+ PoolSearchMode: int = ...
2703
+ PoolSolutions: int = ...
2704
+ PreCrush: int = ...
2705
+ PreDepRow: int = ...
2706
+ PreDual: int = ...
2707
+ PreMIQCPForm: int = ...
2708
+ PrePasses: int = ...
2709
+ PreQLinearize: int = ...
2710
+ PreSOS1BigM: float = ...
2711
+ PreSOS1Encoding: int = ...
2712
+ PreSOS2BigM: float = ...
2713
+ PreSOS2Encoding: int = ...
2714
+ PreSparsify: int = ...
2715
+ Presolve: int = ...
2716
+ ProjImpliedCuts: int = ...
2717
+ PumpPasses: int = ...
2718
+ QCPDual: int = ...
2719
+ Quad: int = ...
2720
+ RINS: int = ...
2721
+ RLTCuts: int = ...
2722
+ Record: int = ...
2723
+ RelaxLiftCuts: int = ...
2724
+ ResultFile: str = ...
2725
+ ScaleFlag: int = ...
2726
+ ScenarioNumber: int = ...
2727
+ Seed: int = ...
2728
+ ServerPassword: str = ...
2729
+ ServerTimeout: int = ...
2730
+ SiftMethod: int = ...
2731
+ Sifting: int = ...
2732
+ SimplexPricing: int = ...
2733
+ SoftMemLimit: float = ...
2734
+ SolFiles: str = ...
2735
+ SolutionLimit: int = ...
2736
+ SolutionNumber: int = ...
2737
+ StartNodeLimit: int = ...
2738
+ StartNumber: int = ...
2739
+ StartTimeLimit: float = ...
2740
+ StartWorkLimit: float = ...
2741
+ StrongCGCuts: int = ...
2742
+ SubMIPCuts: int = ...
2743
+ SubMIPNodes: int = ...
2744
+ Symmetry: int = ...
2745
+ TSPort: int = ...
2746
+ ThreadLimit: int = ...
2747
+ Threads: int = ...
2748
+ TimeLimit: float = ...
2749
+ TokenServer: str = ...
2750
+ TuneCleanup: float = ...
2751
+ TuneCriterion: int = ...
2752
+ TuneDynamicJobs: int = ...
2753
+ TuneJobs: int = ...
2754
+ TuneMetric: int = ...
2755
+ TuneOutput: int = ...
2756
+ TuneResults: int = ...
2757
+ TuneTargetMIPGap: float = ...
2758
+ TuneTargetTime: float = ...
2759
+ TuneTimeLimit: float = ...
2760
+ TuneTrials: int = ...
2761
+ UpdateMode: int = ...
2762
+ UserName: str = ...
2763
+ VarBranch: int = ...
2764
+ WLSAccessID: str = ...
2765
+ WLSSecret: str = ...
2766
+ WLSToken: str = ...
2767
+ WLSTokenDuration: int = ...
2768
+ WLSTokenRefresh: float = ...
2769
+ WorkLimit: float = ...
2770
+ WorkerPassword: str = ...
2771
+ WorkerPool: str = ...
2772
+ ZeroHalfCuts: int = ...
2773
+ ZeroObjNodes: int = ...
2774
+
2775
+ class ParamConstClass:
2776
+ AggFill: str = ...
2777
+ Aggregate: str = ...
2778
+ BQPCuts: str = ...
2779
+ BarConvTol: str = ...
2780
+ BarCorrectors: str = ...
2781
+ BarHomogeneous: str = ...
2782
+ BarIterLimit: str = ...
2783
+ BarOrder: str = ...
2784
+ BarQCPConvTol: str = ...
2785
+ BestBdStop: str = ...
2786
+ BestObjStop: str = ...
2787
+ BranchDir: str = ...
2788
+ CSAPIAccessID: str = ...
2789
+ CSAPISecret: str = ...
2790
+ CSAppName: str = ...
2791
+ CSAuthToken: str = ...
2792
+ CSBatchMode: str = ...
2793
+ CSClientLog: str = ...
2794
+ CSGroup: str = ...
2795
+ CSIdleTimeout: str = ...
2796
+ CSManager: str = ...
2797
+ CSPriority: str = ...
2798
+ CSQueueTimeout: str = ...
2799
+ CSRouter: str = ...
2800
+ CSTLSInsecure: str = ...
2801
+ CliqueCuts: str = ...
2802
+ CloudAccessID: str = ...
2803
+ CloudHost: str = ...
2804
+ CloudPool: str = ...
2805
+ CloudSecretKey: str = ...
2806
+ ComputeServer: str = ...
2807
+ ConcurrentJobs: str = ...
2808
+ ConcurrentMIP: str = ...
2809
+ CoverCuts: str = ...
2810
+ Crossover: str = ...
2811
+ CrossoverBasis: str = ...
2812
+ CutAggPasses: str = ...
2813
+ CutPasses: str = ...
2814
+ Cutoff: str = ...
2815
+ Cuts: str = ...
2816
+ DegenMoves: str = ...
2817
+ Disconnected: str = ...
2818
+ DisplayInterval: str = ...
2819
+ DistributedMIPJobs: str = ...
2820
+ DualReductions: str = ...
2821
+ FeasRelaxBigM: str = ...
2822
+ FeasibilityTol: str = ...
2823
+ FixVarsInIndicators: str = ...
2824
+ FlowCoverCuts: str = ...
2825
+ FlowPathCuts: str = ...
2826
+ FuncMaxVal: str = ...
2827
+ FuncNonlinear: int = ...
2828
+ FuncPieceError: str = ...
2829
+ FuncPieceLength: str = ...
2830
+ FuncPieceRatio: str = ...
2831
+ FuncPieces: str = ...
2832
+ GUBCoverCuts: str = ...
2833
+ GomoryPasses: str = ...
2834
+ Heuristics: str = ...
2835
+ IISMethod: str = ...
2836
+ IgnoreNames: str = ...
2837
+ ImpliedCuts: str = ...
2838
+ ImproveStartGap: str = ...
2839
+ ImproveStartNodes: str = ...
2840
+ ImproveStartTime: str = ...
2841
+ ImproveStartWork: str = ...
2842
+ InfProofCuts: str = ...
2843
+ InfUnbdInfo: str = ...
2844
+ InheritParams: str = ...
2845
+ IntFeasTol: str = ...
2846
+ IntegralityFocus: str = ...
2847
+ IterationLimit: str = ...
2848
+ JSONSolDetail: str = ...
2849
+ JobID: str = ...
2850
+ LPWarmStart: str = ...
2851
+ LazyConstraints: str = ...
2852
+ LicenseID: str = ...
2853
+ LiftProjectCuts: str = ...
2854
+ LogFile: str = ...
2855
+ LogToConsole: str = ...
2856
+ MIPFocus: str = ...
2857
+ MIPGap: str = ...
2858
+ MIPGapAbs: str = ...
2859
+ MIPSepCuts: str = ...
2860
+ MIQCPMethod: str = ...
2861
+ MIRCuts: str = ...
2862
+ MarkowitzTol: str = ...
2863
+ MemLimit: str = ...
2864
+ Method: str = ...
2865
+ MinRelNodes: str = ...
2866
+ ModKCuts: str = ...
2867
+ MultiObjMethod: str = ...
2868
+ MultiObjPre: str = ...
2869
+ NLPHeur: str = ...
2870
+ NetworkAlg: str = ...
2871
+ NetworkCuts: str = ...
2872
+ NLBarCFeasTol: str = ...
2873
+ NLBarDFeasTol: str = ...
2874
+ NLBarIterLimit: str = ...
2875
+ NLBarPFeasTol: str = ...
2876
+ NoRelHeurSolutions: str = ...
2877
+ NoRelHeurTime: str = ...
2878
+ NoRelHeurWork: str = ...
2879
+ NodeLimit: str = ...
2880
+ NodeMethod: str = ...
2881
+ NodefileDir: str = ...
2882
+ NodefileStart: str = ...
2883
+ NonConvex: str = ...
2884
+ NormAdjust: str = ...
2885
+ NumericFocus: str = ...
2886
+ OBBT: str = ...
2887
+ ObjNumber: str = ...
2888
+ ObjScale: str = ...
2889
+ OptimalityTol: str = ...
2890
+ OptimalityTarget: str = ...
2891
+ OutputFlag: str = ...
2892
+ PDHGIterLimit: str = ...
2893
+ PDHGRelTol: str = ...
2894
+ PDHGAbsTol: str = ...
2895
+ PDHGConvTol: str = ...
2896
+ PDHGGPU: str = ...
2897
+ PSDCuts: str = ...
2898
+ PSDTol: str = ...
2899
+ PartitionPlace: str = ...
2900
+ PerturbValue: str = ...
2901
+ PoolGap: str = ...
2902
+ PoolGapAbs: str = ...
2903
+ PoolSearchMode: str = ...
2904
+ PoolSolutions: str = ...
2905
+ PreCrush: str = ...
2906
+ PreDepRow: str = ...
2907
+ PreDual: str = ...
2908
+ PreMIQCPForm: str = ...
2909
+ PrePasses: str = ...
2910
+ PreQLinearize: str = ...
2911
+ PreSOS1BigM: str = ...
2912
+ PreSOS1Encoding: str = ...
2913
+ PreSOS2BigM: str = ...
2914
+ PreSOS2Encoding: str = ...
2915
+ PreSparsify: str = ...
2916
+ Presolve: str = ...
2917
+ ProjImpliedCuts: str = ...
2918
+ PumpPasses: str = ...
2919
+ QCPDual: str = ...
2920
+ Quad: str = ...
2921
+ RINS: str = ...
2922
+ RLTCuts: str = ...
2923
+ Record: str = ...
2924
+ RelaxLiftCuts: str = ...
2925
+ ResultFile: str = ...
2926
+ ScaleFlag: str = ...
2927
+ ScenarioNumber: str = ...
2928
+ Seed: str = ...
2929
+ ServerPassword: str = ...
2930
+ ServerTimeout: str = ...
2931
+ SiftMethod: str = ...
2932
+ Sifting: str = ...
2933
+ SimplexPricing: str = ...
2934
+ SoftMemLimit: str = ...
2935
+ SolFiles: str = ...
2936
+ SolutionLimit: str = ...
2937
+ SolutionNumber: str = ...
2938
+ StartNodeLimit: str = ...
2939
+ StartNumber: str = ...
2940
+ StartTimeLimit: str = ...
2941
+ StartWorkLimit: str = ...
2942
+ StrongCGCuts: str = ...
2943
+ SubMIPCuts: str = ...
2944
+ SubMIPNodes: str = ...
2945
+ Symmetry: str = ...
2946
+ TSPort: str = ...
2947
+ ThreadLimit: str = ...
2948
+ Threads: str = ...
2949
+ TimeLimit: str = ...
2950
+ TokenServer: str = ...
2951
+ TuneCleanup: str = ...
2952
+ TuneCriterion: str = ...
2953
+ TuneDynamicJobs: str = ...
2954
+ TuneJobs: str = ...
2955
+ TuneMetric: str = ...
2956
+ TuneOutput: str = ...
2957
+ TuneResults: str = ...
2958
+ TuneTargetMIPGap: str = ...
2959
+ TuneTargetTime: str = ...
2960
+ TuneTimeLimit: str = ...
2961
+ TuneTrials: str = ...
2962
+ UpdateMode: str = ...
2963
+ UserName: str = ...
2964
+ VarBranch: str = ...
2965
+ WLSAccessID: str = ...
2966
+ WLSSecret: str = ...
2967
+ WLSToken: str = ...
2968
+ WLSTokenDuration: str = ...
2969
+ WLSTokenRefresh: str = ...
2970
+ WorkLimit: str = ...
2971
+ WorkerPassword: str = ...
2972
+ WorkerPool: str = ...
2973
+ ZeroHalfCuts: str = ...
2974
+ ZeroObjNodes: str = ...
2975
+
2976
+ class QConstr:
2977
+ IISQConstr: int = ...
2978
+ IISQConstrForce: int = ...
2979
+ QCName: str = ...
2980
+ QCPi: float = ...
2981
+ QCRHS: float = ...
2982
+ QCSense: str = ...
2983
+ QCSlack: float = ...
2984
+ QCTag: str = ...
2985
+ def getAttr(self, attrname: str) -> Any: ...
2986
+ @overload
2987
+ def setAttr(self, attrname: str, newval: float) -> None: ...
2988
+ @overload
2989
+ def setAttr(self, attrname: str, newval: str) -> None: ...
2990
+
2991
+ class QuadExpr:
2992
+ @overload
2993
+ def __init__(self) -> None: ...
2994
+ @overload
2995
+ def __init__(self, expr: float) -> None: ...
2996
+ @overload
2997
+ def __init__(self, expr: Var) -> None: ...
2998
+ @overload
2999
+ def __init__(self, expr: LinExpr) -> None: ...
3000
+ @overload
3001
+ def __init__(self, expr: QuadExpr) -> None: ...
3002
+ @overload
3003
+ def add(self, expr: float, mult: float = 1.0) -> None: ...
3004
+ @overload
3005
+ def add(self, expr: Var, mult: float = 1.0) -> None: ...
3006
+ @overload
3007
+ def add(self, expr: LinExpr, mult: float = 1.0) -> None: ...
3008
+ @overload
3009
+ def add(self, expr: QuadExpr, mult: float = 1.0) -> None: ...
3010
+ def addConstant(self, __constant: float) -> None: ...
3011
+ @overload
3012
+ def addTerms(
3013
+ self,
3014
+ coeffs: float,
3015
+ vars: Var,
3016
+ vars2: Optional[Var] = None
3017
+ ) -> None: ...
3018
+ @overload
3019
+ def addTerms(
3020
+ self,
3021
+ coeffs: Sequence[float],
3022
+ vars: Sequence[Var],
3023
+ vars2: Optional[Sequence[Var]] = None
3024
+ ) -> None: ...
3025
+ def clear(self) -> None: ...
3026
+ def copy(self) -> QuadExpr: ...
3027
+ def getCoeff(self, __i: int) -> float: ...
3028
+ def getLinExpr(self) -> LinExpr: ...
3029
+ def getValue(self) -> float: ...
3030
+ def getVar1(self, __i: int) -> Var: ...
3031
+ def getVar2(self, __i: int) -> Var: ...
3032
+ @overload
3033
+ def remove(self, __which: int) -> None: ...
3034
+ @overload
3035
+ def remove(self, __which: Var) -> None: ...
3036
+ def size(self) -> int: ...
3037
+ @overload
3038
+ def __add__(self, __expr: float) -> QuadExpr: ...
3039
+ @overload
3040
+ def __add__(self, __expr: Var) -> QuadExpr: ...
3041
+ @overload
3042
+ def __add__(self, __expr: LinExpr) -> QuadExpr: ...
3043
+ @overload
3044
+ def __add__(self, __expr: QuadExpr) -> QuadExpr: ...
3045
+ # used as constraint sense, not comparison
3046
+ @overload # type: ignore[override]
3047
+ def __eq__(self, __rhs: float) -> TempQConstr: ...
3048
+ @overload
3049
+ def __eq__(self, __rhs: Var) -> TempQConstr: ...
3050
+ @overload
3051
+ def __eq__(self, __rhs: LinExpr) -> TempQConstr: ...
3052
+ @overload
3053
+ def __eq__(self, __rhs: QuadExpr) -> TempQConstr: ...
3054
+ @overload
3055
+ def __ge__(self, __rhs: float) -> TempQConstr: ...
3056
+ @overload
3057
+ def __ge__(self, __rhs: Var) -> TempQConstr: ...
3058
+ @overload
3059
+ def __ge__(self, __rhs: LinExpr) -> TempQConstr: ...
3060
+ @overload
3061
+ def __ge__(self, __rhs: QuadExpr) -> TempQConstr: ...
3062
+ @overload
3063
+ def __iadd__(self, __expr: float) -> QuadExpr: ...
3064
+ @overload
3065
+ def __iadd__(self, __expr: Var) -> QuadExpr: ...
3066
+ @overload
3067
+ def __iadd__(self, __expr: LinExpr) -> QuadExpr: ...
3068
+ @overload
3069
+ def __iadd__(self, __expr: QuadExpr) -> QuadExpr: ...
3070
+ @overload
3071
+ def __imul__(self, __constant: float) -> QuadExpr: ...
3072
+ @overload
3073
+ def __imul__(self, __constant: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
3074
+ @overload
3075
+ def __isub__(self, __expr: float) -> QuadExpr: ...
3076
+ @overload
3077
+ def __isub__(self, __expr: Var) -> QuadExpr: ...
3078
+ @overload
3079
+ def __isub__(self, __expr: LinExpr) -> QuadExpr: ...
3080
+ @overload
3081
+ def __isub__(self, __expr: QuadExpr) -> QuadExpr: ...
3082
+ @overload
3083
+ def __le__(self, __rhs: float) -> TempQConstr: ...
3084
+ @overload
3085
+ def __le__(self, __rhs: Var) -> TempQConstr: ...
3086
+ @overload
3087
+ def __le__(self, __rhs: LinExpr) -> TempQConstr: ...
3088
+ @overload
3089
+ def __le__(self, __rhs: QuadExpr) -> TempQConstr: ...
3090
+ @overload
3091
+ def __mul__(self, expr: float) -> QuadExpr: ...
3092
+ @overload
3093
+ def __mul__(self, expr: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
3094
+ def __neg__(self) -> QuadExpr: ...
3095
+ @overload
3096
+ def __pow__(self, exponent: Literal[0]) -> float: ...
3097
+ @overload
3098
+ def __pow__(self, exponent: Literal[1]) -> QuadExpr: ...
3099
+ @overload
3100
+ def __pow__(self, exponent: _NLExprLike) -> NLExpr: ...
3101
+ def __rpow__(self, base: float) -> NLExpr: ...
3102
+ @overload
3103
+ def __radd__(self, __expr: float) -> QuadExpr: ...
3104
+ @overload
3105
+ def __radd__(self, __expr: Var) -> QuadExpr: ...
3106
+ @overload
3107
+ def __radd__(self, __expr: LinExpr) -> QuadExpr: ...
3108
+ @overload
3109
+ def __radd__(self, __expr: QuadExpr) -> QuadExpr: ...
3110
+ def __rmul__(self, __constant: float) -> QuadExpr: ...
3111
+ @overload
3112
+ def __rsub__(self, __expr: float) -> QuadExpr: ...
3113
+ @overload
3114
+ def __rsub__(self, __expr: Var) -> QuadExpr: ...
3115
+ @overload
3116
+ def __rsub__(self, __expr: LinExpr) -> QuadExpr: ...
3117
+ @overload
3118
+ def __rsub__(self, __expr: QuadExpr) -> QuadExpr: ...
3119
+ @overload
3120
+ def __sub__(self, __expr: float) -> QuadExpr: ...
3121
+ @overload
3122
+ def __sub__(self, __expr: Var) -> QuadExpr: ...
3123
+ @overload
3124
+ def __sub__(self, __expr: LinExpr) -> QuadExpr: ...
3125
+ @overload
3126
+ def __sub__(self, __expr: QuadExpr) -> QuadExpr: ...
3127
+ @overload
3128
+ def __truediv__(self, expr: float) -> QuadExpr: ...
3129
+ @overload
3130
+ def __truediv__(self, expr: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
3131
+ def __rtruediv__(self, expr: float) -> NLExpr: ...
3132
+
3133
+ class NLExpr(GenExpr):
3134
+ def __add__(self, exponent: _NLExprLike) -> NLExpr: ...
3135
+ def __radd__(self, exponent: _QuadExprLike) -> NLExpr: ...
3136
+ def __sub__(self, exponent: _NLExprLike) -> NLExpr: ...
3137
+ def __rsub__(self, exponent: _QuadExprLike) -> NLExpr: ...
3138
+ def __neg__(self) -> NLExpr: ...
3139
+ def __mul__(self, exponent: _NLExprLike) -> NLExpr: ...
3140
+ def __rmul__(self, exponent: _QuadExprLike) -> NLExpr: ...
3141
+ def __pow__(self, exponent: _NLExprLike) -> NLExpr: ...
3142
+ def __rpow__(self, base: float) -> NLExpr: ...
3143
+ def __truediv__(self, expr: _NLExprLike) -> NLExpr: ...
3144
+ def __rtruediv__(self, expr: _NLExprLike) -> NLExpr: ...
3145
+
3146
+ class SOS:
3147
+ IISSOS: int = ...
3148
+ IISSOSForce: int = ...
3149
+ def getAttr(self, attrname: str) -> int: ...
3150
+ def setAttr(self, attrname: str, newval: float) -> None: ...
3151
+ @property
3152
+ def index(self) -> int: ...
3153
+
3154
+ class StatusConstClass:
3155
+ CUTOFF: int = ...
3156
+ INFEASIBLE: int = ...
3157
+ INF_OR_UNBD: int = ...
3158
+ INPROGRESS: int = ...
3159
+ INTERRUPTED: int = ...
3160
+ ITERATION_LIMIT: int = ...
3161
+ LOADED: int = ...
3162
+ MEM_LIMIT: int = ...
3163
+ NODE_LIMIT: int = ...
3164
+ NUMERIC: int = ...
3165
+ OPTIMAL: int = ...
3166
+ SOLUTION_LIMIT: int = ...
3167
+ SUBOPTIMAL: int = ...
3168
+ TIME_LIMIT: int = ...
3169
+ UNBOUNDED: int = ...
3170
+ USER_OBJ_LIMIT: int = ...
3171
+ WORK_LIMIT: int = ...
3172
+
3173
+ class TempConstr: ...
3174
+
3175
+ # the following six classes are helper classes specifically for type hinting
3176
+ # they are not part of gurobipy
3177
+
3178
+ class TempGenConstr(TempConstr): ...
3179
+
3180
+ class TempMGenConstr(TempConstr): ...
3181
+
3182
+ class TempLConstr(TempConstr):
3183
+ def __rshift__(self, other: TempLConstr) -> TempGenConstr: ...
3184
+
3185
+ class TempMConstr(TempConstr): ...
3186
+
3187
+ class TempMQConstr(TempConstr): ...
3188
+
3189
+ class TempQConstr(TempConstr): ...
3190
+
3191
+ class Var:
3192
+ BarX: float = ...
3193
+ BranchPriority: int = ...
3194
+ IISLB: int = ...
3195
+ IISLBForce: int = ...
3196
+ IISUB: int = ...
3197
+ IISUBForce: int = ...
3198
+ LB: float = ...
3199
+ Obj: float = ...
3200
+ ObjN: float = ...
3201
+ PStart: float = ...
3202
+ PWLObjCvx: int = ...
3203
+ Partition: int = ...
3204
+ PoolIgnore: int = ...
3205
+ PoolNX: float = ...
3206
+ RC: float = ...
3207
+ SALBLow: float = ...
3208
+ SALBUp: float = ...
3209
+ SAObjLow: float = ...
3210
+ SAObjUp: float = ...
3211
+ SAUBLow: float = ...
3212
+ SAUBUp: float = ...
3213
+ ScenNLB: float = ...
3214
+ ScenNObj: float = ...
3215
+ ScenNUB: float = ...
3216
+ ScenNX: float = ...
3217
+ Start: float = ...
3218
+ UB: float = ...
3219
+ UnbdRay: float = ...
3220
+ VBasis: int = ...
3221
+ VTag: str = ...
3222
+ VType: str = ...
3223
+ VarHintPri: int = ...
3224
+ VarHintVal: float = ...
3225
+ VarName: str = ...
3226
+ X: float = ...
3227
+ Xn: float = ...
3228
+ def getAttr(self, attrname: str) -> Any: ...
3229
+ def sameAs(self, other: Var) -> bool: ...
3230
+ @overload
3231
+ def setAttr(self, attrname: str, newval: float) -> None: ...
3232
+ @overload
3233
+ def setAttr(self, attrname: str, newval: str) -> None: ...
3234
+ @overload
3235
+ def __add__(self, expr: float) -> LinExpr: ...
3236
+ @overload
3237
+ def __add__(self, expr: Var) -> LinExpr: ...
3238
+ @overload
3239
+ def __add__(self, expr: LinExpr) -> LinExpr: ...
3240
+ def __div__(self, constant: float) -> LinExpr: ...
3241
+ # used as constraint sense, not comparison
3242
+ @overload # type: ignore[override]
3243
+ def __eq__(self, rhs: float) -> TempLConstr: ...
3244
+ @overload
3245
+ def __eq__(self, rhs: Var) -> TempLConstr: ...
3246
+ @overload
3247
+ def __eq__(self, rhs: LinExpr) -> TempLConstr: ...
3248
+ @overload
3249
+ def __eq__(self, rhs: QuadExpr) -> TempQConstr: ...
3250
+ @overload
3251
+ def __eq__(self, rhs: GenExpr) -> TempGenConstr: ...
3252
+ @overload
3253
+ def __eq__(self, rhs: Sequence[float]) -> TempLConstr: ...
3254
+ @overload
3255
+ def __ge__(self, rhs: float) -> TempLConstr: ...
3256
+ @overload
3257
+ def __ge__(self, rhs: Var) -> TempLConstr: ...
3258
+ @overload
3259
+ def __ge__(self, rhs: LinExpr) -> TempLConstr: ...
3260
+ @overload
3261
+ def __ge__(self, rhs: QuadExpr) -> TempQConstr: ...
3262
+ @overload
3263
+ def __iadd__(self, expr: float) -> LinExpr: ...
3264
+ @overload
3265
+ def __iadd__(self, expr: Var) -> LinExpr: ...
3266
+ @overload
3267
+ def __iadd__(self, expr: LinExpr) -> LinExpr: ...
3268
+ @overload
3269
+ def __imul__(self, expr: float) -> LinExpr: ...
3270
+ @overload
3271
+ def __imul__(self, expr: Var) -> QuadExpr: ...
3272
+ @overload
3273
+ def __imul__(self, expr: LinExpr) -> QuadExpr: ...
3274
+ @overload
3275
+ def __imul__(self, expr: QuadExpr) -> NLExpr: ...
3276
+ @overload
3277
+ def __isub__(self, expr: float) -> LinExpr: ...
3278
+ @overload
3279
+ def __isub__(self, expr: Var) -> LinExpr: ...
3280
+ @overload
3281
+ def __isub__(self, expr: LinExpr) -> LinExpr: ...
3282
+ @overload
3283
+ def __le__(self, rhs: float) -> TempLConstr: ...
3284
+ @overload
3285
+ def __le__(self, rhs: Var) -> TempLConstr: ...
3286
+ @overload
3287
+ def __le__(self, rhs: LinExpr) -> TempLConstr: ...
3288
+ @overload
3289
+ def __le__(self, rhs: QuadExpr) -> TempQConstr: ...
3290
+ @overload
3291
+ def __mul__(self, expr: float) -> LinExpr: ...
3292
+ @overload
3293
+ def __mul__(self, expr: Var) -> QuadExpr: ...
3294
+ @overload
3295
+ def __mul__(self, expr: LinExpr) -> QuadExpr: ...
3296
+ @overload
3297
+ def __mul__(self, expr: QuadExpr) -> NLExpr: ...
3298
+ def __neg__(self) -> LinExpr: ...
3299
+ @overload
3300
+ def __pow__(self, exponent: Literal[0]) -> float: ...
3301
+ @overload
3302
+ def __pow__(self, exponent: Literal[1]) -> LinExpr: ...
3303
+ @overload
3304
+ def __pow__(self, exponent: Literal[2]) -> QuadExpr: ...
3305
+ @overload
3306
+ def __pow__(self, exponent: _NLExprLike) -> NLExpr: ...
3307
+ def __rpow__(self, base: float) -> NLExpr: ...
3308
+ @overload
3309
+ def __radd__(self, expr: float) -> LinExpr: ...
3310
+ @overload
3311
+ def __radd__(self, expr: Var) -> LinExpr: ...
3312
+ @overload
3313
+ def __radd__(self, expr: LinExpr) -> LinExpr: ...
3314
+ @overload
3315
+ def __rmul__(self, expr: float) -> LinExpr: ...
3316
+ @overload
3317
+ def __rmul__(self, expr: Var) -> QuadExpr: ...
3318
+ @overload
3319
+ def __rmul__(self, expr: LinExpr) -> QuadExpr: ...
3320
+ @overload
3321
+ def __rsub__(self, expr: float) -> LinExpr: ...
3322
+ @overload
3323
+ def __rsub__(self, expr: Var) -> LinExpr: ...
3324
+ @overload
3325
+ def __rsub__(self, expr: LinExpr) -> LinExpr: ...
3326
+ @overload
3327
+ def __sub__(self, expr: float) -> LinExpr: ...
3328
+ @overload
3329
+ def __sub__(self, expr: Var) -> LinExpr: ...
3330
+ @overload
3331
+ def __sub__(self, expr: LinExpr) -> LinExpr: ...
3332
+ @overload
3333
+ def __truediv__(self, expr: float) -> LinExpr: ...
3334
+ @overload
3335
+ def __truediv__(self, expr: Union[Var, LinExpr, QuadExpr]) -> NLExpr: ...
3336
+ def __rtruediv__(self, expr: float) -> NLExpr: ...
3337
+ @property
3338
+ def index(self) -> int: ...
3339
+
3340
+ class gurobi:
3341
+ @classmethod
3342
+ def platform(cls) -> str: ...
3343
+ @classmethod
3344
+ def version(cls) -> Tuple[int, int, int]: ...
3345
+
3346
+ class tupledict(Dict[_T, _U]):
3347
+ def clean(self) -> None: ...
3348
+ # expects KeysView
3349
+ def keys(self) -> tuplelist[_T]: ... # type: ignore[override]
3350
+ def prod(
3351
+ self,
3352
+ __d: Mapping[Any, float],
3353
+ *args: _Scalar
3354
+ ) -> LinExpr: ...
3355
+ def select(self, *args: Union[_Scalar, Sequence[_Scalar]]) -> List[_U]: ...
3356
+ def sum(self, *args: Union[_Scalar, Sequence[_Scalar]]) -> LinExpr: ...
3357
+ # expects ValuesView
3358
+ def values(self) -> List[_U]: ... # type: ignore[override]
3359
+
3360
+ class tuplelist(List[_T]):
3361
+ def clean(self) -> None: ...
3362
+ def select(self, *args: Union[_Scalar, Sequence[_Scalar]]) -> List[_T]: ...
3363
+ def __add__(self, other: Iterable[_U]) -> tuplelist[Union[_T, _U]]: ...
3364
+ def __iadd__(self, other: Iterable[_U]) -> tuplelist[Union[_T, _U]]: ...