IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4

所需积分/C币:50 2013-06-17 21:28:28 369KB PDF
收藏 收藏
举报

CPLEX英文学习资料。 IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4
Contents Introducing CPLEX Performing sensitivity analysis What is CPLEX? Writing problem and solution tiles Types of problems solved CPLEX components Selecting a write file format Optimizer options Writing lp files Parallel optimizers ng Data entry options V111 ng path names What CPleX is not viii Reading problem files What you need to know Overview What's in this manual Selecting a read file for rmat Notation in this manu Reading LP files Related documentation Using file extensions Reading MPs files Chapter 1. Setting up CPLEX Reading basis files Installing CPLEX Setting parameters .37 Adding constraints and bounds Setting up CPLEX on Windows Setting up CPlEX for on GNU/ Linux Changing a problem Setting up Eclipse for the Java API of CPLEX Setting up the Python API of CPLEX Directory structure of CPLEX 24556 .39 What can be changed? Changing constraint or variable names Using the Component Libraries Changing sense Changing bounds Chapter 2. Solving an LP with CPLEx.. 9 Removing bounds .41 Changing coefficients of variables Overview Objective and rhs coefficients Problem statement Deleting entire constraints or variables Using the Interactive Optimizer Changing small values to zero Using Concert Technology in C++ Executing operating system commands 43 Using Concert Technology in Java Quitting CPLEX Using Concert Technology in. NET Advanced features of the Interactive Optimizer Using the Callable library Using the Python API Chapter 4. Concert Technology tutorial Chapter 3. Interactive optimizer tutorial 17 for c++ users 47 Starting CPLEX The design of CPLEX in Concert Technology C++ applications Compiling Cplex in Concert Technology C+ Entering a problem applications Entering the example Testing your installation on UNIX Using the Lp format Testing your installation on Windows In case of problems ng Displaying a problem The anatomy of an Concert Technology C++ Verifying a problem with the display command 22 application 49 Constructing the environment: IloEnv Displaying problem statistics Specifying item ranges 24 Creating a model: IloModel Displaying variable or constraint names Solving the model: IoCplex Ordering variables Querying results Handling errors Displaying constraints Building and solving a small LP model in C++ Displaying the objective function .26 erview Displaying bounds Displaying a histogram ot nonzero counts Modeling by Modeling by columns Solving a problem Modeling by nonzero elements Overview Solving the example Writing and reading models and files electing an optimize Solution options ng Reading a problem from a file: example ilolpex2 cpp 58 Displaying post-solution information O Copyright IBM Corp. 1987, 2011 Overview Building Callable Library applications on UNIX Reading the model from a file platforms Selecting the optimizer Building Callable Library applications on Win32 Accessing basis information platforms Querying quality measures How CPLEX works Modifying and re-optimizing Overview .83 Modifying an optimization problem: example Opening the CPLEX environment ilolpex3. cpp Instantiating the problem object Overview .60 Populating the problem object Setting cplex parameters 61 Changing the problem object Modifying an optimization problem Creating a successful Callable library application Starting from a previous basis Complete program 61 Prototype the model Identify the routines to call Chapter 5. Concert Technology tutorial Test procedures in the application for Java users ......63 Assemble the data 63 Choose an optimizer Compiling CpleX in Concert Technology Java Observe good programming practices Debug your program 87 applications Paths and jar 63 Test your application Adapting build procedures to your platform Use the examples In case problems arise Building and solving a small LP model in C The design of CPLEX in Concert Technology Java Reading a problem from a file: example lpex2 c applications Adding rows to a problem: example lpex3c The anatomy of a Concert Technology java Performing sensitivity analysis 92 application .65 Structure of an application Chapter 8. Python tutorial 95 Create the model Design of CPLEX in a Python application olve the model Starting the CPLEX Python API Query the results Accessing the module cplex 95 Building and solving a small LP model in Java Building and solving a small LP with Python E Reading and writing CPleX models to files with Modeling by rows Modeling by columns Selecting an optimizer in Python Modeling by nonzeros 71 Example: reading a problem from a file Ipex2 py Modifying and re-optimizing in the CPlEX Python Chapter 6. Concert Technology tutorial API for∴ NET users 3 Example: modifying a model lpex3py Presenting the tutorial Using CPLEX Parameters in the CPLEX Python API 100 What you need to know: prerequisites What you will be doing Describe Chapter 9. MSF tutorial for CPLEX Model 6 users 103 Solve CPLEX cOnnector for msF 103 Complete program Using CPLEX as a plug-in SFS of MSF 104 Using CPLEX as the class CplexSolver in MSF.. 107 Chapter 7. Callable Library tutorial...81 Using CPLEX Parameters in MSF connector 109 The design of the CPlEX Callable Library Compiling and linking Callable Library applications 81 ,113 Overview 1v Getting Started with CPLEX Introducing CPLEX This preface introduces CPLEX What is CPlEX? CPLEX consists of software components and options Types of problems solved Defines the kind of problems that CPlex solves IBM ILOG CPLEX Optimizer is a tool for solving linear optimization problems, commonly referred to as Linear Programming (Lp) problems, of the form Maximize (or Minimize C1x1+c22+…+Cnx ibject to 1+a 2 m2x2+…+l with these bounds 11≤x ≤l l where can be <, 2, or =,and the upper bounds u i and lower bounds li may be positive infinity, negative infinity, or any real number The clements of data you provide as input for this Lp are Objective function coefficients C Constraint coefficients L Righthand side pper and lower bounds u andI/ The optimal solution that CPLLX computes and returns is Variables CPl.EX also can solve several extensions to i, P Network Flow problems, a special case of LP that CPLEX can solve much faster xploiting the problem struc C Copyright IBM Corp. 1987, 2011 Quadratic Programming(QP)problems, where the Lp objective function is expanded to include quadratic terms Quadratically Constrained Programming(QCP) problems that include quadratic terms among the constraints. In fact, CPLEX can solve Second Order Cone Programming(SoCP) problems Mixed Integer Programming (MIP)problems, where any or all of the LP, QP, or QCP variables are further restricted to take integer values in the optimal solution and where MIP itself is extended to include constructs like Special Ordered Sets (SOS) and semi-continuous variables CPLEX components Describes the components of CPLEX: Interactive Optimizer, Concert Technology Callable Library CPLEX comes in various forms to meet a wide range of users' need The CPLEX Interactive Optimizer is an executable program that can read a problem interactively or from files in certain standard formats, solve the problcm, and deliver the solution interactively or into text files. The program consists of the file cplex. exe on Windows platforms or cplex on UNIX pla Concert Technology is a set of C++, Java, and. NET class libraries offering an API that includes modeling facilities to allow the programmer to embed CPLEX optimizers in C++, Java, or. NET applications. Table 1. lists the files that contain the librarie Table 1. Concert Technology libraries Microsoft windows UNIX C++ ilocplex. l ib concert. lib libilocplexa libconcert a Java cplex. jar cplex. jar ILOG CPLEX. dll I LOG, Concert. dll The Concert Technology libraries make use of the Callable Library(described next) The CPleX Callable library is a C library that allows the programmer to embed CPLEX optimizers in applications written in C, Visual Basic, FORTRAN or any other language that can call C functions. The library is provided in files cplexXXXlib and cplexXXX dIl on Windows platforms, and in libcplexa libcplex.so, and 1ibcplex, sI on UNIX platforms The Python API for CPLEX a full-featured Python application programming interface supporting all aspects of CPLEX optimization The CPLEX connector for The Math Works Matlab enables a user to define optimization problems and solve them within MATLAB using either the MATLAB Toolbox or a CPLEX class in the MATLAB language In this manual, the phrase CPLEX Component Libraries is used to refer equally to any of these libraries. While all of the libraries are callable, the term CPlEX Callable Library as used here refers specifically to the c librar VI Getting Started with CPLEX Compatible platforms CPLEX is available on Windows, UNIX, and other platforms. The programming interface works the same way and provides the same facilities on all platforms Installation If you have not yet installed CPLEX on your platform, consult Chapter 1,Setting up CPLEX, on page 1. It contains instructions for installing CPLEX Optimizer options Introduces the options available in CPLEX This manual explains how to use the lp algorithms that are part of cplex. the QP QCP and MiP problem types are based on the Lp concepts discussed here, and the extensions to build and solve such problems are explained in the CPLEX Users Manual Default settings will result in a call to an optimizer that is appropriate to the class of problem you are solving. However, you may wish to choose a different optimizer for special purposes. An LP or QP problem can be solved using any of the following CPLEX optimizers: dual simplex, primal simplex, barrier, and perhaps also the network optimizer (if the problem contains an extractable network substructure). Pure network models are all solved by the network optimizer QCP models, including the special case of SoCP models, are all solved by the barrier optimizer. MIP models are all solved by the mixed integer optimizer, which in turn may invoke any of the lp or op optimizers in the course of its computation The table titled Table 2 summarizes these possible choices Table 2. Optimizers LP Network QH QCP MIP y es Optimizer es ves Optimizer Optimizer Mixed Integer Optimizer Optimizer Note 1: The problem must contain an extractable network substructure. The choice of optimizer or other parameter settings may have a very large effect on the solution speed of your particular class of problem. The CPLEX USers manual describes the optimizers, provides suggestions for maximizing performance, and notes the features and algorithmic parameters unique to each optimizer Parallel optimizers Parallel optimizers are available in CPleX Introducing CPLEX VIl Parallel barrier, parallel MiP, and concurrent optimizers are implemented to run on hardware platforms with parallel processors. These parallel optimizers can be called from the Interactive Optimizer and the Component libraries When small models, such as those in this document, are bcing solved, the effect of parallelism will generally be negligible. On larger models, the effect is ordinarily beneficial to solution speed See the topic Parallel optimizers in the CPleX user's Manual for information about using CPLEX on a parallel computer Data entry options CPlEX Supports a variety of data entry options CPLEX Provides several options for entering your problem data. When using the Interactive Optimizer, most users will enter problem data from formatted files CPLEX supports the industry-standard MPS(Mathematical Programming System) file format as well as cplex LP format, a row-oriented format many users may find more natural Interactive entry (using CPLEX LP format) is also a possibilit or srnL ll problems Data entry options are described briefly in this manual. File formats al documented in the reference manual File Formats Reference manual t'e Concert Technology and Callable Library users may read problem data from the same kinds of files as in the Interactive Optimizer, or they may want to pass data directly into CPLEX to gain efficiency. These options are discussed in a series of examples that begin with"Building and solving a small LP model in C++ on page 53, Building and solving a small LP model in Java" on page 68, and" Building and solving a small LP model in C" on page 88 for the CPLEX Callable Library users Users can also read models from Python. For more about that approach, see the topic"Reading and writing CPLEX models to files with Python"on page 97 in the tutorial for Python users in this manual Users can also read models from The Math Works MATLAB. For more about that approach, see the user's manual accompanying the CPleX connector for Matlab What CPLEX is not CPLEX contrasts with other tools, such as modeling languages or integrated development environments CPLEX Optimizer is not a modeling language, nor is it an integrated development environment (DE). You can completely model and solve your optimization problems with CPLEX; however, the optimizer that it provides does not offer the interactive facilities of a modeling system in an integrated development environment. For such features as interactive modeling, consider the integrated development environment of IBM ILOG CPleX Optimization Studio What you need to know Prerequisites for effective use of CPLEX include familiarity with your operating system, knowledge of file management, and facility in a programming language Vlll Getting Started with CPLEX In order to use CPLEX effectively, you need to be familiar with your operating system, whether UNIX or Windows This manual assumes you already know how to create and manage files. In addition, if you are building an application that uses the Component Libraries, this manual assumes that you know how to compile, link, and execute programs written in a high-level language. The Callable Library is written in the C programming language, while Concert Technology is available for users of C++, Java, and the. NET framework. This manual also assumes that you already know how to program in the appropriate language and that you will consult a programming guide when you have questions in that area What's in this manual Getting Started with CPLEX offers tutorials for the components of CPLEX, including the Interactive Optimizer and the application programming interfaces Chapter 1, Setting up CPLEX, on page l tells how to install CPLEX Chapter 2,"Solving an LP with CPLEX, "on page 9 shows you at a glance how to use the Interactive Optimizer and each of the application programming interfaces (APIS): C++, Java,. NET, and C. This overview is followed by more detailed tutorials about each interface Chapter 3, Interactive Optimizer tutorial, on page 17 explains, step by step,how to use the Interactive Optimizer: how to start it, how to enter problems and data, how to read and save files, how to modify objective functions and constraints, and how to display solutions and analytical information Chapter 4, "Concert Technology tutorial for C++ users, "on page 47 describes the same activitics using the classes in the C++ implementation of the CPLEX Concert Technology Library Chapter 5, "Concert Technology tutorial for Java users, " on page 63 describes the same activities using the classes in the Java implementation of the CPLEX Concert Technology Library Chapter 6, Concert Technology tutorial for. NET users, on page 73 describes the same activities using. NET facilities Chapter 7,"Callable Library tutorial, on page 8l, describes the same activities using the routines in the CPLEX Callable library Chapter 8, Python tutorial, on page 95 covers certain installation considerations plus an introduction to using the CPLEX Python API to model and optimization problems All tutorials use examples that are delivered with the standard distribution Notation in this manual Notation in this manual conforms to familiar conventions This manual observes the following conventions in notation and names Important ideas are emphasized the first time they appear CPLEX IX Text that is entered at the keyboard or displayed on the screen as well as commands and their options available through the Interactive Optimizer appear in this typeface, for example, set preprocessing aggregator n Entries that you must fill in appear in this typeface; for example, write filename The names of C routines and parameters in the CPlex Callable library begin with CPX and appear in this typeface, for example, CPXcopyobjnames The names of C++ classes in the CPLEX Concert Technology Library begin with Ilo and appear in this typeface, for example, Ilocplex The names of Java classes begin with Ilo and appear in this typeface, for example, IloCplex The name of a class or method in net is written as concatenated words with the first letter of each word in upper case, for example, intvar or IntVar. VisitChildren. Generally, accessors begin with the key word Get Accessors for Boolean members begin with Is. Modifiers begin with Set Combinations of keys from the keyboard are hyphenated. For example, control-c indicates that you should press the control key and the c key simultaneously The symbol <return> indicates end of line or end of data entry On some keyboards, the key is labeled enter or Enter Related documentation Additional documentation is available for CPleX In addition to this introductory manual, the standard distribution of CPleX comes with the CPllX UIser's Manual and the cplex reference manuals. all documentation is available online. It is delivered with the standard distribution of the product and accessible through conventional hTmL browsers for customers on most platforms The CPLEX User's Manual explains the relationship between the Interactive Optimizer and the Component Libraries. It enlarges on aspects of linear programming with CPLEX and shows you how to handle quadratic programming( QP) problems, quadratically constrained programming(QCP problems, second order cone programming (SOCP)problems, and mixed integer programming(MIP) Problems. It tells you how to control CPLEX parameters, debug your applications, and efficiently manage input and output. It also explains how to use parallel CPleX optimizers The CPLEX Callable Library reference manual documents the Callable Library routines and their arguments. This manual also includes additiona documentation about error codes, solutio The CPLEX C++ API Reference Manual documents the C++ API of the Concert Technology classes, methods, and functions The CPLEX Java API Reference Manual supplies detailed definitions of the Concert Technology interfaces and CPLEX Java classes The CPLEX. NET Reference Manual documents the NET API for CPLEX The CPLEX Python API Reference Manual documents the Python API for CPLEX The reference manual CPLEX Parameters contains documentation of parameters for the purpose and allowable settings of CPLEX Parameter e reference manual that can be modified by parameter routines. It is the definitiv The refcrence manual CPLEX File formats contains a list of file formats that CPLEX supports as well as details about using them in your applications x Getting Started with CPLEX

...展开详情
试读 127P IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
xmw393692950 好东西,谢谢分享,在这能找到很多有用的东西
2013-11-27
回复
上传资源赚积分or赚钱
最新推荐
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4 50积分/C币 立即下载
1/127
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第1页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第2页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第3页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第4页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第5页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第6页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第7页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第8页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第9页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第10页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第11页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第12页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第13页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第14页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第15页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第16页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第17页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第18页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第19页
IBM.ILOG.CPLEX.Optimization.Studio.Getting.Start.with.CPLEX.v12.4第20页

试读结束, 可继续阅读

50积分/C币 立即下载 >