AMPL : A Modeling Language for Mathematical Programming

by ; ;
Edition: 2nd
Format: Hardcover
Pub. Date: 2002-11-12
Publisher(s): Duxbury Press
  • Free Shipping Icon

    This Item Qualifies for Free Shipping!*

    *Excludes marketplace orders.

List Price: $153.25

Rent Textbook

Select for Price
There was a problem. Please try again later.

New Textbook

We're Sorry
Sold Out

Used Textbook

We're Sorry
Sold Out

eTextbook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

AMPL is a language for large-scale optimization and mathematical programming problems in production, distribution, blending, scheduling, and many other applications. Combining familiar algebraic notation and a powerful interactive command environment, AMPL makes it easy to create models, use a wide variety of solvers, and examine solutions. Though flexible and convenient for rapid prototyping and development of models, AMPL also offers the speed and generality needed for repeated large-scale production runs. This book, written by the creators of AMPL, is a complete guide for modelers at all levels of experience. It begins with a tutorial on widely used linear programming models, and presents all of AMPL's features for linear programming with extensive examples. Additional chapters cover network, nonlinear, piecewise-linear, and integer programming; database and spreadsheet interactions; and command scripts. Most chapters include exercises. Download free versions of AMPL and several solvers from www.ampl.com for experimentation, evaluation, and education. The Web site also lists vendors of the commercial version of AMPL and numerous solvers.

Table of Contents

Introduction xv
Production Models: Maximizing Profits
1(26)
A two-variable linear program
2(3)
The two-variable linear program in AMPL
5(1)
A linear programming model
6(1)
The linear programming model in AMPL
7(6)
The basic model
8(2)
An improved model
10(2)
Catching errors
12(1)
Adding lower bounds to the model
13(2)
Adding resource constraints to the model
15(3)
AMPL interfaces
18(9)
Diet and Other Input Models: Minimizing Costs
27(16)
A linear program for the diet problem
27(3)
An AMPL model for the diet problem
30(2)
Using the AMPL diet model
32(5)
Generalizations to blending, economics and scheduling
37(6)
Transportation and Assignment Models
43(12)
A linear program for the transportation problem
44(1)
An AMPL model for the transportation problem
45(4)
Other interpretations of the transportation model
49(6)
Building Larger Models
55(18)
A multicommodity transportation model
56(3)
A multiperiod production model
59(4)
A model of production and transportation
63(10)
Simple Sets and Indexing
73(18)
Unordered sets
73(2)
Sets of numbers
75(1)
Set operations
76(2)
Set membership operations and functions
78(1)
Indexing expressions
79(3)
Ordered sets
82(9)
Predefined sets and interval expressions
86(5)
Compound Sets and Indexing
91(18)
Sets of ordered pairs
91(2)
Subsets and slices of ordered pairs
93(3)
Sets of longer tuples
96(2)
Operations on sets of tuples
98(2)
Indexed collections of sets
100(9)
Parameters and Expressions
109(20)
Parameter declarations
110(1)
Arithmetic expressions
111(3)
Logical and conditional expressions
114(2)
Restrictions on parameters
116(2)
Computed parameters
118(3)
Randomly generated parameters
121(1)
Logical parameters
122(1)
Symbolic parameters
123(6)
Linear Programs: Variables, Objectives and Constraints
129(14)
Variables
129(3)
Linear expressions
132(2)
Objectives
134(3)
Constraints
137(6)
Specifying Data
143(26)
Formatted data: the data command
143(2)
Data in lists
145(9)
Lists of one-dimensional sets and parameters
145(1)
Lists of two-dimensional sets and parameters
146(2)
Lists of higher-dimensional sets and parameters
148(3)
Combined lists of sets and parameters
151(3)
Data in tables
154(6)
Two-dimensional tables
154(2)
Two-dimensional slices of higher-dimensional data
156(1)
Higher-dimensional tables
157(2)
Choice of format
159(1)
Other features of data statements
160(3)
Default values
160(1)
Indexed collections of sets
161(1)
Initial values for variables
162(1)
Reading unformatted data: the read command
163(6)
Database Access
169(34)
General principles of data correspondence
169(5)
Examples of table-handling statements
174(6)
Reading data from relational tables
180(6)
Reading parameters only
180(2)
Reading a set and parameters
182(2)
Establishing correspondences
184(1)
Reading other values
185(1)
Writing data to relational tables
186(5)
Writing rows inferred from the data specifications
186(3)
Writing rows inferred from a key specification
189(2)
Reading and writing the same table
191(2)
Reading and writing using two table declarations
192(1)
Reading and writing using the same table declaration
193(1)
Indexed collections of tables and columns
193(4)
Indexed collections of tables
193(3)
Indexed collections of data columns
196(1)
Standard and built-in table handlers
197(6)
Using the standard ODBC table handler
198(2)
Using the standard ODBC table handler with Access and Excel
200(1)
Built-in table handlers for text and binary files
201(2)
Modeling Commands
203(16)
General principles of commands and options
203(3)
Commands
204(1)
Options
204(2)
Setting up and solving models and data
206(3)
Entering models and data
206(1)
Solving a model
207(2)
Modifying data
209(3)
Resetting
209(1)
Resampling
209(1)
The let command
210(2)
Modifying models
212(7)
Removing or redefining model components
213(1)
Changing the model: fix, unfix; drop, restore
214(1)
Relaxing integrality
215(4)
Display Commands
219(36)
Browsing through results: the display command
219(8)
Displaying sets
220(1)
Displaying parameters and variables
220(4)
Displaying indexed expressions
224(3)
Formatting options for display
227(5)
Arrangement of lists and tables
227(2)
Control of line width
229(2)
Suppression of zeros
231(1)
Numeric options for display
232(6)
Appearance of numeric values
233(3)
Rounding of solution values
236(2)
Other output commands: print and printf
238(2)
The print command
238(1)
The printf command
239(1)
Related solution values
240(5)
Objective functions
240(1)
Bounds and slacks
241(2)
Dual values and reduced costs
243(2)
Other display features for models and instances
245(6)
Displaying model components: the show command:
246(1)
Displaying model dependencies: the xref command
247(1)
Displaying model instances: the expand command
247(2)
Generic synonyms for variables, constraints and objectives
249(1)
Resource listings
250(1)
General facilities for manipulating output
251(4)
Redirection of output
251(1)
Output logs
251(1)
Limits on messages
252(3)
Command Scripts
255(20)
Running scripts: include and commands
255(3)
Iterating over a set: the for statement
258(4)
Iterating subject to a condition: the repeat statement
262(2)
Testing a condition: the if-then-else statement
264(2)
Terminating a loop: break and continue
266(2)
Stepping through a script
268(2)
Manipulating character strings
270(5)
String functions and operators
270(3)
String expressions in AMPL commands
273(2)
Interactions with Solvers
275(44)
Presolve
275(7)
Activities of the presolve phase
276(2)
Controlling the effects of presolve
278(1)
Detecting infeasibility in presolve
279(3)
Retrieving results from solvers
282(13)
Solve results
282(4)
Solver statuses of objectives and problems
286(1)
Solver statuses of variables
287(4)
Solver statuses of constraints
291(2)
AMPL statuses
293(2)
Exchanging information with solvers via suffixes
295(9)
User-defined suffixes: integer programming directives
296(2)
Solver-defined suffixes: sensitivity analysis
298(1)
Solver-defined suffixes: infeasibility diagnosis
299(1)
Solver-defined suffixes: direction of unboundedness
300(2)
Defining and using suffixes
302(2)
Alternating between models
304(5)
Named problems
309(10)
Defining named problems
311(3)
Using named problems
314(1)
Displaying named problems
315(1)
Defining and using named environments
316(3)
Network Linear Programs
319(34)
Minimum-cost transshipment models
319(9)
A general transshipment model
320(3)
Specialized transshipment models
323(3)
Variations on transshipment models
326(2)
Other network models
328(5)
Maximum flow models
328(1)
Shortest path models
329(1)
Transportation and assignment models
330(3)
Declaring network models by node and arc
333(7)
A general transshipment model
334(1)
A specialized transshipment model
335(1)
Variations on transshipment models
336(1)
Maximum flow models
337(3)
Rules for node and arc declarations
340(3)
node declarations
340(1)
arc declarations
340(1)
Interaction with objective declarations
341(1)
Interaction with constraint declarations
342(1)
Interaction with variable declarations
342(1)
Solving network linear programs
343(10)
Columnwise Formulations
353(12)
An input-output model
354(5)
Formulation by constraints
354(1)
A columnwise formulation
355(2)
Refinements of the columnwise formulation
357(2)
A scheduling model
359(3)
Rules for columnwise formulations
362(3)
Piecewise-Linear Programs
365(26)
Cost terms
366(3)
Fixed numbers of pieces
366(2)
Varying numbers of pieces
368(1)
Common two-piece and three-piece terms
369(10)
Penalty terms for ``soft'' constraints
369(4)
Dealing with infeasibility
373(4)
Reversible activities
377(2)
Other piecewise-linear functions
379(3)
Guidelines for piecewise-linear optimization
382(9)
Forms for piecewise-linear expressions
382(1)
Suggestions for piecewise-linear models
383(8)
Nonlinear Programs
391(28)
Sources of nonlinearity
392(5)
Dropping a linearity assumption
393(3)
Achieving a nonlinear effect
396(1)
Modeling an inherently nonlinear process
397(1)
Nonlinear variables
397(3)
Initial values of variables
398(1)
Automatic substitution of variables
399(1)
Nonlinear expressions
400(3)
Pitfalls of nonlinear programming
403(16)
Function range violations
403(4)
Multiple local optima
407(3)
Other pitfalls
410(9)
Complementarity Problems
419(18)
Sources of complementarity
419(8)
A complementarity model of production economics
420(3)
Complementarity for bounded variables
423(2)
Complementarity for price-dependent demands
425(1)
Other complementarity models and applications
426(1)
Forms of complementarity constraints
427(1)
Working with complementarity constraints
428(9)
Related solution values
428(1)
Presolve
429(2)
Generic synonyms
431(6)
Integer Linear Programs
437(16)
Integer variables
438(1)
Zero-one variables and logical conditions
439(9)
Fixed costs
440(4)
Zero-or-minimum restrictions
444(1)
Cardinality restrictions
445(3)
Practical considerations in integer programming
448(5)
Appendix A. AMPL Reference Manual 453(48)
A.1 Lexical rules
453(1)
A.2 Set members
454(1)
A.3 Indexing expressions and subscripts
455(1)
A.4 Expressions
455(6)
A.4.1 Built-in functions
458(1)
A.4.2 Strings and regular expressions
459(1)
A.4.3 Piecewise-linear terms
460(1)
A.5 Declarations of model entities
461(1)
A.6 Set declarations
461(4)
A.6.1 Cardinality and arity functions
462(1)
A.6.2 Ordered sets
463(1)
A.6.3 Intervals and other infinite sets
463(2)
A.7 Parameter declarations
465(1)
A.7.1 Check statements
465(1)
A.7.2 Infinity
466(1)
A.8 Variable declarations
466(2)
A.8.1 Defined variables
467(1)
A.9 Constraint declarations
468(2)
A.9.1 Complementarity constraints
469(1)
A.10 Objective declarations
470(1)
A.11 Suffix notation for auxiliary values
470(3)
A.11.1 Suffix declarations
471(2)
A.11.2 Statuses
473(1)
A.12 Standard data format
473(4)
A.12.1 Set data
473(2)
A.12.2 Parameter data
475(2)
A.13 Database access and tables
477(2)
A.14 Command language overview
479(2)
A.14.1 Options and environment variables
481(1)
A.15 Redirection of input and output
481(1)
A.16 Printing and display commands
482(2)
A.17 Reading data
484(1)
A.18 Modeling commands
485(6)
A.18.1 The solve command
485(2)
A.18.2 The solution command
487(1)
A.18.3 The write command
487(1)
A.18.4 Auxiliary files
487(1)
A.18.5 Changing a model: delete, purge, redeclare
488(1)
A.18.6 The drop, restore and objective commands
489(1)
A.18.7 The fix and unfix commands
489(1)
A.18.8 Named problems and environments
489(1)
A.18.9 Modifying data: reset, update, let
490(1)
A.19 Examining models
491(1)
A.19.1 The show command
491(1)
A.19.2 The xref command
492(1)
A.19.3 The expand command
492(1)
A.19.4 Generic names
492(1)
A.19.5 The check command
492(1)
A.20 Scripts and control flow statements
492(3)
A.20.1 The for, repeat and if-then-else statements
493(2)
A.20.2 Stepping through commands
495(1)
A.21 Computational environment
495(2)
A.21.1 The shell command
495(1)
A.21.2 The cd command
495(1)
A.21.3 The quit, exit and end commands
496(1)
A.21.4 Built-in timing parameters
496(1)
A.21.5 Logging
496(1)
A.22 Imported functions
497(2)
A.23 AMPL invocation
499(2)
Index 501

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.