Zimpl

Solo disponible en BuenasTareas
  • Páginas : 10 (2377 palabras )
  • Descarga(s) : 0
  • Publicado : 31 de mayo de 2011
Leer documento completo
Vista previa del texto
(Zuse Institute Mathematical Programming Language)

Zimpl User Guide
Thorsten Koch
for Version 2.08 26. September 2008

Contents
1 Preface 2 Introduction 3 Invocation 4 Format 4.1 Expressions . . . . . . . . . . . . . . . . . . 4.2 Sets . . . . . . . . . . . . . . . . . . . . . . 4.3 Parameters . . . . . . . . . . . . . . . . . . 4.4 Variables . . . . . . . . . . . . . . . . . . . 4.5Objective . . . . . . . . . . . . . . . . . . . 4.6 Constraints . . . . . . . . . . . . . . . . . . 4.7 Details on sum and forall . . . . . . . . . . 4.8 Details on if in constraints . . . . . . . . . 4.9 Special ordered sets . . . . . . . . . . . . . 4.10 Initializing sets and parameters from a file 4.11 Function definitions . . . . . . . . . . . . . 4.12 Extended constraints . . . . . . . . . . . .4.13 Extended functions . . . . . . . . . . . . . 4.14 The do print and do check commands . . 5 Modeling examples 5.1 The diet problem . . . . . . . . 5.2 The traveling salesman problem 5.3 The capacitated facility location 5.4 The n-queens problem . . . . . 6 Error messages 1 . . . . . . . . . . problem . . . . . . . . . 2 3 4 4 5 7 9 10 11 11 12 12 12 13 15 15 15 16 17 17 18 19 21 25

. . . . .. . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . .. . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

Zimpl

Abstract Zimpl is a little language to translate the mathematical model of a problem into a linear or (mixed-)integer mathematical program expressed in lp or mps file format which can be read and (hopefully) solved by a lp or mip solver.

1

Preface
May the source be with you, Luke!Many of the things in Zimpl (and a lot more) can be found in the excellent book about the modeling language ampl from Robert Fourer, David N. Gay and Brian W. Kernighan [FGK03]. Those interested in an overview of the current state-of-the-art in (commercial) modeling languages might have a look at [Kal04b]. Having the source code of a program has its advantages. The possibility to run it regardlessof architecture and operating system, the ability to modify it to suite the needs, and not having to hassle with license managers may make a much less powerful program the better choice. And so Zimpl came into being. By now Zimpl has grown up and matured. It has been used in several industry projects and university lectures, showing that it is able to cope with large scale models and also withstudents. This would have not been possible without my early adopters Armin Fügenschuh, Marc Pfetsch, Sascha Lukac, Daniel Junglas, Jörg Rambau and Tobias Achterberg. Thanks for there comments and bug reports. Zimpl is licensed under the GNU general public license version 2. For more information on free software see http://www.gnu.org. The latest version of Zimpl can be found athttp://www.zib.de/koch/zimpl. If you find any bugs, please send an email to mailto:koch@zib.de. But do not forget to include an example that shows the problem. If somebody extends Zimpl, I am interested in getting patches to include them in the main distribution. The best way to refer to Zimpl in a publication is to cite my PhD thesis [Koc04]
@PHDTHESIS{Koch2004, author = "Thorsten Koch", title = "Rapid MathematicalProgramming", school = "Technische {Universit"at} Berlin", year = "2004", url = "http://www.zib.de/Publications/abstracts/ZR-04-58/", note = "ZIB-Report 04-58" }

2

Zimpl

2

Introduction
min 2x + 3y subject to x + y
x, y

Consider the following linear program:
6 0

The standard format used to feed such a problem into a solver is called mps. ibm invented it for the Mathematical...
tracking img