File: zimpl.tex

package info (click to toggle)
zimpl 3.7.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,772 kB
  • sloc: ansic: 21,719; yacc: 993; lex: 370; sh: 349; makefile: 278
file content (240 lines) | stat: -rw-r--r-- 8,058 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
% dvips -ta4 -O0in,-1in zimpl.dvi
%* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%*                                                                           *
%*   File....: zimpl.tex                                                     *
%*   Name....: Zuse Institute Mathematical Programming Language              *
%*   Author..: Thorsten Koch                                                 *
%*   Copyright (C) 2010-2020 by Author, All rights reserved                  *
%*                                                                           *
%* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%
\documentclass[11pt]{article}
%\renewcommand{\rmdefault}{pmnj}
%\renewcommand{\ttdefault}{pcr}
%\renewcommand{\sfdefault}{pmy}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[small,euler-digits]{eulervm}
\usepackage{a4}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xspace}
\usepackage{epsfig}
\usepackage{fancyhdr}
%\usepackage{xspace}
\usepackage{multicol}
\usepackage{url}
\usepackage{color}
\usepackage{booktabs}
\usepackage{listings}
\usepackage{graphicx}
%\usepackage{zibtitlepage}
%\usepackage{pdfdraftcopy}
\usepackage[dvips,%
bookmarks,pdffitwindow,pdfcenterwindow=true,pdfstartview=Fit]{hyperref}
\hypersetup{%
pdftitle={ZIMPL User Guide},
pdfsubject={Zuse Institute Mathematical Programming Language Version 3.7.0},
pdfauthor={Thorsten Koch},
pdfkeywords={Mathematical Modeling Language,Mathematical Programming,Optimization, Algebraic Modeling Language}
}
%
\definecolor{seagreen}{rgb}{0.18,0.74,0.56}
\definecolor{darkgreen}{rgb}{0.0,0.35,0.00}
\definecolor{navyblue}{rgb}{0.0,0.0,0.5}
\definecolor{steelblue}{rgb}{0.27,0.51,0.71}
\definecolor{siennabrown}{rgb}{0.63,0.32,0.18}
\definecolor{firebrickred}{rgb}{0.69,0.13,0.13}
\definecolor{gray75}{rgb}{0.75,0.75,0.75}
%
\lstloadlanguages{C}
\lstdefinelanguage{mps}{%
   keywords={NAME,ROWS,COLUMNS,RHS,BOUNDS,ENDATA},%
   sensitive,%
   keywordstyle=\color{navyblue},%
}[keywords]%
%
\lstdefinelanguage{YACC}{%
   keywords={\%token,\%type,\%left,\%right,\%union},%
   sensitive,%
   singlecomment={/*}{*/},%
   stringizer=[b]',%
   keywordstyle=\color{navyblue},%
   commentstyle=\color{darkgreen},%
   stringstyle=\color{steelblue}%
}[keywords,comments,strings]%
%
\lstdefinelanguage{zimpl}{%
   keywords={set,var,param,minimize,maximize,subto},%
   ndkeywords={read,as,comment,binary,integer,real,sum,forall,do,in,proj,vif,vabs,and,or,then,else,end},%
   sensitive,%
   showstringspaces=false,%
   morecomment=[l]\#,
   morestring=[b]",%
   keywordstyle=\color{red},%
   ndkeywordstyle=\color{navyblue},%
   commentstyle=\color{darkgreen},%
   stringstyle=\color{steelblue}%
}[keywords,comments,strings]%
%
\lstdefinestyle{myc}{%
   basicstyle=\sffamily\footnotesize,%
   numberstyle=\sffamily\tiny\color{siennabrown},stepnumber=1,%
   keywordstyle=\color{navyblue},%
   commentstyle=\color{darkgreen},%
   stringstyle=\color{steelblue},%
   directivestyle=\color{firebrickred}%
}
%
%\parindent0ex
\renewcommand{\topfraction}{0.8}
\renewcommand{\bottomfraction}{0.8}
\renewcommand{\textfraction}{0.2}
\renewcommand{\floatpagefraction}{0.75}
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{2}
\renewcommand{\labelitemi}{$\blacktriangleright$}
%
\newcommand{\eg}{{e.\,g.}\xspace}
\newcommand{\ie}{{i.\,e.,}\xspace}
\newcommand{\zimpl}{{\sc Zimpl}\xspace}
\newcommand{\lp}{{\sc lp}\xspace}
\newcommand{\ip}{{\sc ip}\xspace}
\newcommand{\cpu}{{\sc cpu}\xspace}
\newcommand{\mip}{{\sc mip}\xspace}
\newcommand{\tsp}{{\sc tsp}\xspace}
\newcommand{\mps}{{\sc mps}\xspace}
\newcommand{\lpf}{{\sc lp}\xspace}
\newcommand{\ibm}{{\sc ibm}\xspace}
\newcommand{\zpl}{{\sc zpl}\xspace}
\newcommand{\ampl}{{\sc ampl}\xspace}
\newcommand{\ilog}{{\sc ilog}\xspace}
\newcommand{\cplex}{{\sc cplex}\xspace}
\newcommand{\scip}{{\sc scip}\xspace}
\newcommand{\sos}{{\sc sos}\xspace}
\newcommand{\code}[1]{{\tt #1}\xspace}
\newcommand{\NN}{\ensuremath{\mathbb{N}}}
\newcommand{\NNZ}{\ensuremath{\mathbb{N}_0}}
\newcommand{\ZZ}{\ensuremath{\mathbb{Z}}}
\newcommand{\BB}{\ensuremath{\{0,1\}}}
\newcommand{\fa}{\ensuremath{\text{for all }}}
\newcommand{\argmin}{\ensuremath{\operatorname{argmin}}\xspace}
\newcommand{\argmax}{\ensuremath{\operatorname{argmax}}\xspace}
%
\headheight5mm
%\renewcommand{\footrulewidth}{\headrulewidth}
\lhead{\zimpl}
\chead{}
\rhead{}
\cfoot{\thepage}
\pagestyle{fancy}
%
\begin{document}
%\ZTPAuthor{Thorsten Koch}
%\ZTPTitle{\zimpl User Guide}
%\ZTPInfo{Best preprint of the year 2000}
%\ZTPNumber{01-20}
%\ZTPMonth{August}
%\ZTPPreprint
%\ZTPYear{2001}
%\zibtitlepage

\title{
%\vspace*{-3cm}\epsfig{file=ziblogo2.eps,width=3cm}\\[\bigskipamount]
\LARGE\zimpl User Guide\\
\normalsize (Zuse Institute Mathematical Programming Language)}
\author{Thorsten Koch}
\date{\small for Version 3.7.0\\October, 2025}
\maketitle
%
\tableofcontents
\newpage
\begin{abstract}
  \zimpl is a little language in order to translate the mathematical
  model of a problem into a linear or (mixed-)integer mathematical
  program, expressed in \lpf or \mps file format which can be read and
  (hopefully) solved by a \lp or \mip solver.
\end{abstract}
% -----------------------------------------------------------------------------
% --- Introduction
% -----------------------------------------------------------------------------


\section{Preface}
\begin{flushright}
{\em May the source be with you, Luke!}
\end{flushright}
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
\cite{FourierGayKernighan2003}. Those interested in an overview of the
current state-of-the-art in (commercial) modeling languages might have
a look at \cite{Kallrath2004}.
%
On the other hand, having the source code of a program has its
advantages. The possibility to run it regardless of architecture and
operating system, the ability to modify it to suit 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.

\bigskip
By now \zimpl has grown up and matured. It has been used in several
industrial projects and university lectures, showing that it is able to
cope with large-scale models and also with students.
This would not have been possible without my early adopters
Armin F\"ugenschuh, Marc Pfetsch, Sascha Lukac, Daniel Junglas, J\"org
Rambau, and Tobias Achterberg. Thanks for their comments and bug
reports. Special thanks to Tuomo Takkula for revising this manual.

\bigskip
\zimpl is licensed under the GNU Lesser General Public License Version 3.
For more information on free software see \url{http://www.gnu.org}.
The latest version of \zimpl can be found at
\url{http://zimpl.zib.de}.
If you find any bugs, then please send an email to
\url{mailto:koch@zib.de}, and do not forget to
include an example that shows the problem.
If somebody extends \zimpl, then I am interested in getting patches
to include them into the main distribution.

\bigskip
\noindent{The best way to refer to \zimpl in a publication is to cite my
  PhD thesis \cite{Koch2004}}
{\small
\begin{verbatim}
 @PHDTHESIS{Koch2004,
   author      = "Thorsten Koch",
   title       = "Rapid Mathematical Programming",
   school      = "Technische {Universit\"at} Berlin",
   year        = "2004",
   url         = "http://www.zib.de/Publications/abstracts/ZR-04-58/",
   note        = "ZIB-Report 04-58"
}
\end{verbatim}

%--------------------------------------------------------------------------------------
\include{zimplug}
%--------------------------------------------------------------------------------------
%\section{Frequently asked questions}
%
%\input{zimplfaq}
%
%\clearpage

\section{Error messages}
Here is a (hopefully) complete list of the incomprehensible error messages \zimpl
can produce:

\input{zimplerr}

\nocite{*}
\small
\bibliographystyle{alpha}
\bibliography{zimpl}
\end{document}