没有合适的资源?快使用搜索试试~ 我知道了~
首页guide of gurobi
guide of gurobi
需积分: 10 11 下载量 138 浏览量
更新于2023-05-27
收藏 1.34MB PDF 举报
关于gurobi求解器的快速开始文件。内容包含gurobi语法的介绍,基本算例等
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/10244694/bg1.jpg)
GUROBI OPTIMIZER
QUICK START GUIDE
Version 7.5, Copyright
c
2017, Gurobi Optimization, Inc.
![](https://csdnimg.cn/release/download_crawler_static/10244694/bg2.jpg)
Contents
1 Introduction 4
2 Obtaining a Gurobi License 6
2.1 Creating a new academic license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Software Installation Guide 7
4 Retrieving and Setting Up a Gurobi License 9
4.1 Retrieving a Free Academic license . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.1 Academic validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Retrieving a Named-User or Single-Machine or Single-Use license . . . . . . . . . . . 13
4.3 Setting up and using a Floating license . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3.1 Retrieving a Floating license . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3.2 Starting a token server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3.3 Upgrading a token server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.4 Creating a token server client license . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 Setting up and using a Compute Server license . . . . . . . . . . . . . . . . . . . . . 20
4.4.1 Retrieving a Compute Server license . . . . . . . . . . . . . . . . . . . . . . . 20
4.4.2 Creating a Compute Server client license . . . . . . . . . . . . . . . . . . . . . 22
4.5 Starting Gurobi Remote Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.5.1 Upgrading Gurobi Remote Services . . . . . . . . . . . . . . . . . . . . . . . . 25
4.6 Using an Instant Cloud license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.7 Testing your license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.8 Setting environment variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5 Solving a Simple Model - The Gurobi Command Line 28
6 Interactive Shell 34
7 Attributes 47
2
![](https://csdnimg.cn/release/download_crawler_static/10244694/bg3.jpg)
8 C Interface 48
9 C++ Interface 56
10 Java Interface 62
11 .NET Interface (C#) 68
12 Python Interface 74
12.1 Simple Python Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
12.2 Python Dictionary Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
12.3 Building and running the examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
13 MATLAB Interface 92
14 R Interface 96
15 Recommended Reading 100
16 Installing the Anaconda Python distribution 101
16.1 Using the Spyder IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
16.2 Using Jupyter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
17 Windows Command Line 105
18 File Overview 107
3
![](https://csdnimg.cn/release/download_crawler_static/10244694/bg4.jpg)
Introduction
Welcome to the Gurobi
TM
Optimizer Quick Start Guide for Windows users! This document provides
a basic introduction to the Gurobi Optimizer, including:
•
Information on Obtaining a Gurobi License.
•
A Software Installation Guide, which includes information on Retrieving and Setting Up your
License.
•
An example of how to create a simple optimization model and solve it with the Gurobi
Command Line, and
•
A discussion of the Gurobi Interactive Shell.
We suggest that all users read these rst ve sections.
Once you have done this, you will probably want to choose a programming environment from which
to use Gurobi. If you don't have a strong preference, we recommend that you use our Python
R
interface, which provides a number of benets. First, Python is a very nice programming language
that can be used for anything from experimentation to prototyping to deployment. Beyond this,
though, our Python interface includes a set of higher-level modeling constructs that make it much
easier to build optimization models. We also include instructions for installing the Anaconda Python
distribution, which includes both a graphical development environment (Spyder) and a notebook-
style interface (Jupyter).
If you already have a preferred programming language, you can select from among our available
interfaces:
•
C interface,
•
C++ interface,
•
Java
R
interface,
•
Microsoft
R
.NET interface,
•
Python interface,
•
MATLAB
R
interface, or
•
R interface.
At the end of the Quick Start Guide, you'll nd a File Overview that lists the les included in the
Gurobi distribution.
4
![](https://csdnimg.cn/release/download_crawler_static/10244694/bg5.jpg)
Additional resources
Once you are done with the Quick Start Guide, the next step is to explore these additional resources:
•
If you are familiar with mathematical modeling and are ready to use Gurobi from one of our
programming language APIs, consult the Gurobi Reference Manual.
•
If you would like to see examples of ways to use Gurobi, consult the Gurobi Example Tour.
•
If you would like to learn more about mathematical programming or modeling, we've collected
a set of references in our recommended reading section.
Getting help
Have a question that isn't answered in this guide? Post it to the Gurobi Google Group. Clients
with current maintenance contracts can send questions to
support@gurobi.com
.
Ready to get started? Your rst step is to Obtain a License.
5
剩余108页未读,继续阅读
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)