Apr 14, 2014

Code Highlighting for BIOGEME in Notepad++

If you are using BIOGEME to estimate discrete choice models and you use Notepad++ to modify your model specification file, then the you may use an xml-file for code highlighting in order to make your model specification file look nicer.
BIerlaire Optimization toolbox for GEv Model Estimation (BIOGEME), is a free software package for the estimation of a wide range of discrete choice models (multinomial logit, nested logit, and mixed logit, for example). The respective model is specified in a so-called model specification file (.mod). The mod-file can be manipulated by any text editor. Truly, Notepad++ is a nice and convenient text editor for Windows operating system. The editor Notepad++ supports code highlighting for many programming languages such as Fortran and C++ as well as functional languages for statistical computing (R and Python, for example). However, BIOGEME is not supported so far.

In section Tools I provide an xml-file that can be easily installed in Notepad++. A description of how the xml-file is installed in Notepad++ is given here. Basically, there is no improvement concerning functionality of Notepad++ or BIOGEME (of course not). Indeed, using the xml-file in Notepad++ makes the BIOGEME mod-file look more "fancy", i.e. it helps to exaggerate the visual difference between various syntactical elements. Note that the xml-file is only meaningful if the Bison version of BIOGEME is used since the Python version is based on Python programming language (as the name suggests). Code highlighting for the Python language is already supported by Notepad++. 

Additional to the code highlighting functionality for BIOGEME mod-files the xml-file supports code highlighting for the parameters file (.par) used by BIOGEME. The par-file primarily contains settings for the optimization algorithm used by BIOGEME in (simulated) maximum likelihood estimation.

Any comments and bug reports are gratefully acknowledged.

Screenshot Notepad++ using xml-file for code highlighting of BIOGEME mode-file.