Gurobi: Difference between revisions

Jump to navigation Jump to search
4 bytes removed ,  2 years ago
no edit summary
No edit summary
No edit summary
Line 134: Line 134:
<!--T:91-->
<!--T:91-->
Gurobi brings it's own version of Python but that one does not contain any 3rd-party Python packages except Gurobi.  In order to use Gurobi together with popular Python  
Gurobi brings it's own version of Python but that one does not contain any 3rd-party Python packages except Gurobi.  In order to use Gurobi together with popular Python  
packages like NumPy, Matplotlib, Pandas and others, we need to create a [[Python#Creating_and_using_a_virtual_environment|virtual Python environment]] in which we can install both <code>gurobipy</code> and e.g. <code>pandas</code>. Note that when using Gurobi with Python it is important to minimize the number of times that your Python code will attempt to checkout a license from the single Compute Canada license server for Gurobi, as overloading it will disrupt your own Gurobi jobs as well as those of other users. For this reason, your Python code should do as much work as possible inside a single environment, creating new models within this single existing environment as needed. A new license token is checked out at the creation of a new environment, so it is particularly important not to create a new environment inside of a loop. Please consult the [https://www.gurobi.com/documentation/9.5/refman/py_env_start.html Gurobi documentation] for more details.
packages like NumPy, Matplotlib, Pandas and others, we need to create a [[Python#Creating_and_using_a_virtual_environment|virtual Python environment]] in which we can install both <code>gurobipy</code> and e.g. <code>pandas</code>. Note that when using Gurobi with Python it is important to minimize the number of times that your Python code will attempt to checkout a license from the single Compute Canada license server for Gurobi, as overloading it will disrupt your own Gurobi jobs as well as those of other users. For this reason, your Python code should do as much work as possible inside a single environment, creating new models within this single existing environment as needed. A license token is checked out at the creation of a new environment, so it is particularly important not to create a new environment inside of a loop. Please consult the [https://www.gurobi.com/documentation/9.5/refman/py_env_start.html Gurobi documentation] for more details.


<!--T:214-->
<!--T:214-->
rsnt_translations
56,430

edits

Navigation menu