没有合适的资源?快使用搜索试试~ 我知道了~
LINDO API 6.0 User Manual
3星 · 超过75%的资源 需积分: 9 27 下载量 153 浏览量
2010-03-13
01:37:02
上传
评论
收藏 4.14MB PDF 举报
温馨提示
试读
636页
lindo api 6.0 用户手册 Lindo API 可以建立求最佳解的应用程序。Lindo API 允许你将强大的线性、整数或非线性求解引擎挂入你已写好的应用程序中。 Lindo API可以使你容易地将最佳化的功能整合到你自己开发的应用程序中。 Lindo API 附有完整的文件和范例帮助您迅速上手。 Lindo API 提供的强大求解引擎包括针对线性、非线性(convex和nonconvex),二次和整数的最佳化。 Lindo API 提供了你需要的弹性和功能,不管你的应用程序是大或小,简单或复杂。它包含了数十个程序(routine)来公式化、求解、查询和修改你的问题。 Lindo API 提供的所有工具和文件可使你迅速入门和上手。 Lindo API 使用者手册有详细的功能定义。 Lindo API 内含工具可以找出导致模型无合理解或无边际模型的原因。 Lindo API 允许你建立因特网和企业内部网络的应用程序可同时供多人使用。
资源推荐
资源详情
资源评论
LINDO
API 6.0
User Manual
LINDO Systems, Inc.
1415 North Dayton Street, Chicago, Illinois 60642
Phone: (312)988-7422 Fax: (312)988-9065
E-mail: [email protected]
COPYRIGHT
LINDO API and its related documentation are copyrighted. You may not copy the LINDO API
software or related documentation except in the manner authorized in the related documentation or
with the written permission of LINDO Systems, Inc.
TRADEMARKS
LINDO is a registered trademark of LINDO Systems, Inc. Other product and company names
mentioned herein are the property of their respective owners.
DISCLAIMER
LINDO Systems, Inc. warrants that on the date of receipt of your payment, the disk enclosed in the
disk envelope contains an accurate reproduction of LINDO API and that the copy of the related
documentation is accurately reproduced. Due to the inherent complexity of computer programs and
computer models, the LINDO API software may not be completely free of errors. You are advised to
verify your answers before basing decisions on them. NEITHER LINDO SYSTEMS INC. NOR
ANYONE ELSE ASSOCIATED IN THE CREATION, PRODUCTION, OR DISTRIBUTION OF
THE LINDO SOFTWARE MAKES ANY OTHER EXPRESSED WARRANTIES REGARDING
THE DISKS OR DOCUMENTATION AND MAKES NO WARRANTIES AT ALL, EITHER
EXPRESSED OR IMPLIED, REGARDING THE LINDO API SOFTWARE, INCLUDING THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
OR OTHERWISE. Further, LINDO Systems, Inc. reserves the right to revise this software and related
documentation and make changes to the content hereof without obligation to notify any person of such
revisions or changes.
Copyright ©2009 by LINDO Systems, Inc. All rights reserved.
Published by
1415 North Dayton Street
Chicago, Illinois 60642
Technical Support: (312) 988-9421
E-mail: [email protected]
http://www.lindo.com
iii
TABLE OF CONTENTS
TABLE OF CONTENTS ............................................................................................................iii
Preface .....................................................................................................................................vii
Chapter 1:.................................................................................................................................. 1
Introduction................................................................................................................................1
What Is LINDO API? ............................................................................................................ 1
Linear Solvers................................................................................................................... 2
Mixed-Integer Solver......................................................................................................... 2
Nonlinear Solver ............................................................................................................... 3
Global Solver .................................................................................................................... 3
Stochastic Solver.............................................................................................................. 3
Installation ............................................................................................................................ 3
Windows Platforms........................................................................................................... 4
Unix-Like Platforms........................................................................................................... 4
Updating License Keys......................................................................................................... 6
Solving Models from a File using Runlindo.......................................................................... 7
Sample Applications............................................................................................................. 9
Array Representation of Models........................................................................................... 9
Sparse Matrix Representation ........................................................................................ 10
Simple Programming Example....................................................................................... 13
Chapter 2:................................................................................................................................17
Function Definitions................................................................................................................. 17
Common Parameter Macro Definitions.............................................................................. 18
Structure Creation and Deletion Routines.......................................................................... 21
License and Version Information Routines ........................................................................ 23
Input-Output Routines ........................................................................................................ 25
Parameter Setting and Retrieving Routines....................................................................... 42
Available Parameters...................................................................................................... 53
Available Information ...................................................................................................... 99
Model Loading Routines................................................................................................... 114
Solver Initialization Routines ............................................................................................ 135
Optimization Routines ...................................................................................................... 139
Solution Query Routines .................................................................................................. 144
Model Query Routines...................................................................................................... 160
Model Modification Routines ............................................................................................ 191
Model and Solution Analysis Routines............................................................................. 210
Error Handling Routines................................................................................................... 219
Advanced Routines .......................................................................................................... 221
Callback Management Routines ...................................................................................... 227
Memory Management Routines....................................................................................... 238
Random Number Generation Routines............................................................................ 241
Sampling Routines ........................................................................................................... 245
Chapter 3:.............................................................................................................................. 259
Solving Linear Programs....................................................................................................... 259
A Programming Example in C.......................................................................................... 259
A Programming Example in Visual Basic......................................................................... 269
iv TABLE OF CONTENTS
VB and Delphi Specific Issues: ........................................................................................ 277
Chapter 4: Solving................................................................................................................. 279
Mixed-Integer Programs........................................................................................................ 279
Staffing Example Using Visual C++ ................................................................................. 280
Staffing Example Using Visual Basic ............................................................................... 287
Chapter 5: Solving Quadratic Programs ............................................................................... 295
Setting up Quadratic Programs........................................................................................ 296
Loading Quadratic Data via Extended MPS Format Files............................................ 296
Loading Quadratic Data via API Functions .................................................................. 297
Sample Portfolio Selection Problems............................................................................... 300
Example 1. The Markowitz Model: ............................................................................... 300
Example 2. Portfolio Selection with Restrictions on the Number of Assets Invested:.. 304
Chapter 6: Solving Second-Order Cone Programs............................................................... 311
Setting up Second-Order Cone Programs ....................................................................... 314
Loading Cones via Extended MPS Format Files.......................................................... 314
Loading Cones via API Functions ................................................................................ 316
Example 3: Minimization of Norms:.............................................................................. 316
Converting Models to SOCP Form............................................................................... 321
Example 4: Ratios as SOCP Constraints: .................................................................... 322
Quadratic Programs as SOCP ..................................................................................... 326
Chapter 7: Solving Nonlinear Programs................................................................................ 329
Black-Box Style Interface ................................................................................................. 330
Loading Model Data...................................................................................................... 331
Evaluating Nonlinear Terms via Callback Functions.................................................... 333
Instruction-List Style Interface.......................................................................................... 337
Postfix Notation in Representing Expressions ............................................................. 337
Supported Operators and Functions ............................................................................ 339
Grey-Box Style Interface .................................................................................................. 346
Instruction Format......................................................................................................... 348
Example 1..................................................................................................................... 348
Example 2..................................................................................................................... 348
Example 3..................................................................................................................... 349
Differentiation ................................................................................................................... 349
Solving Non-convex and Non-smooth models................................................................. 350
Linearization ................................................................................................................. 350
Multistart Scatter Search for Difficult Nonlinear Models............................................... 352
Global Optimization of Difficult Nonlinear Models ........................................................ 354
Sample Nonlinear Programming Problems...................................................................... 355
Example 1: Black-Box Style Interface: ......................................................................... 355
Example 2: Instruction-List Style Interface................................................................... 361
Example 3: Multistart Solver for Non-Convex Models................................................. 371
Example 4: Global Solver with MPI Input Format......................................................... 375
Example 5: Grey-Box Style Interface ........................................................................... 381
Chapter 8:.............................................................................................................................. 389
Stochastic Programming....................................................................................................... 389
Multistage Decision Making Under Uncertainty ............................................................... 389
Recourse Models ............................................................................................................. 391
Scenario Tree................................................................................................................... 391
Setting up SP Models:...................................................................................................... 393
Loading Core Model: .................................................................................................... 394
TABLE OF CONTENTS v
Loading the Time Structure: ......................................................................................... 397
Loading the Stochastic Structure:................................................................................. 399
Monte Carlo Sampling...................................................................................................... 406
Sample SP Problems ....................................................................................................... 411
An Investment Model to Fund College Education: ....................................................... 411
An American Put-Options Model: ................................................................................. 413
Appendix 8a: Correlation Specification......................................................................... 415
Appendix 8b: Random Number Generation ................................................................ 415
Appendix 8c: Variance Reduction ............................................................................... 416
Appendix 8d: The Costs of Uncertainty, EVMU and EVPI .......................................... 416
Chapter 9:.............................................................................................................................. 421
Using Callback Functions...................................................................................................... 421
Specifying a Callback Function........................................................................................ 421
A Callback Example Using C ........................................................................................... 424
A Callback Example Using Visual Basic .......................................................................... 429
Integer Solution Callbacks................................................................................................ 430
Chapter 10: Analyzing Models and Solutions ....................................................................... 433
Sensitivity and Range Analysis of an LP.......................................................................... 433
Diagnosis of Infeasible or Unbounded Models................................................................. 435
Infeasible Models.......................................................................................................... 435
Unbounded Linear Programs ....................................................................................... 437
Infeasible Integer Programs ......................................................................................... 438
Infeasible Nonlinear Programs ..................................................................................... 438
An Example for Debugging an Infeasible Linear Program............................................... 438
Block Structured Models .................................................................................................. 444
Determining Total Decomposition Structures............................................................... 446
Determining Angular Structures ................................................................................... 447
Chapter 11: mxLINDO........................................................................................................... 449
A MATLAB Interface.............................................................................................................. 449
Introduction....................................................................................................................... 449
Setting up MATLAB to Interface with LINDO ................................................................... 449
Using the mxLINDO Interface .......................................................................................... 450
Calling Conventions ......................................................................................................... 452
mxLINDO Routines .......................................................................................................... 452
Structure Creation and Deletion Routines.................................................................... 452
License Information Routines....................................................................................... 455
Input-Output Routines .................................................................................................. 456
Error Handling Routines ............................................................................................... 464
Parameter Setting and Retrieving Routines................................................................. 466
Model Loading Routines............................................................................................... 473
Solver Initialization Routines ........................................................................................ 486
Optimization Routines .................................................................................................. 490
Solution Query Routines............................................................................................... 491
Model Query Routines.................................................................................................. 498
Model Modification Routines ........................................................................................ 517
Model and Solution Analysis Routines......................................................................... 534
Advanced Routines....................................................................................................... 541
Callback Management Routines................................................................................... 546
Auxiliary Routines......................................................................................................... 552
Sample MATLAB Functions ............................................................................................. 554
剩余635页未读,继续阅读
资源评论
- 一个人的场域2012-08-24还不错,windows版的~
- ilikenba2013-08-03还不错,有一些例子!
nl2105
- 粉丝: 3
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功