Gurobi Version

0 views
Skip to first unread message

Mara Ermogemous

unread,
Aug 4, 2024, 6:01:34 PM8/4/24
to cufinfose
SpecificallyGurobi Machine Learning allows users to add a trained machine learning model as a constraint to a Gurobi model (e.g., from scikit-learn, TensorFlow/Keras, or PyTorch). Thus, you would estimate a real-world system by training a machine learning model, and then use this machine learning model as a constraint in Gurobi, so you can optimize controls on that system.

Gurobi introduced its Web License Service (WLS) for Docker and Kubernetes container environments last year, with the release of Gurobi 9.5. With Gurobi 10.0, the team has expanded WLS to support nearly all types of containerized environments. Moreover, customers can now also obtain WLS licenses that allow them to run Gurobi in virtually all deployment scenarios, including containerized environments, virtual machines, and bare-metal machines, across Linux, macOS, and Windows.


For more information on how to install Gurobi 10.0, visit the article: How do I update my Gurobi installation to a newer version? Commercial users with an existing 9.5 license, who are current on maintenance and support, and all eligible Academic users, can upgrade to 10.0 immediately by visiting the downloads page (while logged in). Commercial users with an older version of Gurobi or those not current on maintenance and support should contact sa...@gurobi.com to get this new release. All other users, please contact us to discuss upgrade options.


Additionally, this new version delivers a key enhancement to our popular tuning tool, enabling teams to share resources across multiple users and jobs when tuning. Moreover, the Cluster Manager features single sign-on capabilities for streamlined integration into enterprise software stacks.


In this webinar, get a first look at our latest product release, Gurobi 11.0. We will summarize the performance improvements and highlight some of the underlying algorithmic advances, such as solving MINLPs to global optimality, new parameters to control LP and concurrent LP solves, and dynamic distributed tuning.


We were looking for (but could not find) a file named like

libgurobiXXX.so, libgurobiXXX.dylib, or gurobiXXX.dll. You

should update your GUROBI_HOME environment variable to point to the

correct location.


To obtain a Gurobi 11 license, you will need to visit the Gurobi User Portal. If you are a commercial user under maintenance, you should see your Gurobi 11 license under Licenses. If you would like to request a free academic license, you can do so from the Licenses Request section. Once you have a license in the Gurobi User Portal, you will need to follow the instructions for installing or downloading a license by clicking on the Install or Open button next to your license.


The Gurobi Optimizer can now use spatial branching and outer approximation to solve models with non-linear functions, instead of using static piecewise-linear approximations. See the discussion of function constraints with dynamic piecewise-linear approximation for more information.


The default behavior of the NonConvex parameter has changed. Previously, you had to explicitly set this parameter to value 2 if you wanted to solve a model with a non-convex quadratic objective or constraint. Now it will solve such models by default. To revert to the previous behavior, set the parameter to 1.


Better control over the concurrent LP optimizer Option 5 of the Method parameter has been deprecated in favor of the new ConcurrentMethod parameter. The latter allows you to control which methods are run concurrently with the deterministic (Method=4) or non-deterministic (Method=3) concurrent optimizer. The deprecated setting Method=5 can now be replicated by choosing Method=4 along with ConcurrentMethod=3. To give another example, non-deterministic concurrent execution of the primal and dual simplex algorithms can be selected using Method=3 along with ConcurrentMethod=3.


Change the Threads parameter when resuming optimization If an optimization is interrupted (e.g., due to a time limit), the user can now modify the Threads parameter in order to change the number of threads to be used when the solving process is resumed with another call to optimize.


The distributed tuning can use remote workers in a dynamic way. With the parameter TuneDynamicJobs you can control the size of a dynamic set of remote workers that are used in parallel. These workers are used for a limited amount of time and afterwards potentially returned so that they are available for other remote jobs.


Starting from Gurobi 11, we include in the results the first set of parameters used to solve the model (base settings). This result is stored as first setting in the tune results. Hence, to get the best tuned set of parameters, you need to request at least 2 sets (using TuneResults) and retrieve the set with index 1.


Piecewise-linear approximation The default behavior of parameter FuncPieces, the main parameter for piecewise-linear approximation of function constraints, is changed. The new default for version 11.0 uses the relative error approach for the approximation, while for version 10.0 or earlier it mainly used the number of function constraints to set the total number of pieces.


Model.getAttr and Model.setAttr now raise an exception if the modeling objects passed to them do not belong to the model. Previously, the attribute values would be returned or set for a variable on the model with the same index as the modeling object which is typically not the desired behavior.


If you are upgrading from a previous version of Gurobi, we recommend first running your code with Gurobi 10 and warnings enabled to catch deprecations in gurobipy. Fixing these deprecated usages will help to keep compatibility for Gurobi 11 and later versions. Warnings can be enabled by running your code with the -X dev or -W default flags. See the Python Development Mode or warnings package documentation for further details.


Is it possible to use CVX with a newer version of Gurobi? (I want to use the latest Gurobi version 11.0.0). I added this new version to my MATLAB path however when I use cvx_setup it is skipping the Gurobi version I want to use, instead it uses Gurobi 9.0.


Unfortunately, neither the CVX developer nor anyone from Gurobi are active on this forum. This is the only remaining support channel for CVX. So you will probably have to figure things out for yourself to try to get Gurobi 11 to work under CVX.


I installed a CVX bundle which has Gurobi version 9.00 and obtained an academic license for Gurobi. This version of the solver could not solve a MIDCP problem and I read some recommendations about ...


I was told by @mcg (and I share this information with his explicit permission) that in the long run his plan is to make CVX open source including the currently obfuscated commercial solver interfaces. Then everybody will be able to adapt and fix them.


I can find the conda command line prompts to remove the conda installed package, but cannot find any code anywhere to remove the 7.0.2 version from my computer so that it doesn't keep referencing 7.0.2 when I try to install new version via conda again.


After the installation you need to restart.

Then, the gurobi installation needs to be activated:

On the gurobi website you can review your licenses under Downloads & Licenses -> Your Gurobi Licenses. If there is nothing, then request a new one (also on the Downloads & Licenses page). Once you have a table entry there, click on it and follow the instructions:

paste the grbgetkey XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX command that is mentioned under installation to your search bar and click on Run command. This will open a terminal and ask you to confirm the location for the license file.


there is a bug in this version - which will make it not find the gurobi solver (or the cplex one). The solution to this is copying the relevant .dll file into the ilastik installation (you need administrative privileges for this).:


Supported Platforms

Platform (port)Operating SystemCompilerNotesWindows

64-bit (win64)Windows 10, 11, Windows Server 2016, 2019, 2022Visual Studio 2017-2022Use gurobi_c++md2017.lib (e.g.) for C++Linux x86-64

64-bit (linux64)Red Hat Enterprise Linux 8, 9GCC >= 8.5 SUSE Enterprise Linux 15 Ubuntu 20.04, 22.04, 24.04 Amazon Linux 2, 2023 macOS

64-bit universal2 (macos_universal2)12 (Monterey), 13 (Ventura), 14 (Sonoma)Xcode 13/14 Linux arm64

64-bit (armlinux64)Red Hat Enterprise Linux 8, 9GCC >= 8.5 SUSE Enterprise Linux 15 Ubuntu 20.04, 22.04, 24.04 Amazon Linux 2, 2023 AIX

64-bit (power64)AIX 7.2, 7.3XL C/C++ 9Note that Gurobi 11 will be the last supported version for AIX. Due to limited Python support on AIX, this port does not include the Interactive Shell or the Python libraries.

Additional Supported Platform InformationGurobi 11.0.3 supports the following language/platform versions:LanguageVersionPython3.8, 3.9, 3.10, 3.11, 3.12MATLABR2019a-R2023bR4.4JDK8, 11, 17, 21.NET6, 8Bug FixesAll bug fixes listed by version can be found on ourwebsite.Additional Release Notes for 11.0.3NoneAdditional Release Notes for 11.0.2The interactive shell (gurobi.sh and gurobi.bat) is deprecated and will be removed in a future release.Additional Release Notes for 11.0.1NoneChanged in Gurobi 11.0Linux GNU C library (glibc) dependencyLinux x86_64: The Gurobi Optimizer now requires a minimum glibc version of 2.17. For version 10.0, the minimum required glibc version was 2.3.4.The list of supported platforms above takes these changes into account.New features affecting all APIsMixed-Integer Non-Linear Programming (MINLP) ProblemsThe Gurobi Optimizer can now use spatial branching and outer approximationto solve models with non-linear functions, instead of using static piecewise-linearapproximations. See the discussion offunction constraints with dynamic piecewise-linear approximationfor more information.Default behavior of NonConvex parameterThe default behavior of theNonConvex parameter has changed.Previously, you had to explicitly set this parameter to value 2 if youwanted to solve a model with a non-convex quadratic objective orconstraint. Now it will solve such models by default. To revert tothe previous behavior, set the parameter to 1.Copying models between environmentsIt is now possible to copy a model from one environment to another, usingthe following new routines or signatures:C: GRBcopymodeltoenvC++: GRBModel(const GRBModel& model, const GRBenv& targetenv)Java: GRBModel(GRBModel model, GRBenv targetenv).NET: GRBModel(GRBModel model, GRBenv targetenv)Python: model.copy(env)The primary use case for copying models is when performing optimization onmultiple, related versions of the same problem on multiple threads.Multi-threading within an environment is not supported.For Compute Server users, note that you can copy a model from a clientto a Compute Server environment, but it is not possible to copymodels between two Compute Server environments.Better control over the concurrent LP optimizerOption 5 of the Method parameter has been deprecatedin favor of the new ConcurrentMethodparameter. The latter allows you to control which methods are run concurrentlywith the deterministic (Method=4) or non-deterministic (Method=3)concurrent optimizer. The deprecated setting Method=5 can now bereplicated by choosing Method=4 along with ConcurrentMethod=3.To give another example, non-deterministic concurrent execution of the primaland dual simplex algorithms can be selected using Method=3 alongwith ConcurrentMethod=3.Change the Threads parameter when resuming optimizationIf an optimization is interrupted (e.g., due to a time limit), the user cannow modify the Threads parameter in order to change the number of threads tobe used when the solving process is resumed with another call to optimize.TuningThe distributed tuning can use remote workers in a dynamic way. With theparameter TuneDynamicJobs you cancontrol the size of a dynamic set of remote workers that are used inparallel. These workers are used for a limited amount of time andafterwards potentially returned so that they are available for other remotejobs.Starting from Gurobi 11, we include in the results the first set ofparameters used to solve the model (base settings). This result is storedas first setting in the tune results. Hence, to get the best tuned set ofparameters, you need to request at least 2 sets (usingTuneResults) and retrieve the setwith index 1.The tuner now supports the log callback. You can add a log callback to theenvironment and retrieve all the log messages coming from the tuner.Piecewise-linear approximationThe default behavior of parameter FuncPieces, the mainparameter for piecewise-linear approximation of function constraints, is changed.The new default for version 11.0 usesthe relative error approach for the approximation, while for version 10.0 or earlierit mainly used the number of function constraints to set the total number of pieces.New parametersThe following parameters are new in Gurobi 11.0:SolutionTarget to specify the solution target for LP.FuncNonlinear to control whether general function constraints shall be treated as nonlinear functions or via piecewise-linear approximation.MixingCut to control the generation of Mixing Cuts.TuneDynamicJobs to enable distributed tuning using a dynamic set of workers.TuneUseFilename to use the model file names as model names during tuning (Command-line only).Changes to gurobipyInstallation and packaging changesgurobipy and its setup.py file are no longer distributedwith the Gurobi installers. gurobipy must now be installed into Pythonenvironments using pip or conda.The gurobi conda packages have been updated so that pip can nowrecognize when gurobipy has already been installed into an environmentby conda. As a result, using pip in a conda environment to install a packagethat depends on gurobipy (such asgurobi-machinelearningorgurobipy-pandas)no longer leads to a duplicate installation of gurobipy.Type hints for gurobipy are now included in both the pip wheelsand conda packages. For Gurobi version 11, users should not installthegurobipy-stubspackage as it will override the type annotations packaged with gurobipy.The gurobipy-stubs package will not be maintained for future versions ofgurobipy.New classes, methods, and propertiesSOS objects have a new indexproperty returning the index of the SOS constraint in the model.MConstr andMQConstr objects now implement the classmethod fromlist which has the same behavior as the corresponding methodon the MVar class.New methods hstack,vstack, andconcatenateallow matrix-friendly objects to be joined together in the same way as thecorresponding numpy functions.A new MGenConstr class has beenadded for holding an array of general constraints. For version 11, only theaddGenConstrIndicatormethod is able to return objects of this type.Env objects now have an additional methodgetParam which returns the currentvalue of the given parameter in the environment.Enhancements to existing methodsThe Model.optimize andModel.computeIIS methods nowaccept any Python callable as a callback function. The TSP example code hasbeen updated to demonstrate the use of a callable class.The matrix-friendly API is now fully integrated with callback methods:Model.cbLazy,Model.cbCut, andModel.cbSetSolution now acceptmatrix-friendly API objects.When constructing a set of linear constraints usingModel.addMConstr orModel.addConstr with thematrix-friendly API, user-defined constraint names can be passed as a list orndarray.Model.addGenConstrIndicatorand the overloaded syntax for indicator constraints now handlematrix-friendly linear expression objects. This allows indicator constraints to bebuilt in a vectorized manner (including broadcasting behavior).Users can now explicitly disable the default environment by setting theenvironment variable GUROBIPY_ALLOW_DEFAULTENV to 0 beforestarting a Python program. With this setting, environments must be managedexplicitly using Env objects in user code.Calls to Model() without an Env object andglobal function calls such as setParamwill raise a GurobiError if this setting is used.Changes that may require updating your codeModel.getAttr andModel.setAttr now raise an exceptionif the modeling objects passed to them do not belong to the model. Previously,the attribute values would be returned or set for a variable on the model withthe same index as the modeling object which is typically not the desiredbehavior.A call toModel.addGenConstrIndicatorusing size-1 matrix-friendly modeling objects, which previously returned aGenConstr object, will now return a size-1MGenConstr. The constraint name may alsochange depending on the shape of the result. To revert to the previousbehaviour, call .item() on matrix-friendly modeling objects passed tothis function.The tupledict now follows Python 3dictionary semantics: its keys, values, and items methodsnow return iterable views instead of lists. Importantly, keys no longerreturns a tuplelist. If you need thisbehavior, you can instead call gp.tuplelist(td.keys()).Env.setParam now raises aGurobiError if the user specifies a parameter which does not exist. Inprevious versions, such calls would print a message but would fail withoutan exception.Gurobi log messages now go to the `gurobipy' logger instead of`gurobipy.gurobipy'. If you use Python's logging library to collect Gurobi logmessages, handlers should be attached either to the root logger or tologging.getLogger("gurobipy").Calling the sum() method of anMVar,MLinExpr, orMQuadExpr which contains no elements(i.e. has at least one zero-length dimension) now returns an array of zeros ofthe appropriate shape instead of raising an exception. This matches thebehavior of numpy arrays.Passing too many keys (more than the length of the contained tuples) toany of the pattern matching methods(tuplelist.select,tupledict.select,tupledict.sum, andtupledict.prod) now raises anIndexError. This change almost exclusively affects cases which returnedan empty set in previous versions. The exception is where the additionalindices are wildcards. i.e. for a tuplelist containing 2-tuples:tl.select("*", 2, "*") now raises an exception, while in previousversions it gives the same (non-empty) result as tl.select("*", 2).The gurobi Python package alias has been removed from the condapackages on all platforms. Any usage of import gurobi must be replacedwith import gurobipy.Deprecated functionalityIf you are upgrading from a previous version of Gurobi, we recommend firstrunning your code with Gurobi 10 and warnings enabled to catch deprecations ingurobipy. Fixing these deprecated usages will help to keep compatibility forGurobi 11 and later versions. Warnings can be enabled by running your code withthe -X dev or -W default flags. See the PythonDevelopment Modeorwarningspackage documentation for further details.In Gurobi 11, the following usage is deprecated and will be removed in a futureversion:Passing a tupledict to thequicksum function is deprecated as theresult is inconsistent with passing a native Python dictionary toquicksum. The sum method ofthe tupledict should be used instead to compute the sum over the values of thetupledict.The iterkeys(), itervalues(), and iteritems()methods for tupledicts are deprecated.These methods are legacy syntax from Python 2. The corresponding Python 3methods keys(), values(), and items() now return iterableviews and are therefore preferred.The gurobipy.system() function is deprecated. os.system()from the Python standard library should be used instead.The gurobipy.models() function is deprecated and should no longerbe used.Changes to the Java packageUpdatesWe've made essential changes in the package structure to allow publishing toMaven Central. Please take note of the following updates:Package Name Change: The Java package name has been updated fromgurobi to com.gurobi.gurobi. If you are integrating our Javapackage, ensure to update your import statements accordingly.Changes to the MATLAB interfaceOn the macOS platform, the Gurobi mex interface is now also available for native Apple silicon MATLAB(mexmaca64).Compute Server, Cluster Manager, and Instant CloudDetailed release notes for Compute Server, Cluster Manager, andInstant Cloud can be foundhereOther changesThe interactive shell (gurobi.sh and gurobi.bat) is deprecatedand will be removed in a future release.

Next: C API Overview Up: Gurobi Optimizer Reference Manual Previous: Gurobi Optimizer Reference Manual

3a8082e126
Reply all
Reply to author
Forward
0 new messages