gurobipy 12.0.2__cp310-cp310-win_amd64.whl → 13.0.0b1__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gurobipy/__init__.py +83 -4
- gurobipy/__init__.pyi +99 -2
- gurobipy/_attrconst.py +48 -2
- gurobipy/_attrutil.cp310-win_amd64.pyd +0 -0
- gurobipy/_batch.cp310-win_amd64.pyd +0 -0
- gurobipy/_callbackconst.py +21 -0
- gurobipy/_core.cp310-win_amd64.pyd +0 -0
- gurobipy/_exception.cp310-win_amd64.pyd +0 -0
- gurobipy/_grb.py +24 -19
- gurobipy/_helpers.cp310-win_amd64.pyd +0 -0
- gurobipy/_load_model.py +169 -0
- gurobipy/_lowlevel.cp310-win_amd64.pyd +0 -0
- gurobipy/_matrixapi.cp310-win_amd64.pyd +0 -0
- gurobipy/_model.cp310-win_amd64.pyd +0 -0
- gurobipy/_modelutil.cp310-win_amd64.pyd +0 -0
- gurobipy/_paramconst.py +68 -30
- gurobipy/_paramdetails.py +202 -25
- gurobipy/_statusconst.py +19 -17
- gurobipy/_util.cp310-win_amd64.pyd +0 -0
- gurobipy/gurobi.lic +4 -4
- gurobipy/{gurobi120.dll → gurobi130.dll} +0 -0
- gurobipy/nlfunc.py +2 -0
- gurobipy/nlfunc.pyi +9 -1
- {gurobipy-12.0.2.dist-info → gurobipy-13.0.0b1.dist-info}/METADATA +19 -7
- gurobipy-13.0.0b1.dist-info/RECORD +30 -0
- {gurobipy-12.0.2.dist-info → gurobipy-13.0.0b1.dist-info}/WHEEL +1 -1
- {gurobipy-12.0.2.dist-info → gurobipy-13.0.0b1.dist-info/licenses}/LICENSE.txt +537 -57
- gurobipy-12.0.2.dist-info/RECORD +0 -28
- {gurobipy-12.0.2.dist-info → gurobipy-13.0.0b1.dist-info}/top_level.txt +0 -0
gurobipy/__init__.py
CHANGED
|
@@ -1,4 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Python interface to the Gurobi Optimizer
|
|
3
|
+
|
|
4
|
+
The Gurobi Optimizer is a mathematical optimization software library for
|
|
5
|
+
solving mixed-integer linear, quadratic, and nonlinear optimization problems.
|
|
6
|
+
|
|
7
|
+
This package comes with a trial license that allows you to solve problems of
|
|
8
|
+
limited size. As a student or staff member of an academic institution, you
|
|
9
|
+
qualify for a free, full product license. For more information visit
|
|
10
|
+
https://www.gurobi.com/academia/academic-program-and-licenses/
|
|
11
|
+
|
|
12
|
+
For a commercial evaluation, you can request an evaluation license by
|
|
13
|
+
visiting https://www.gurobi.com/free-trial/.
|
|
14
|
+
|
|
15
|
+
Other useful resources to get started:
|
|
16
|
+
|
|
17
|
+
- Gurobi Documentation: https://docs.gurobi.com/
|
|
18
|
+
- Gurobi Community: https://support.gurobi.com/hc/en-us/community/topics/
|
|
19
|
+
|
|
20
|
+
A simple example, formulating and solving a mixed-integer linear program:
|
|
21
|
+
|
|
22
|
+
# maximize
|
|
23
|
+
# x + y + 2 z
|
|
24
|
+
# subject to
|
|
25
|
+
# x + 2 y + 3 z <= 4
|
|
26
|
+
# x + y >= 1
|
|
27
|
+
# x, y, z binary
|
|
28
|
+
|
|
29
|
+
import gurobipy as gp
|
|
30
|
+
|
|
31
|
+
with gp.Env() as env, gp.Model(env=env) as model:
|
|
32
|
+
|
|
33
|
+
# Create variables
|
|
34
|
+
x = model.addVar(vtype='B', name="x")
|
|
35
|
+
y = model.addVar(vtype='B', name="y")
|
|
36
|
+
z = model.addVar(vtype='B', name="z")
|
|
37
|
+
|
|
38
|
+
# Set objective function
|
|
39
|
+
model.setObjective(x + y + 2 * z, gp.GRB.MAXIMIZE)
|
|
40
|
+
|
|
41
|
+
# Add constraints
|
|
42
|
+
model.addConstr(x + 2 * y + 3 * z <= 4)
|
|
43
|
+
model.addConstr(x + y >= 1)
|
|
44
|
+
|
|
45
|
+
# Solve it!
|
|
46
|
+
model.optimize()
|
|
47
|
+
|
|
48
|
+
print(f"Optimal objective value: {model.ObjVal}")
|
|
49
|
+
print(f"Solution values: x={x.X}, y={y.X}, z={z.X}")
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
__version__ = "13.0.0b1"
|
|
2
53
|
|
|
3
54
|
from gurobipy._batch import Batch
|
|
4
55
|
|
|
@@ -25,14 +76,11 @@ from gurobipy._core import (
|
|
|
25
76
|
disposeDefaultEnv,
|
|
26
77
|
getParamInfo,
|
|
27
78
|
gurobi,
|
|
28
|
-
help,
|
|
29
|
-
models,
|
|
30
79
|
paramHelp,
|
|
31
80
|
read,
|
|
32
81
|
readParams,
|
|
33
82
|
resetParams,
|
|
34
83
|
setParam,
|
|
35
|
-
system,
|
|
36
84
|
writeParams,
|
|
37
85
|
)
|
|
38
86
|
|
|
@@ -57,4 +105,35 @@ from gurobipy._matrixapi import (
|
|
|
57
105
|
|
|
58
106
|
from gurobipy._model import Model
|
|
59
107
|
|
|
108
|
+
from gurobipy._load_model import loadModel
|
|
109
|
+
|
|
60
110
|
import gurobipy.nlfunc as nlfunc
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# fmt: off
|
|
114
|
+
__all__ = [
|
|
115
|
+
# _batch
|
|
116
|
+
"Batch",
|
|
117
|
+
# _core
|
|
118
|
+
"Column", "Constr", "Env", "GenConstr", "GenExpr", "LinExpr", "QConstr",
|
|
119
|
+
"QuadExpr", "SOS", "Var", "NLExpr", "TempConstr", "tuplelist", "tupledict",
|
|
120
|
+
"abs_", "all_", "and_", "any_", "max_", "min_", "norm", "or_",
|
|
121
|
+
"disposeDefaultEnv", "getParamInfo", "gurobi", "paramHelp", "read",
|
|
122
|
+
"readParams", "resetParams", "setParam", "writeParams",
|
|
123
|
+
# _exception
|
|
124
|
+
"GurobiError",
|
|
125
|
+
# _grb
|
|
126
|
+
"GRB",
|
|
127
|
+
# _helpers
|
|
128
|
+
"multidict", "quicksum",
|
|
129
|
+
# _matrixapi
|
|
130
|
+
"MConstr", "MGenConstr", "MLinExpr", "MQConstr", "MQuadExpr", "MVar",
|
|
131
|
+
"MNLExpr", "concatenate", "hstack", "vstack",
|
|
132
|
+
# _model
|
|
133
|
+
"Model",
|
|
134
|
+
# _load_model
|
|
135
|
+
"loadModel",
|
|
136
|
+
# _nlfunc
|
|
137
|
+
"nlfunc",
|
|
138
|
+
]
|
|
139
|
+
# fmt: on
|
gurobipy/__init__.pyi
CHANGED
|
@@ -85,7 +85,6 @@ def getParamInfo(
|
|
|
85
85
|
__paramname: str
|
|
86
86
|
) -> Tuple[str, Type[Any], Any, Any, Any, Any]: ...
|
|
87
87
|
def help(argument: Any = None) -> None: ...
|
|
88
|
-
def models() -> None: ...
|
|
89
88
|
@overload
|
|
90
89
|
def multidict(
|
|
91
90
|
__data: Mapping[_T, float]
|
|
@@ -151,11 +150,12 @@ def resetParams() -> None: ...
|
|
|
151
150
|
def setParam(paramname: str, newvalue: float) -> None: ...
|
|
152
151
|
@overload
|
|
153
152
|
def setParam(paramname: str, newvalue: str) -> None: ...
|
|
154
|
-
def system(__command: str) -> None: ...
|
|
155
153
|
def writeParams(__filename: str) -> None: ...
|
|
156
154
|
|
|
157
155
|
class AttrConstClass:
|
|
156
|
+
BarStatus: str = ...
|
|
158
157
|
BarIterCount: str = ...
|
|
158
|
+
PDHGIterCount: str = ...
|
|
159
159
|
BarX: str = ...
|
|
160
160
|
BarPi: str = ...
|
|
161
161
|
BatchErrorCode: str = ...
|
|
@@ -260,6 +260,7 @@ class AttrConstClass:
|
|
|
260
260
|
MinRHS: str = ...
|
|
261
261
|
ModelName: str = ...
|
|
262
262
|
ModelSense: str = ...
|
|
263
|
+
NLBarIterCount: str = ...
|
|
263
264
|
NodeCount: str = ...
|
|
264
265
|
NumBinVars: str = ...
|
|
265
266
|
NumConstrs: str = ...
|
|
@@ -267,6 +268,7 @@ class AttrConstClass:
|
|
|
267
268
|
NumIntVars: str = ...
|
|
268
269
|
NumNZs: str = ...
|
|
269
270
|
NumObj: str = ...
|
|
271
|
+
NumObjPasses: str = ...
|
|
270
272
|
NumPWLObjVars: str = ...
|
|
271
273
|
NumQCNZs: str = ...
|
|
272
274
|
NumQConstrs: str = ...
|
|
@@ -282,18 +284,40 @@ class AttrConstClass:
|
|
|
282
284
|
ObjN: str = ...
|
|
283
285
|
ObjNAbsTol: str = ...
|
|
284
286
|
ObjNCon: str = ...
|
|
287
|
+
ObjNPass: str = ...
|
|
288
|
+
ObjNPassIterCount: str = ...
|
|
289
|
+
ObjNPassMIPGap: str = ...
|
|
285
290
|
ObjNName: str = ...
|
|
291
|
+
ObjNPassNodeCount: str = ...
|
|
292
|
+
ObjNPassObjBound: str = ...
|
|
293
|
+
ObjNPassObjVal: str = ...
|
|
294
|
+
ObjNPassOpenNodeCount: str = ...
|
|
286
295
|
ObjNPriority: str = ...
|
|
287
296
|
ObjNRelTol: str = ...
|
|
297
|
+
ObjNPassRuntime: str = ...
|
|
298
|
+
ObjNPassStatus: str = ...
|
|
288
299
|
ObjNVal: str = ...
|
|
289
300
|
ObjNWeight: str = ...
|
|
301
|
+
ObjNPassWork: str = ...
|
|
290
302
|
ObjVal: str = ...
|
|
291
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 = ...
|
|
292
314
|
PStart: str = ...
|
|
293
315
|
PWLObjCvx: str = ...
|
|
294
316
|
Partition: str = ...
|
|
295
317
|
Pi: str = ...
|
|
296
318
|
PoolIgnore: str = ...
|
|
319
|
+
PoolNObjVal: str = ...
|
|
320
|
+
PoolNX: str = ...
|
|
297
321
|
PoolObjBound: str = ...
|
|
298
322
|
PoolObjVal: str = ...
|
|
299
323
|
PreFixVal: str = ...
|
|
@@ -425,6 +449,13 @@ class CallbackClass:
|
|
|
425
449
|
MULTIOBJ_NODLFT: int = ...
|
|
426
450
|
MULTIOBJ_RUNTIME: int = ...
|
|
427
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 = ...
|
|
428
459
|
POLLING: int = ...
|
|
429
460
|
PRESOLVE: int = ...
|
|
430
461
|
PRE_BNDCHG: int = ...
|
|
@@ -658,6 +689,7 @@ class GRB:
|
|
|
658
689
|
METHOD_DETERMINISTIC_CONCURRENT_SIMPLEX: int = ...
|
|
659
690
|
METHOD_DUAL: int = ...
|
|
660
691
|
METHOD_NONE: int = ...
|
|
692
|
+
METHOD_PDHG: int = ...
|
|
661
693
|
METHOD_PRIMAL: int = ...
|
|
662
694
|
MINIMIZE: int = ...
|
|
663
695
|
NODE_LIMIT: int = ...
|
|
@@ -1291,6 +1323,7 @@ class MVar:
|
|
|
1291
1323
|
PWLObjCvx: int = ...
|
|
1292
1324
|
Partition: int = ...
|
|
1293
1325
|
PoolIgnore: int = ...
|
|
1326
|
+
PoolNX: float = ...
|
|
1294
1327
|
RC: float = ...
|
|
1295
1328
|
SALBLow: float = ...
|
|
1296
1329
|
SALBUp: float = ...
|
|
@@ -1455,6 +1488,7 @@ class MVar:
|
|
|
1455
1488
|
|
|
1456
1489
|
class Model:
|
|
1457
1490
|
BarIterCount: int = ...
|
|
1491
|
+
PDHGIterCount: int = ...
|
|
1458
1492
|
BoundSVio: float = ...
|
|
1459
1493
|
BoundSVioIndex: int = ...
|
|
1460
1494
|
BoundSVioSum: float = ...
|
|
@@ -1526,6 +1560,7 @@ class Model:
|
|
|
1526
1560
|
MinRHS: float = ...
|
|
1527
1561
|
ModelName: str = ...
|
|
1528
1562
|
ModelSense: int = ...
|
|
1563
|
+
NLBarIterCount: int = ...
|
|
1529
1564
|
NodeCount: float = ...
|
|
1530
1565
|
NumBinVars: int = ...
|
|
1531
1566
|
NumConstrs: int = ...
|
|
@@ -1533,6 +1568,7 @@ class Model:
|
|
|
1533
1568
|
NumIntVars: int = ...
|
|
1534
1569
|
NumNZs: int = ...
|
|
1535
1570
|
NumObj: int = ...
|
|
1571
|
+
NumObjPasses: int = ...
|
|
1536
1572
|
NumPWLObjVars: int = ...
|
|
1537
1573
|
NumQCNZs: int = ...
|
|
1538
1574
|
NumQConstrs: int = ...
|
|
@@ -1546,14 +1582,35 @@ class Model:
|
|
|
1546
1582
|
ObjCon: float = ...
|
|
1547
1583
|
ObjNAbsTol: float = ...
|
|
1548
1584
|
ObjNCon: float = ...
|
|
1585
|
+
ObjNPass: int = ...
|
|
1586
|
+
ObjNPassIterCount: float = ...
|
|
1587
|
+
ObjNPassMIPGap: float = ...
|
|
1588
|
+
ObjNPassNodeCount: float = ...
|
|
1549
1589
|
ObjNName: str = ...
|
|
1590
|
+
ObjNPassObjBound: float = ...
|
|
1591
|
+
ObjNPassObjVal: float = ...
|
|
1592
|
+
ObjNPassOpenNodeCount: float = ...
|
|
1550
1593
|
ObjNPriority: int = ...
|
|
1551
1594
|
ObjNRelTol: float = ...
|
|
1595
|
+
ObjNPassRuntime: float = ...
|
|
1596
|
+
ObjNPassStatus: int = ...
|
|
1552
1597
|
ObjNVal: float = ...
|
|
1553
1598
|
ObjNWeight: float = ...
|
|
1599
|
+
ObjNPassWork: float = ...
|
|
1554
1600
|
ObjVal: float = ...
|
|
1555
1601
|
OpenNodeCount: float = ...
|
|
1556
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 = ...
|
|
1557
1614
|
PoolObjBound: float = ...
|
|
1558
1615
|
PoolObjVal: float = ...
|
|
1559
1616
|
Runtime: float = ...
|
|
@@ -2136,6 +2193,11 @@ class Model:
|
|
|
2136
2193
|
def fixed(self) -> Model: ...
|
|
2137
2194
|
# no type hinting for scipy.sparse
|
|
2138
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]: ...
|
|
2139
2201
|
@overload
|
|
2140
2202
|
def getAttr(self, attrname: str) -> Any: ...
|
|
2141
2203
|
@overload
|
|
@@ -2329,6 +2391,8 @@ class Model:
|
|
|
2329
2391
|
@overload
|
|
2330
2392
|
def setAttr(self, attrname: str, arg1: str) -> None: ...
|
|
2331
2393
|
@overload
|
|
2394
|
+
def setAttr(self, attrname: str, arg1: Sequence[_Scalar]) -> None: ...
|
|
2395
|
+
@overload
|
|
2332
2396
|
def setAttr(
|
|
2333
2397
|
self,
|
|
2334
2398
|
attrname: str,
|
|
@@ -2555,6 +2619,7 @@ class ParamClass:
|
|
|
2555
2619
|
DualReductions: int = ...
|
|
2556
2620
|
FeasRelaxBigM: float = ...
|
|
2557
2621
|
FeasibilityTol: float = ...
|
|
2622
|
+
FixVarsInIndicators: int = ...
|
|
2558
2623
|
FlowCoverCuts: int = ...
|
|
2559
2624
|
FlowPathCuts: int = ...
|
|
2560
2625
|
FuncMaxVal: float = ...
|
|
@@ -2572,8 +2637,10 @@ class ParamClass:
|
|
|
2572
2637
|
ImproveStartGap: float = ...
|
|
2573
2638
|
ImproveStartNodes: float = ...
|
|
2574
2639
|
ImproveStartTime: float = ...
|
|
2640
|
+
ImproveStartWork: float = ...
|
|
2575
2641
|
InfProofCuts: int = ...
|
|
2576
2642
|
InfUnbdInfo: int = ...
|
|
2643
|
+
InheritParams: int = ...
|
|
2577
2644
|
IntFeasTol: float = ...
|
|
2578
2645
|
IntegralityFocus: int = ...
|
|
2579
2646
|
IterationLimit: float = ...
|
|
@@ -2601,6 +2668,11 @@ class ParamClass:
|
|
|
2601
2668
|
NLPHeur: int = ...
|
|
2602
2669
|
NetworkAlg: int = ...
|
|
2603
2670
|
NetworkCuts: int = ...
|
|
2671
|
+
NLBarCFeasTol: float = ...
|
|
2672
|
+
NLBarDFeasTol: float = ...
|
|
2673
|
+
NLBarIterLimit: int = ...
|
|
2674
|
+
NLBarPFeasTol: float = ...
|
|
2675
|
+
NoRelHeurSolutions: int = ...
|
|
2604
2676
|
NoRelHeurTime: float = ...
|
|
2605
2677
|
NoRelHeurWork: float = ...
|
|
2606
2678
|
NodeLimit: float = ...
|
|
@@ -2613,8 +2685,14 @@ class ParamClass:
|
|
|
2613
2685
|
OBBT: int = ...
|
|
2614
2686
|
ObjNumber: int = ...
|
|
2615
2687
|
ObjScale: float = ...
|
|
2688
|
+
OptimalityTarget: int = ...
|
|
2616
2689
|
OptimalityTol: float = ...
|
|
2617
2690
|
OutputFlag: int = ...
|
|
2691
|
+
PDHGIterLimit: float = ...
|
|
2692
|
+
PDHGRelTol: float = ...
|
|
2693
|
+
PDHGAbsTol: float = ...
|
|
2694
|
+
PDHGConvTol: float = ...
|
|
2695
|
+
PDHGGPU: int = ...
|
|
2618
2696
|
PSDCuts: int = ...
|
|
2619
2697
|
PSDTol: float = ...
|
|
2620
2698
|
PartitionPlace: int = ...
|
|
@@ -2658,6 +2736,8 @@ class ParamClass:
|
|
|
2658
2736
|
SolutionNumber: int = ...
|
|
2659
2737
|
StartNodeLimit: int = ...
|
|
2660
2738
|
StartNumber: int = ...
|
|
2739
|
+
StartTimeLimit: float = ...
|
|
2740
|
+
StartWorkLimit: float = ...
|
|
2661
2741
|
StrongCGCuts: int = ...
|
|
2662
2742
|
SubMIPCuts: int = ...
|
|
2663
2743
|
SubMIPNodes: int = ...
|
|
@@ -2740,6 +2820,7 @@ class ParamConstClass:
|
|
|
2740
2820
|
DualReductions: str = ...
|
|
2741
2821
|
FeasRelaxBigM: str = ...
|
|
2742
2822
|
FeasibilityTol: str = ...
|
|
2823
|
+
FixVarsInIndicators: str = ...
|
|
2743
2824
|
FlowCoverCuts: str = ...
|
|
2744
2825
|
FlowPathCuts: str = ...
|
|
2745
2826
|
FuncMaxVal: str = ...
|
|
@@ -2757,8 +2838,10 @@ class ParamConstClass:
|
|
|
2757
2838
|
ImproveStartGap: str = ...
|
|
2758
2839
|
ImproveStartNodes: str = ...
|
|
2759
2840
|
ImproveStartTime: str = ...
|
|
2841
|
+
ImproveStartWork: str = ...
|
|
2760
2842
|
InfProofCuts: str = ...
|
|
2761
2843
|
InfUnbdInfo: str = ...
|
|
2844
|
+
InheritParams: str = ...
|
|
2762
2845
|
IntFeasTol: str = ...
|
|
2763
2846
|
IntegralityFocus: str = ...
|
|
2764
2847
|
IterationLimit: str = ...
|
|
@@ -2786,6 +2869,11 @@ class ParamConstClass:
|
|
|
2786
2869
|
NLPHeur: str = ...
|
|
2787
2870
|
NetworkAlg: str = ...
|
|
2788
2871
|
NetworkCuts: str = ...
|
|
2872
|
+
NLBarCFeasTol: str = ...
|
|
2873
|
+
NLBarDFeasTol: str = ...
|
|
2874
|
+
NLBarIterLimit: str = ...
|
|
2875
|
+
NLBarPFeasTol: str = ...
|
|
2876
|
+
NoRelHeurSolutions: str = ...
|
|
2789
2877
|
NoRelHeurTime: str = ...
|
|
2790
2878
|
NoRelHeurWork: str = ...
|
|
2791
2879
|
NodeLimit: str = ...
|
|
@@ -2799,7 +2887,13 @@ class ParamConstClass:
|
|
|
2799
2887
|
ObjNumber: str = ...
|
|
2800
2888
|
ObjScale: str = ...
|
|
2801
2889
|
OptimalityTol: str = ...
|
|
2890
|
+
OptimalityTarget: str = ...
|
|
2802
2891
|
OutputFlag: str = ...
|
|
2892
|
+
PDHGIterLimit: str = ...
|
|
2893
|
+
PDHGRelTol: str = ...
|
|
2894
|
+
PDHGAbsTol: str = ...
|
|
2895
|
+
PDHGConvTol: str = ...
|
|
2896
|
+
PDHGGPU: str = ...
|
|
2803
2897
|
PSDCuts: str = ...
|
|
2804
2898
|
PSDTol: str = ...
|
|
2805
2899
|
PartitionPlace: str = ...
|
|
@@ -2843,6 +2937,8 @@ class ParamConstClass:
|
|
|
2843
2937
|
SolutionNumber: str = ...
|
|
2844
2938
|
StartNodeLimit: str = ...
|
|
2845
2939
|
StartNumber: str = ...
|
|
2940
|
+
StartTimeLimit: str = ...
|
|
2941
|
+
StartWorkLimit: str = ...
|
|
2846
2942
|
StrongCGCuts: str = ...
|
|
2847
2943
|
SubMIPCuts: str = ...
|
|
2848
2944
|
SubMIPNodes: str = ...
|
|
@@ -3106,6 +3202,7 @@ class Var:
|
|
|
3106
3202
|
PWLObjCvx: int = ...
|
|
3107
3203
|
Partition: int = ...
|
|
3108
3204
|
PoolIgnore: int = ...
|
|
3205
|
+
PoolNX: float = ...
|
|
3109
3206
|
RC: float = ...
|
|
3110
3207
|
SALBLow: float = ...
|
|
3111
3208
|
SALBUp: float = ...
|
gurobipy/_attrconst.py
CHANGED
|
@@ -34,7 +34,8 @@ class AttrConstClass(object):
|
|
|
34
34
|
objVal: Objective value for current solution
|
|
35
35
|
objBound: Best available lower bound on solution objective
|
|
36
36
|
poolObjBound: Bound on objective for undiscovered solutions
|
|
37
|
-
|
|
37
|
+
poolNObjVal: Retrieve the objective value of an alternate MIP solution
|
|
38
|
+
poolObjVal: Deprecated since v13 - use poolNObjVal instead
|
|
38
39
|
MIPGap: Current relative MIP optimality gap
|
|
39
40
|
runtime: Runtime (in seconds) for most recent optimization
|
|
40
41
|
work: Work (in work units) for most recent optimization
|
|
@@ -44,6 +45,8 @@ class AttrConstClass(object):
|
|
|
44
45
|
iterCount: Number of simplex iterations performed
|
|
45
46
|
nodeCount: Number of branch-and-cut nodes explored
|
|
46
47
|
barIterCount: Number of barrier iterations performed
|
|
48
|
+
nlbarIterCount: Number of NL barrier iterations performed
|
|
49
|
+
PDHGIterCount: Number of PDHG iterations performed
|
|
47
50
|
isMIP: Indicates whether the model is MIP (1) or not (0)
|
|
48
51
|
isQP: Indicates whether the model has a quadratic objective
|
|
49
52
|
isQCP: Indicates whether the model has quadratic constraints
|
|
@@ -82,7 +85,8 @@ class AttrConstClass(object):
|
|
|
82
85
|
varName: Variable name
|
|
83
86
|
x: Solution value
|
|
84
87
|
rc: Reduced cost
|
|
85
|
-
|
|
88
|
+
poolNX: Solution value in alternate MIP solution
|
|
89
|
+
xn: Deprecated since v13 - use poolNX instead
|
|
86
90
|
start: Start vector (use GRB.UNDEFINED to leave a value unspecified)
|
|
87
91
|
vBasis: Basis status
|
|
88
92
|
varHintVal: Variable hint value
|
|
@@ -177,6 +181,18 @@ class AttrConstClass(object):
|
|
|
177
181
|
ObjNName: names of multi-objectives
|
|
178
182
|
NumObj: number of multi-objectives
|
|
179
183
|
|
|
184
|
+
NumObjPasses: number of optimization passes during the multi-objective solve
|
|
185
|
+
ObjNPass: optimization pass in which the selected objective function was solved
|
|
186
|
+
ObjNPassIterCount: simplex iteration count for a pass during the multi-objective solve
|
|
187
|
+
ObjNPassMIPGap: MIP gap for a pass during the multi-objective solve
|
|
188
|
+
ObjNPassNodeCount: number of explored nodes for a pass during the multi-objective solve
|
|
189
|
+
ObjNPassObjBound: objective bound for a pass during the multi-objective solve
|
|
190
|
+
ObjNPassObjVal: objective value for a pass during the multi-objective solve
|
|
191
|
+
ObjNPassOpenNodeCount: number of unexplored nodes for a pass during the multi-objective solve
|
|
192
|
+
ObjNPassRuntime: run time for a pass during the multi-objective solve
|
|
193
|
+
ObjNPassStatus: status for a pass during the multi-objective solve
|
|
194
|
+
ObjNPassWork: work done for a pass during the multi-objective solve
|
|
195
|
+
|
|
180
196
|
Multi-scenarios
|
|
181
197
|
|
|
182
198
|
ScenNLB: modification to lower bound vector in current scenario
|
|
@@ -245,6 +261,7 @@ class AttrConstClass(object):
|
|
|
245
261
|
ObjBound = "ObjBound"
|
|
246
262
|
ObjBoundC = "ObjBoundC"
|
|
247
263
|
PoolObjBound = "PoolObjBound"
|
|
264
|
+
PoolNObjVal = "PoolNObjVal"
|
|
248
265
|
PoolObjVal = "PoolObjVal"
|
|
249
266
|
MIPGap = "MIPGap"
|
|
250
267
|
Runtime = "Runtime"
|
|
@@ -253,7 +270,10 @@ class AttrConstClass(object):
|
|
|
253
270
|
SolCount = "SolCount"
|
|
254
271
|
IterCount = "IterCount"
|
|
255
272
|
NodeCount = "NodeCount"
|
|
273
|
+
BarStatus = "BarStatus"
|
|
256
274
|
BarIterCount = "BarIterCount"
|
|
275
|
+
NLBarIterCount = "NLBarIterCount"
|
|
276
|
+
PDHGIterCount = "PDHGIterCount"
|
|
257
277
|
FarkasProof = "FarkasProof"
|
|
258
278
|
NumStart = "NumStart"
|
|
259
279
|
TuneResultCount = "TuneResultCount"
|
|
@@ -272,6 +292,7 @@ class AttrConstClass(object):
|
|
|
272
292
|
VarName = "VarName"
|
|
273
293
|
X = "X"
|
|
274
294
|
RC = "RC"
|
|
295
|
+
PoolNX = "PoolNX"
|
|
275
296
|
Xn = "Xn"
|
|
276
297
|
BarX = "BarX"
|
|
277
298
|
BarPi = "BarPi"
|
|
@@ -399,6 +420,19 @@ class AttrConstClass(object):
|
|
|
399
420
|
IntVioIndex = "IntVioIndex"
|
|
400
421
|
IntVioSum = "IntVioSum"
|
|
401
422
|
|
|
423
|
+
# Solution pool quality attributes
|
|
424
|
+
|
|
425
|
+
PoolNMaxVio = "PoolNMaxVio"
|
|
426
|
+
PoolNBoundVio = "PoolNBoundVio"
|
|
427
|
+
PoolNBoundVioIndex = "PoolNBoundVioIndex"
|
|
428
|
+
PoolNBoundVioSum = "PoolNBoundVioSum"
|
|
429
|
+
PoolNConstrVio = "PoolNConstrVio"
|
|
430
|
+
PoolNConstrVioIndex = "PoolNConstrVioIndex"
|
|
431
|
+
PoolNConstrVioSum = "PoolNConstrVioSum"
|
|
432
|
+
PoolNIntVio = "PoolNIntVio"
|
|
433
|
+
PoolNIntVioIndex = "PoolNIntVioIndex"
|
|
434
|
+
PoolNIntVioSum = "PoolNIntVioSum"
|
|
435
|
+
|
|
402
436
|
# Multi-objective attributes
|
|
403
437
|
|
|
404
438
|
ObjN = "ObjN"
|
|
@@ -411,6 +445,18 @@ class AttrConstClass(object):
|
|
|
411
445
|
ObjNName = "ObjNName"
|
|
412
446
|
NumObj = "NumObj"
|
|
413
447
|
|
|
448
|
+
NumObjPasses = "NumObjPasses"
|
|
449
|
+
ObjNPass = "ObjNPass"
|
|
450
|
+
ObjNPassIterCount = "ObjNPassIterCount"
|
|
451
|
+
ObjNPassMIPGap = "ObjNPassMIPGap"
|
|
452
|
+
ObjNPassNodeCount = "ObjNPassNodeCount"
|
|
453
|
+
ObjNPassObjBound = "ObjNPassObjBound"
|
|
454
|
+
ObjNPassObjVal = "ObjNPassObjVal"
|
|
455
|
+
ObjNPassOpenNodeCount = "ObjNPassOpenNodeCount"
|
|
456
|
+
ObjNPassRuntime = "ObjNPassRuntime"
|
|
457
|
+
ObjNPassStatus = "ObjNPassStatus"
|
|
458
|
+
ObjNPassWork = "ObjNPassWork"
|
|
459
|
+
|
|
414
460
|
# Multi-scenario attributes
|
|
415
461
|
|
|
416
462
|
ScenNLB = "ScenNLB"
|
|
Binary file
|
|
Binary file
|
gurobipy/_callbackconst.py
CHANGED
|
@@ -19,6 +19,7 @@ class CallbackConstClass(object):
|
|
|
19
19
|
MIPNODE: MIP node information available
|
|
20
20
|
MULTIOBJ: In multi-objective optimization
|
|
21
21
|
IIS: In IIS computation
|
|
22
|
+
NLBAR: In NL barrier
|
|
22
23
|
MESSAGE: Optimizer output a message
|
|
23
24
|
|
|
24
25
|
Your method can call Model.cbGet() to obtain detailed information
|
|
@@ -92,6 +93,11 @@ class CallbackConstClass(object):
|
|
|
92
93
|
IIS_BOUNDMIN: Minimum number of bounds in IIS
|
|
93
94
|
IIS_BOUNDMAX: Maximum number of bounds in IIS
|
|
94
95
|
IIS_BOUNDGUESS: Estimated number of bounds in IIS
|
|
96
|
+
NLBAR_ITRCNT: NL barrier iteration count
|
|
97
|
+
NLBAR_PRIMOBJ: NL barrier iterate primal objective
|
|
98
|
+
NLBAR_PRIMINF: NL barrier iterate primal infeasibility
|
|
99
|
+
NLBAR_DUALINF: NL barrier iterate dual infeasibility
|
|
100
|
+
NLBAR_COMPL: NL barrier iterate complementarity violation
|
|
95
101
|
MSG_STRING: Output message
|
|
96
102
|
|
|
97
103
|
Your callback method can call other methods on the model object:
|
|
@@ -113,6 +119,8 @@ class CallbackConstClass(object):
|
|
|
113
119
|
BARRIER = 7
|
|
114
120
|
MULTIOBJ = 8
|
|
115
121
|
IIS = 9
|
|
122
|
+
PDHG = 10
|
|
123
|
+
NLBAR = 11
|
|
116
124
|
|
|
117
125
|
PRE_COLDEL = 1000
|
|
118
126
|
PRE_ROWDEL = 1001
|
|
@@ -183,3 +191,16 @@ class CallbackConstClass(object):
|
|
|
183
191
|
IIS_BOUNDMIN = 9004
|
|
184
192
|
IIS_BOUNDMAX = 9005
|
|
185
193
|
IIS_BOUNDGUESS = 9006
|
|
194
|
+
|
|
195
|
+
PDHG_ITRCNT = 10001
|
|
196
|
+
PDHG_PRIMOBJ = 10002
|
|
197
|
+
PDHG_DUALOBJ = 10003
|
|
198
|
+
PDHG_PRIMINF = 10004
|
|
199
|
+
PDHG_DUALINF = 10005
|
|
200
|
+
PDHG_COMPL = 10006
|
|
201
|
+
|
|
202
|
+
NLBAR_ITRCNT = 11001
|
|
203
|
+
NLBAR_PRIMOBJ = 11002
|
|
204
|
+
NLBAR_PRIMINF = 11003
|
|
205
|
+
NLBAR_DUALINF = 11004
|
|
206
|
+
NLBAR_COMPL = 11005
|
|
Binary file
|
|
Binary file
|
gurobipy/_grb.py
CHANGED
|
@@ -51,23 +51,25 @@ class GRB(object):
|
|
|
51
51
|
|
|
52
52
|
# Status codes
|
|
53
53
|
|
|
54
|
-
LOADED
|
|
55
|
-
OPTIMAL
|
|
56
|
-
INFEASIBLE
|
|
57
|
-
INF_OR_UNBD
|
|
58
|
-
UNBOUNDED
|
|
59
|
-
CUTOFF
|
|
60
|
-
ITERATION_LIMIT
|
|
61
|
-
NODE_LIMIT
|
|
62
|
-
TIME_LIMIT
|
|
63
|
-
SOLUTION_LIMIT
|
|
64
|
-
INTERRUPTED
|
|
65
|
-
NUMERIC
|
|
66
|
-
SUBOPTIMAL
|
|
67
|
-
INPROGRESS
|
|
68
|
-
USER_OBJ_LIMIT
|
|
69
|
-
WORK_LIMIT
|
|
70
|
-
MEM_LIMIT
|
|
54
|
+
LOADED = 1
|
|
55
|
+
OPTIMAL = 2
|
|
56
|
+
INFEASIBLE = 3
|
|
57
|
+
INF_OR_UNBD = 4
|
|
58
|
+
UNBOUNDED = 5
|
|
59
|
+
CUTOFF = 6
|
|
60
|
+
ITERATION_LIMIT = 7
|
|
61
|
+
NODE_LIMIT = 8
|
|
62
|
+
TIME_LIMIT = 9
|
|
63
|
+
SOLUTION_LIMIT = 10
|
|
64
|
+
INTERRUPTED = 11
|
|
65
|
+
NUMERIC = 12
|
|
66
|
+
SUBOPTIMAL = 13
|
|
67
|
+
INPROGRESS = 14
|
|
68
|
+
USER_OBJ_LIMIT = 15
|
|
69
|
+
WORK_LIMIT = 16
|
|
70
|
+
MEM_LIMIT = 17
|
|
71
|
+
LOCALLY_OPTIMAL = 18
|
|
72
|
+
LOCALLY_INFEASIBLE = 19
|
|
71
73
|
|
|
72
74
|
# Batch status codes
|
|
73
75
|
|
|
@@ -142,6 +144,8 @@ class GRB(object):
|
|
|
142
144
|
OPCODE_LOG2 = 15
|
|
143
145
|
OPCODE_LOG10 = 16
|
|
144
146
|
OPCODE_LOGISTIC = 17
|
|
147
|
+
OPCODE_TANH = 18
|
|
148
|
+
OPCODE_SIGNPOW = 19
|
|
145
149
|
|
|
146
150
|
# Basis status
|
|
147
151
|
|
|
@@ -169,9 +173,9 @@ class GRB(object):
|
|
|
169
173
|
|
|
170
174
|
# Version number
|
|
171
175
|
|
|
172
|
-
VERSION_MAJOR =
|
|
176
|
+
VERSION_MAJOR = 13
|
|
173
177
|
VERSION_MINOR = 0
|
|
174
|
-
VERSION_TECHNICAL =
|
|
178
|
+
VERSION_TECHNICAL = 0
|
|
175
179
|
|
|
176
180
|
# Errors
|
|
177
181
|
|
|
@@ -236,6 +240,7 @@ class GRB(object):
|
|
|
236
240
|
METHOD_CONCURRENT = 3
|
|
237
241
|
METHOD_DETERMINISTIC_CONCURRENT = 4
|
|
238
242
|
METHOD_DETERMINISTIC_CONCURRENT_SIMPLEX = 5
|
|
243
|
+
METHOD_PDHG = 6
|
|
239
244
|
|
|
240
245
|
# BarHomogeneous parameter values
|
|
241
246
|
|
|
Binary file
|