% 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}





