Subsections
2 Installation and Download locations
This section explains the installation for different operating systems
(OSs). As
iTS MAITis heavily based on the open source software packages
Python2
(http://www.python.org),
Python Numeric and Tcl/Tk
(http://dev.scriptics.com/),
it is necessary to install those packages before
iTS MAITcan be
launched1.
DIRECT LINKS FOR DOWNLOADING ALL REQUIRED SOFTWARE ARE
PROVIDED IN THE SUBSECTION THAT CORRESPOND TO YOUR OPERATING
SYSTEM!. For windows, there is just one zipped file to download,
which contains all the software needed!
As system requirement, an Intel Processor with at least 500MHz
(or equivalent), 64Mb of RAM and 15MB of disk space is recommended.
The simulator can also be used with less powerful computers. However,
in the graphic mode, vehicles movement becomes very slow and jerky.
However, a previously edited network can be simulated in command-line mode,
which is significantly faster.
2.2 Installation for MS Windows
All free packages run on 95, 98, NT, 2000, XP and Vista.
2.2.1 Instructions if open source packages are not installed
Since code.enthought.com offers a complete Python suit for windows, including all required packages, it is easiest to install just this software (instead of the individual packages):
- Download the latest version at
http://code.enthought.com/enthon/.
- Double-click on the downloaded file and follow instructions.
Now you are ready to install the
iTS MAITsoftware, (see Sec. 2.2.2).
2.2.2 Open source packages are already installed
Use these instructions if you have Python 2.3.4 and Python
Numeric-23.1 or greater installed on your system (or followed installation in Sec. 2.2.1).
- Download
http://distart041.ing.unibo.it/~mait/projects/sim/downloads/its-0.51-win.zip
into a directory of your choice
i.e. My Documents its. On this level, a directory
(containing all simulation files) with the name its-0.51will be
created.
- Rightclick on file My Documents its and select: extract all...
- Open the its-0.51directory and start the
simulator by clicking on the file its (with the snake
icon). If you can see the main window of the simulator (see
Fig. 2), you are ready to proceed with the
tutorials in Sec. 3.
Remark:
(ii): If you have already used a previous version of
iTS MAITyou may have also
previous version of Python and Numeric. These versions should work as
well. However, Python 2.3.4 has been a major bug-fix release and runs
indeed much more stable and also faster. So if you intend to make
large simulations with several thousands of users you are encouraged
to reinstall all packages. Then follow the instructions of Sec. 2.2.1.
(ii): Several
iTS MAIT-version can coexist in separate directory trees,
always named by its version. Executing the simulator of one or the
other version is done by diving into the respective directory and
clicking on the file its. The simulation files created be an
older version (usually in the ``projects'' sub-folder), can be copied
into the ``projects'' sub-folder of the newer version. Simulation
files created by an older version, will be automatically upgraded when
opened with the newer version of the simulator.
2.2.3 Installation of PyOpenGL
In order to view your network in 3D and real-time, you need to have the
PyOpenGl-package installed (!! Does not work with Vista - sorry):
- install one more Python module: download exactly this file
PyOpenGL-2.0.1.09.py2.3-numpy23.exe (for Python 2.3) or PyOpenGL-2.0.1.09.py2.4-numpy23.exe (for Python 2.4).
from
and install this self-extracting file by double-clicking and following
instructions.
- Then you need the Microsoft's OpenGL driver, which is no Open
Source but you get the binary for free from Microsoft or an
open-source clone at
http://distart041.ing.unibo.it/~mait/projects/sim/downloads/glut-3.7.6-bin.zip
Unzip the file, and browse into the directory. You will see a file
called glut32.dll. Just copy this dll- file in the main directory
of the previously installed OpenGL Python package which is usually
in
.
2.3 Installation for Linux
Linux installation is in the best case very easy because Python is
part of most Linux distributions. If you have all the packages or if you
have installed a previous version of
iTS MAITyou can directly go to
Sec. 2.3.1.
However, for the same reason it can
get messy if you have some packages installed, other not, or if you
are using older packages. Therefore, first check out whether the
above mentioned open source packages are already installed on your
system:
- Open a terminal and type:python, or python2.
If you get an error message or if you have a version lower than 2.2
then you need to install/upgrade python and all other packages.
Go to Sec. 2.3.2.
- If you have a valid version of python then type: import
Tkinter behind the python prompt. If this produces an error message,
you need to install TKinter.Go to Sec. 2.3.2.
- If you have the right version of python then type import
Numeric after the python prompt. If this produces an error message,
you need to install Python Numeric. Go to Sec. 2.3.3.
Some quick installation method for python and the required
packages are briefly described below. If you have all packages you can
continue with Sec. 2.3.1.
2.3.1 Installing
iTS MAIT
Once all packages are in place the installation of
iTS MAITis easy:
- Download
http://distart041.ing.unibo.it/~mait/projects/sim/downloads/its-0.51.zip.
- place file its-0.51.zip in a directory of your choice.
Open a Terminal, open this directory and unpack zip archive with
$ unzip -a its-0.51.zip.
- A new subdirectory called ``its-0.51'' has been created; open
it and start the simulator with$ python its.py.
For command line option type $ python its.py -h.
If you see the main window of the simulator (see
Fig. 2) then the installation is successfully
terminated. Otherwise, check out the messages on the terminal to see
whether there is a package missing.
Remark 1: If you intend to install
iTS MAITfor all users then you
should put the entire its-0.51directory in $PYTHONHOME/site-packages/. Read the documentation on how to make
the new package visible to the Python interpreter.
Remark 2: If you intend do more Python programming, I recommend
to use the Python text editor (and development tool) IDLE (which you
can find in the Python installation tree if it is installed). There
are also syntax highlighting packages for the Emacs and FTE editors.
All tools can be found at
www.python.org.
2.3.2 Installing/upgrading Python and Tkinter
What you need is the version Python 2.2 or higher (2.3 recommended)
with Tkinter support. There are different methods to install/upgrade
which are more or less easy, dependent on your present system
configuration.
- Installing with CDs of distribution: This is
easiest. Since Python and Tkinter are part of any Linux distribution
that I know of. Take these CDs and install the following packages in
this sequence (if not already installed):
- python-2.3.3-6
- python-devel-2.3.3-6 (only if you have no RPM binary for Numeric)
- tcl-8.4.5-7 (required for Tkinter)
- tk-8.4.5-8 (required for Tkinter)
- tix-8.1.4-96.1 (required for Tkinter)
- tkinter-2.3.3-6
This list is made off the Fedora Core 2
distribution. In other
distributions version names may slightly differ, but the important
thing is that they are consistent and satisfy
internal dependencies.
RPM package installation for Linux newcomers: login as root, open a
terminal, cd into the RPM-directory of the distribution CD (usually:
$ cd /mnt/cdrom/RPMS) and type:
# rpm -i packagename.rpm
Alternatively use your favorite graphical RPM
management application which is usually somewhere in the applications
launch-bar under System tools, Admin tools or similar).
- Upgrading: If you have Python version
2.2 the
current
iTS MAITversion should work. However, Python 2.3 has been a major
bug-fix release and runs indeed much more stable and also faster (up
to 30% on some benchmarks). So if you intend to make large
simulations with several thousands of users you are encouraged to
upgrade Python. Several Python versions can actually coexist on your
system, you just need to make sure which one is called when you type
$ python or click on a python file.
If you have an RPM based Linux system, make sure to get the upgrade
RPMs for your specific distribution, otherwise you will get crazy with
package dependencies. You can find upgrades on one of the following
sites:
http://www.rpmfind.net/linux/RPM/(all major distributions),
http://freshrpms.net/packages/(RedHat oriented),
http://dag.wieers.com/home-made/apt/(RedHat oriented).
Other distributions like Debian
or Gentoo
do maintain their own
database with upgrades, have a look at their home page.
- Compile from source: Compiled code usually runs faster
than binaries because it will be compiled for your processor and not
for the (lowest) standard processor i386. Download the source code
for Python 2.3.4 from the download page at
www.python.org/ftp/python/2.3.4/Python-2.3.4.tgz
and
compile. Even though the compilation process is well done and
straight forward to use, people who never compiled a source package
may find it difficult to go through all steps.
2.3.3 Installing Python Numeric
If you have Python up and running, choose one of these methods to get
python-numeric-23.1 installed:
- RPMs: This is easiest, but recommended ONLY if you find
the package python-numeric-23.1-xxxx.rpm for your particular Linux
distribution. Have a look at the following mirrors:
www.rpmfind.net/linux/RPM/(all major distributions),
http://freshrpms.net/packages/(RedHat oriented),
http://dag.wieers.com/home-made/apt/(RedHat oriented)
Other distributions like Debian or Gentoo do maintain their own
database with upgrades. Just have a look at the respective home page.
- Compile from source: This is actually the ``Python
way'' to install Python modules, because it is platform
independent.
- First make sure you have the Python header files installed,
which should be the case when you have compiled Python from
source. Otherwise,install the RPM package python-devel-2.3.x-x
from your Linux distribution.
- Download source Numeric-23.1.zip
at
http://sourceforge.net/projects/numpy
and unzip.
- Open terminal as root in the unzipped directory Numeric-23.1 and type:
# python setup.py install
If you have problems consult the Python Numeric homepage
(http://www.pfdubois.com/numpy/)
2.3.4 Installation of PyOpenGL
In order to view your network in 3D and real-time, you need to have the
PyOpenGL-2.0 (or newer) installed:
- PyOpenGL is often available as binary RPM or Debian package for
you Linux distribution. Sometime the package is called
``python-opengl''. Check out the respective repositories, see
Sec. 2.3.3
- Download and compile the source from
Joerg Schweizer
2007-07-17