gurobipy 10.0.1__cp311-cp311-macosx_10_9_universal2.whl → 13.0.0__cp311-cp311-macosx_10_9_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,47 @@
1
+ # Wrapper for 'GRB.Status' object
2
+
3
+ class StatusConstClass(object):
4
+ '''
5
+ Gurobi optimization status codes (e.g., model.status == GRB.OPTIMAL):
6
+
7
+ LOADED: Model loaded, but no solution information available
8
+ OPTIMAL: Solve to optimality (subject to tolerances)
9
+ INFEASIBLE: Model is infeasible
10
+ INF_OR_UNBD: Model is either infeasible or unbounded
11
+ UNBOUNDED: Model is unbounded
12
+ CUTOFF: Objective is worse than specified cutoff value
13
+ ITERATION_LIMIT: Optimization terminated due to iteration limit
14
+ NODE_LIMIT: Optimization terminated due to node limit
15
+ TIME_LIMIT: Optimization terminated due to time limit
16
+ SOLUTION_LIMIT: Optimization terminated due to solution limit
17
+ INTERRUPTED: User interrupted optimization
18
+ NUMERIC: Optimization terminated due to numerical issues
19
+ SUBOPTIMAL: Optimization terminated with a sub-optimal solution
20
+ INPROGRESS: Optimization currently in progress
21
+ USER_OBJ_LIMIT: Achieved user objective limit
22
+ WORK_LIMIT: Optimization terminated due to work limit
23
+ MEM_LIMIT: Optimization terminated due to soft memory limit
24
+ '''
25
+
26
+ def __setattr__(self, name, value):
27
+ raise AttributeError("Gurobi status constants are not modifiable")
28
+
29
+ LOADED = 1
30
+ OPTIMAL = 2
31
+ INFEASIBLE = 3
32
+ INF_OR_UNBD = 4
33
+ UNBOUNDED = 5
34
+ CUTOFF = 6
35
+ ITERATION_LIMIT = 7
36
+ NODE_LIMIT = 8
37
+ TIME_LIMIT = 9
38
+ SOLUTION_LIMIT = 10
39
+ INTERRUPTED = 11
40
+ NUMERIC = 12
41
+ SUBOPTIMAL = 13
42
+ INPROGRESS = 14
43
+ USER_OBJ_LIMIT = 15
44
+ WORK_LIMIT = 16
45
+ MEM_LIMIT = 17
46
+ LOCALLY_OPTIMAL = 18
47
+ LOCALLY_INFEASIBLE = 19
Binary file
gurobipy/nlfunc.py ADDED
@@ -0,0 +1,34 @@
1
+ """gurobipy nonlinear functions module
2
+
3
+ This module contains a number of functions for creating nonlinear expressions.
4
+ Each function can be called with any modeling object and returns an "NLExpr" or
5
+ "MNLExpr" representing the corresponding nonlinear expression. The resulting
6
+ object can be used to add nonlinear constraints to the model. For example::
7
+
8
+ import gurobipy as gp
9
+ from gurobipy import GRB, nlfunc
10
+
11
+ with gp.Env() as env, gp.Model(env=env) as model:
12
+
13
+ x = model.addVar(lb=-GRB.INFINITY, name="x")
14
+ y = model.addVar(lb=-GRB.INFINITY, name="y")
15
+ z = model.addVar(lb=-GRB.INFINITY, name="z")
16
+
17
+ # Create a constraint specifying z = sin(x + y)
18
+ model.addConstr(z == nlfunc.sin(x + y))
19
+ """
20
+
21
+ from gurobipy._helpers import (
22
+ sqrt,
23
+ sin,
24
+ cos,
25
+ tan,
26
+ exp,
27
+ log,
28
+ log2,
29
+ log10,
30
+ logistic,
31
+ signpow,
32
+ square,
33
+ tanh,
34
+ )
gurobipy/nlfunc.pyi ADDED
@@ -0,0 +1,52 @@
1
+ from typing import overload, Union
2
+
3
+ from gurobipy import NLExpr, MNLExpr, _NLExprLike, _MNLExprLike
4
+
5
+ @overload
6
+ def sqrt(expr: _NLExprLike) -> NLExpr: ...
7
+ @overload
8
+ def sqrt(expr: _MNLExprLike) -> MNLExpr: ...
9
+ @overload
10
+ def sin(expr: _NLExprLike) -> NLExpr: ...
11
+ @overload
12
+ def sin(expr: _MNLExprLike) -> MNLExpr: ...
13
+ @overload
14
+ def cos(expr: _NLExprLike) -> NLExpr: ...
15
+ @overload
16
+ def cos(expr: _MNLExprLike) -> MNLExpr: ...
17
+ @overload
18
+ def tan(expr: _NLExprLike) -> NLExpr: ...
19
+ @overload
20
+ def tan(expr: _MNLExprLike) -> MNLExpr: ...
21
+ @overload
22
+ def exp(expr: _NLExprLike) -> NLExpr: ...
23
+ @overload
24
+ def exp(expr: _MNLExprLike) -> MNLExpr: ...
25
+ @overload
26
+ def log(expr: _NLExprLike) -> NLExpr: ...
27
+ @overload
28
+ def log(expr: _MNLExprLike) -> MNLExpr: ...
29
+ @overload
30
+ def log2(expr: _NLExprLike) -> NLExpr: ...
31
+ @overload
32
+ def log2(expr: _MNLExprLike) -> MNLExpr: ...
33
+ @overload
34
+ def log10(expr: _NLExprLike) -> NLExpr: ...
35
+ @overload
36
+ def log10(expr: _MNLExprLike) -> MNLExpr: ...
37
+ @overload
38
+ def logistic(expr: _NLExprLike) -> NLExpr: ...
39
+ @overload
40
+ def logistic(expr: _MNLExprLike) -> MNLExpr: ...
41
+ @overload
42
+ def tanh(expr: _NLExprLike) -> NLExpr: ...
43
+ @overload
44
+ def tanh(expr: _MNLExprLike) -> MNLExpr: ...
45
+ @overload
46
+ def signpow(expr: _NLExprLike, exponent: Union[int, float]) -> NLExpr: ...
47
+ @overload
48
+ def signpow(expr: _MNLExprLike, exponent: Union[int, float]) -> MNLExpr: ...
49
+ @overload
50
+ def square(expr: _NLExprLike) -> NLExpr: ...
51
+ @overload
52
+ def square(expr: _MNLExprLike) -> MNLExpr: ...
gurobipy/py.typed ADDED
File without changes
@@ -1,77 +1,96 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: gurobipy
3
- Version: 10.0.1
3
+ Version: 13.0.0
4
4
  Summary: Python interface to Gurobi
5
5
  Home-page: https://www.gurobi.com
6
6
  Author: Gurobi Optimization, LLC
7
7
  License: Proprietary
8
+ Project-URL: Documentation, https://docs.gurobi.com
8
9
  Keywords: optimization,mip,lp
9
10
  Platform: Windows
10
11
  Platform: Linux
11
12
  Platform: macOS
12
- Description-Content-Type: text/x-rst
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: Implementation :: CPython
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE.txt
13
23
  Provides-Extra: matrixapi
14
- Requires-Dist: numpy ; extra == 'matrixapi'
15
- Requires-Dist: scipy ; extra == 'matrixapi'
16
-
17
- The Gurobi Optimizer is a mathematical optimization software library
18
- for solving mixed-integer linear and quadratic optimization problems.
19
-
20
- This package comes with a trial license that allows you to solve
21
- problems of limited size. As a student or staff member of an academic
22
- institution you qualify for a free, full product license. For
23
- more information, see:
24
-
25
- * https://www.gurobi.com/academia/academic-program-and-licenses/
26
-
27
- For a commercial evaluation, you can `request an evaluation license`_.
28
-
29
- .. _request an evaluation license: https://www.gurobi.com/free-trial/?utm_source=internal&utm_medium=documentation&utm_campaign=fy21_pipinstall_eval_pypipointer&utm_content=c_na&utm_term=pypi
24
+ Requires-Dist: numpy; extra == "matrixapi"
25
+ Requires-Dist: scipy; extra == "matrixapi"
26
+ Dynamic: author
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: keywords
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: platform
35
+ Dynamic: project-url
36
+ Dynamic: provides-extra
37
+ Dynamic: requires-python
38
+ Dynamic: summary
39
+
40
+ ![Python versions](https://img.shields.io/pypi/pyversions/gurobipy.svg)
41
+ [![PyPI](https://badge.fury.io/py/gurobipy.svg)](https://badge.fury.io/py/gurobipy)
42
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/gurobipy)
43
+ [![Gurobi Documentation](https://img.shields.io/badge/Help-Gurobi%20Documentation-red)](https://docs.gurobi.com/)
44
+
45
+ The Gurobi Optimizer is a mathematical optimization software library for solving mixed-integer linear and quadratic optimization problems.
46
+
47
+ This package comes with a trial license that allows you to solve problems of limited size. As a student or staff member of an academic institution, you qualify for a free, full product license. For more information, see:
48
+
49
+ - [Academic Program and Licenses](https://www.gurobi.com/academia/academic-program-and-licenses/)
50
+
51
+ For a commercial evaluation, you can [request an evaluation license](https://www.gurobi.com/free-trial/?utm_source=internal&utm_medium=documentation&utm_campaign=fy21_pipinstall_eval_pypipointer&utm_content=c_na&utm_term=pypi).
30
52
 
31
53
  Other useful resources to get started:
32
54
 
33
- * https://www.gurobi.com/documentation/
34
- * https://support.gurobi.com/hc/en-us/community/topics
35
-
36
- A simple example
37
- ----------------
38
-
39
- .. code::
55
+ - [Gurobi Documentation](https://docs.gurobi.com/)
56
+ - [Gurobi Community](https://support.gurobi.com/hc/en-us/community/topics)
40
57
 
41
- # Solve the following MIP:
42
- # maximize
43
- # x + y + 2 z
44
- # subject to
45
- # x + 2 y + 3 z <= 4
46
- # x + y >= 1
47
- # x, y, z binary
58
+ ## A simple example
48
59
 
49
- import gurobipy as gp
60
+ ```python
61
+ # Solve the following MIP:
62
+ # maximize
63
+ # x + y + 2 z
64
+ # subject to
65
+ # x + 2 y + 3 z <= 4
66
+ # x + y >= 1
67
+ # x, y, z binary
50
68
 
51
- # Create a new model
52
- m = gp.Model()
69
+ import gurobipy as gp
53
70
 
54
- # Create variables
55
- x = m.addVar(vtype='B', name="x")
56
- y = m.addVar(vtype='B', name="y")
57
- z = m.addVar(vtype='B', name="z")
71
+ # Create a new model
72
+ m = gp.Model()
58
73
 
59
- # Set objective function
60
- m.setObjective(x + y + 2 * z, gp.GRB.MAXIMIZE)
74
+ # Create variables
75
+ x = m.addVar(vtype='B', name="x")
76
+ y = m.addVar(vtype='B', name="y")
77
+ z = m.addVar(vtype='B', name="z")
61
78
 
62
- # Add constraints
63
- m.addConstr(x + 2 * y + 3 * z <= 4)
64
- m.addConstr(x + y >= 1)
79
+ # Set objective function
80
+ m.setObjective(x + y + 2 * z, gp.GRB.MAXIMIZE)
65
81
 
66
- # Solve it!
67
- m.optimize()
82
+ # Add constraints
83
+ m.addConstr(x + 2 * y + 3 * z <= 4)
84
+ m.addConstr(x + y >= 1)
68
85
 
69
- print(f"Optimal objective value: {m.objVal}")
70
- print(f"Solution values: x={x.X}, y={y.X}, z={z.X}")
86
+ # Solve it!
87
+ m.optimize()
71
88
 
89
+ print(f"Optimal objective value: {m.objVal}")
90
+ print(f"Solution values: x={x.X}, y={y.X}, z={z.X}")
91
+ ```
72
92
 
73
- Licensing information
74
- ---------------------
93
+ # Licensing information
75
94
 
76
95
  GUROBI OPTIMIZATION, LLC
77
96
  END-USER LICENSE AGREEMENT
@@ -108,7 +127,7 @@ DELETE ANY COPIES OF THE PRODUCT YOU MAY HAVE. TERMS AND CONDITIONS
108
127
  1. DEFINITIONS
109
128
 
110
129
  1.1. "Product" means the limited, evaluation version of Gurobi
111
- Optimizer Version 10.0.0 or higher in the form of object code
130
+ Optimizer Version 13.0.0 or higher in the form of object code
112
131
  libraries, including all upgrades, new releases, modifications,
113
132
  enhancements, adaptations, copies and translations thereof. "You" and
114
133
  "Your" mean the individual who is installing, accessing or using the
@@ -0,0 +1,30 @@
1
+ gurobipy/__init__.py,sha256=89ICQ5xs8l3i0ZtagY2HOPgg9o421-667XF5TRGRjC0,3221
2
+ gurobipy/__init__.pyi,sha256=56YF85odMLsJM9z7J3Gn21m8RN2sY9GvfIWe4QTW1_c,100372
3
+ gurobipy/_attrconst.py,sha256=Av_fS7TgGpBLcMNz_CPv8DcvJbTbsee9BDhiWztnu8g,18862
4
+ gurobipy/_attrutil.cpython-311-darwin.so,sha256=VpmHJ4jq68zXEKTH4cIrVfPvEg2o8gs1hR7EwbVkw3Q,312160
5
+ gurobipy/_batch.cpython-311-darwin.so,sha256=Vma1ir8uejqRTYEO2NQ6NwTzI2BvlVCFbyD7gyxgyQA,273872
6
+ gurobipy/_callbackconst.py,sha256=V7Uvm_b-r6m-b1yj4t9s0IwDr9nZUhV2-ouhE5sInFM,7434
7
+ gurobipy/_core.cpython-311-darwin.so,sha256=jLfmeAgHs70l5XRJFECReIDoQrI0m_7TLNY5uj2TM4c,2841880
8
+ gurobipy/_errorconst.py,sha256=6dzCQrZIhz7Drzmez7QVN8Q0JGgIqSABGdps6IMtC3U,3257
9
+ gurobipy/_exception.cpython-311-darwin.so,sha256=c0t-jfQslMBzLUAcHkVsjsEtYNXlH3QhsDw4RQzlnCc,165440
10
+ gurobipy/_grb.py,sha256=6_zQWc8krWnjQ5mxmSoC-tWLFubXJY3bWffGYVUhERA,7464
11
+ gurobipy/_helpers.cpython-311-darwin.so,sha256=nhzGXpuJg7J0iNgUTpr7f1gRTjxMynfKkYdXbVyxeKM,262032
12
+ gurobipy/_load_model.py,sha256=WfZKDfgnO0H953WveqET49twubWRJzwyDiW1D4wmLkQ,8807
13
+ gurobipy/_lowlevel.cpython-311-darwin.so,sha256=yaMvQkUYEQ7ZWDhbBKpjNvsKLlS55MJoWZfqQ8ogREc,443216
14
+ gurobipy/_matrixapi.cpython-311-darwin.so,sha256=G_dSIg-gS9cunhpvnHdkZisqhTPQVtneA0zdIHFhNFc,3843584
15
+ gurobipy/_model.cpython-311-darwin.so,sha256=deBcfDLaZE_ECf7ku8YDQl7M6VF9w4bJfyStXnuQV_0,3243280
16
+ gurobipy/_modelutil.cpython-311-darwin.so,sha256=j2SlCRaIcvtaji-rQ6amzBwucbNbquqTZXSlrs4mEso,411504
17
+ gurobipy/_paramconst.py,sha256=PI2J-3dZLPi2VuXySCCCuHal70n1PR3lGvA7CDJqeP4,21595
18
+ gurobipy/_paramdetails.py,sha256=55MrU3jWMmezPJOprVdj2knSNPLBgClgkTgqrMrjZCM,172862
19
+ gurobipy/_statusconst.py,sha256=v9Cr3sHselRLwZZNoYUVZvvakEnpffyGbGkSdFVyHyw,1704
20
+ gurobipy/_util.cpython-311-darwin.so,sha256=fTzdoSIBm_55yOhyFs65df7ji9RMgirB3zzbglqOXqM,289128
21
+ gurobipy/nlfunc.py,sha256=pxo7HjRsbJO2OTntEeI1l1JqsZ0Puy6labmmco6RsxQ,893
22
+ gurobipy/nlfunc.pyi,sha256=omLuerEut_DNsMD6ekIRTTgXAkJHNHE7OfkgICR5hHM,1465
23
+ gurobipy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ gurobipy/.libs/gurobi.lic,sha256=v9k6EM9HzucPaiu8WTjk2jgNuJa8-r2cXQj7fou45Ag,90
25
+ gurobipy/.libs/libgurobi130.dylib,sha256=IjeKCPiHfk2TZhFXPyqRUgf5hp5anqtXl32WzVNa06c,27816080
26
+ gurobipy-13.0.0.dist-info/licenses/LICENSE.txt,sha256=0fB-TfqpqcTHU6h_-UgKq4YjUY15eBkbV5GP-gOX-jI,274186
27
+ gurobipy-13.0.0.dist-info/METADATA,sha256=8ZYg-reCSrKz9tE529SLpstsPmUdEroK1I1UrkNnsOY,16702
28
+ gurobipy-13.0.0.dist-info/WHEEL,sha256=EOGtw-LpzLQPCSF3QP-yT4xdfA0v97p09Et-l29cEBs,114
29
+ gurobipy-13.0.0.dist-info/top_level.txt,sha256=lI8imVf2_cKV2kVT6NVXJ4sH0ib8oAKeh06ysN_0_Bg,9
30
+ gurobipy-13.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp311-cp311-macosx_10_9_universal2
5
5