Software | Mitrasim 2000

Here you can find most of the material related to my Master of Computer Science thesis, done at the University of Antwerp (Antwerp, Belgium), under the guidance of prof. dr. Serge Demeyer. The Dutch title of my thesis was:

"Het gebruik van microscopische verkeerssimulatie bij een onderzoek naar de fileproblematiek op de Antwerpse Ring",

or in English:

"The use of microscopic traffic simulation in a study aimed at the congestion problems on Antwerp's beltway".

The accompanying Java software package was a microscopic road traffic simulator, called Mitrasim 2000.

Quick navigation:

I also got the opportunity to show the resulting work of this thesis during a short demonstration to Shushei Toyoda (i.e., the CEO of Toyota Motor Engineering and Manufacturing Europe), when he paid a visit to ESAT on April 10, 2003.



Introduction Jump to top of page

With the ever growing traffic-density on the Belgian highways, the need arises for better ways to make road transport safer and more efficient.

From this point of view, this thesis analyses the influence of several potential solutions, more exactly the fundamental changing of the road-structure (by means of adding an extra lane), the adaptation of the traffic guidelines (concerning speedlimits, the lane usage by trucks, and the imposing of a lane-change prohibition) and changing the driver's behaviour (by eliminating middle-lane drivers).

A microscopic traffic simulator is used as a method for analysis, it is based on a mathematical model that combines the relevant aspects from literature and is adapted to the specific situations on the Antwerp Ring. Based on performed simulations, it can be said that the addition of extra lanes has no significant impact on safety and efficiency. Changes in the traffic-guidelines don't offer a good solution as well. As opposed to this, it seems that understanding the role of middle-lane drivers is very important. A suprising result is that they - when not to abundant - can lead to a more efficient flowing traffic-stream. Because of all this, the research done in this thesis contributes to the acquiring of a better understanding in the complex and dense situations on our highways and it allows us to balance the effect that certain measures have on traffic management and the economy.

It is of the upmost importance that there is going to be a change in the mentality of drivers (they must comply to speed limits, don't take unnecessary risks that diminish the safety), and a general coordination on a large scale (which can lead to the use of Intelligent Transportation Systems) is needed.

Promotor: Serge Demeyer
Advisors: Stijn Dekeyser, Benny Vanhoudt, and Tom Van Woensel.


Screenshots Jump to top of page

Click on the thumbnails for larger versions.

Configurator

All the tools of the Mitrasim 2000-suite are preconfigured with a standard set of values that are stored in an INI-file called mitrasim2000.ini. These values mostly deal with window sizes et cetera, so a tool was provided which allows a user to quickly change them without any nasty side effects like incorrectly typed numbers, ...
The graphical user interface.

Network Modeller

Mitrasim 2000 uses a network-description file that contains the complete layout of the network (nodes, links, and environments). This file can be created manually by specifying each node, link, and environment by hand but this has proven to be awkward and the probability of introducing errors is too high. To accomodate for this, a network modeller was built that simplifies the task: an image (like a satellite photograph) can be used as a background map from which all positions of nodes, ... are derived. So no coordinates need to be specified, they are calculated explicitly. The only thing that must be done is specifying a map, the position of the origin (which is arbitrary), and a scale factor to convert distances on the screen to real-world distances and vice versa.
The upshot is that modelling a network goes much faster. An analysis of the network's connectivity can be done to reveal errors in link definitions, ... The network's layout can be saved and later on reloaded so no details get lost. The generated file is fully compatible with every Mitrasim 2000 component.
Graphically modelling a network.
Setting the lane change permissions.

Network Viewer

The Network Viewer component of Mitrasim 2000 enables you to preview a network before it is used in a simulation. It creates a 3D environment out of a given network description of nodes, links, and environments. You can view this network from any distance and from any angle in a perspective view or a parallel view.
Several things can be seen when rendering:
  • the bounding box, containing every detail of the network,
  • the axes giving you a way to orient yourself in the 3D world,
  • an adjustable grid for referencing to distances
  • and various levels of details including identifiers, curved links, ...
Viewing a network.

Mitrasim 2000 Server

The most important component in the Mitrasim 2000 package is Mitrasim. It acts as a TCP/IP server for clients (like Remote Control and Visualizer) and contains the simulator that is used for performing experiments. Normally, you'll use a dedicated computer in a TCP/IP network that runs the server Mitrasim. Other computers in the TCP/IP network can then establish connections with this server so the computational load (of simulating and graphically rendering) is distributed across several computers. It is even possible to have one server and many Visualizer clients so the simulation proces can be seen from different viewpoints.
Mitrasim 2000 is started and ready for action.

Remote Control

Since Mitrasim itself is a server without an explicit user interface, a method has been devised for controlling its behaviour. To this end, Remote Control was written. It's a small piece of software that allows you to establish a connection with a Mitrasim server, upload scenarios to it and start or stop the built-in simulator.
Remote Control started.

Visualiser

Visualizer is a program which allows you to view the proces of simulating traffic. To this end, it allows you to establish a connection with a Mitrasim server and let's you specify a view specification after which it renders 3D-animated frames.

Furthermore, it is also possible to log all the data measured by the loopdetectors in the road network, so you can post-process it at a later time using a statistical program.
Viewing traffic operations from above (parallel projection).
Viewing traffic operations from an arbitrary angle (parallel projection).
Showing more detail for all the vehicles (parallel projection).
Viewing every vehicle's most important parameters (parallel projection).


Master's Thesis and Java Source Code Jump to top of page

You can download my Master's thesis and the presentation slides (all in Dutch):

  • Master's thesis (PDF, 1.35 MiB)
  • Presentation slides (PDF, 90 KiB)

Mitrasim 2000 was developed for the Java Virtual Machine and should therefore (theoretically) run on any architecture supporting the Java VM bytecodes. The sourcecode currently consists of 25504 lines of code, accounting for 889 KB (last update: 29/06/2000).

  • The source tree (ZIP, 236 KiB)
  • The compiled tree (class files) (ZIP, 341 KiB)
  • Two road layouts and demonstration scenarios (ZIP, 32 KiB)

For demonstration purposes, I have also made a tailored version of Mitrasim 2000, where the TCP/IP connection is always automatically made on the local machine (and in which the background is changed from black to green, for more visual appeal):

  • Demonstration version (ZIP, 1.48 MiB)

Quickstart Jump to top of page

How to run the software ?

Mitrasim 2000 consists of six different programs. Each one of them has a specific task to perform, please read on to gain further insight. When running a Java program you should always follow the same routine (the notes below are mainly aimed at Windows users who installed the software in the D:\Mitrasim2000 directory, whereas I assume that Linux users more or less implicitly know how to do this...):

  • open a command-line interface by executing C:\WINDOWS\COMMAND.COM,
  • change to the directory where the software resides by typing the following command at the prompt: CD D:\Mitrasim2000,
  • from here on, select a program to execute by reading the next bit of text.

Normally, you will have to execute three programs: these are the server Mitrasim and the clients Remote Control and Visualizer. So, open three command-line interfaces (as described above) and change to the D:\Mitrasim2000 directory. Then execute the following commands (each command in its own command-line interface window):

  • java Mitrasim
  • java RemoteControl
  • java Visualizer

The next sequence of events should fire you up:

  • in Remote Control, click on "Connect to server", then click "Ok". When the connection is made, a dialog box will appear, click "Ok". Next, click on "Upload scenario to server" and in the next dialog box, double-click on the filename "scenario.data". To better visualise the simulator's actions, click on "Set cycle-hold-time", type the value "250", press the ENTER key and click "Ok".
  • in Visualizer, click on "Connect to server", followed by clicking "Ok". Next, click on "Set frame-delay", fill in the value "0", press the ENTER key and click "Ok". Then, click on "Set view-specification" and select a specification in the list at the top of the dialog box. All the other values should now automatically be filled in, so you can click "Ok".
  • go to the Remote Control and click on "Start/continue simulator". Then switch to the Visualizer and observe...

Progress Table Jump to top of page

Note that all events are inverse chronologically sorted.

  • June 2001
    • Met with Bart De Moor in Leuven and discussed my future at the KUL after graduating.
  • May 2001
    • Went to TNO (in Delft, the Netherlands) and had an exchange of ideas.
  • March 2001
    • Met with Data4s, a spin-off in Leuven which specialises in data storage and data accessing using various statistical, database-oriented and artificial-intelligence approaches.
  • February 2001
    • Met with the Department of Civil Engineering (Arenberg-campus Heverlee, Leuven) at the traffic centre in Wilrijk (Antwerpen).
  • December 2000
    • Received a Christmas/New Year greeting card from the Department of Civil Engineering (Arenberg-campus Heverlee, Leuven). I was pleasantly surprised !
  • October 2000
    • Received an invitation from the Department of Civil Engineering (Arenberg-campus Heverlee, Leuven).
    • Took up the invitation and met with Ben Immers, Jim Stada, Griet De Ceuster, and Steven Logghe: we exchanged some ideas regarding traffic simulations and explained our research to one another.
  • September 2000
    • Wrote a report of my thesis defence.
  • June 2000
    • Thrown a final glance at the thesis-document, it is now bound together.
    • Distributed the thesis document to all the people who helped me, I owe them.
    • Send invitations for my thesis presentation to various related and/or interested people.
    • Updated the website which looked a bit abandoned.
    • Learned to work with the seminar document style of LaTeX in order to create slides.
    • Fixed a small bug in the Visualizer's 3D rendering routine (the vehicles Z coordinate wasn't being interpolated on a link's segments, but now it is).
    • Learned to work with the Java 3D API which might be integrated in the Visualizer component of Mitrasim 2000 for more realistic rendered images (with lights, shading, and texture-mapping).
    • Prepared the final thesis presentation.
    • Dropped the usage of the Java 3D API; it couldn't be done within time.
    • Embellished the Visualizer with vehicles' brakelights and blinkers, roads coloured according to average speeds and densities and included vehicle-tracking capability.
    • Held a preliminary thesis defence.
    • Held the thesis defence.
  • May 2000
    • Visited the "Ministerie van de Vlaamse Gemeenschap" and had some exchange of ideas, as well as access to their measuring equipment.
    • Tom Van Woensel (UFSIA) agreed to be part of the thesis committee.
    • Contacted dr. Qi Yang at Caliper and Tomer Toledo at MIT to request some advice dealing with road curvature, driver's aggressiveness, ...
    • Performed vehicle counts by using the installation of the traffic police.
    • Completed construction of the simulator.
    • Completed implementation of the road network to be studied (by using the network modeller and a personal survey of the road layout, lane-change permissions, speed limits, fleet mix, ...).
    • Ran several experiments with the simulator and finished the LaTeX document.
    • Removed numerous nasty bugs due to sloppy thinking (and much to cutting and pasting) from the simulator; it now works exquisitely well.
  • April 2000
    • Received vehicle-counts from the "Ministerie van de Vlaamse Gemeenschap".
    • Celebrated my birthday (11/04/1976).
    • Wrote the third part (dealing with human factors) of the thesis document.
    • Created the first part of the network (Schelde).
    • Installed a new computer (Intel P3 667 MHz) which allows me to speed up my work.
    • Fixed a bug in the network-save routine in the network modeller.
    • Received an invitation from the "Ministerie van de Vlaamse Gemeenschap".
    • Wrote the routine for topologically sorting the network.
    • Constructed the Visualizer.
    • Upgraded my network at home from coax to UTP-5 (it now consists of an AMD K6 233 MHz, an Intel P-III 667 MHz and last (and probably also least) an Intel 80486 DX 40 MHz): this is real computer power !
  • March 2000
    • Created the document's table of contents.
    • Modified the network modeller to allow editing of lane-change permissions.
    • Wrote the document's introduction and the first two parts (dealing with traffic stream characteristics and traffic stream models).
    • Successfully contacted the traffic police to gain access to vehicle counts.
    • Requested a model master's thesis from the university's secretary.
    • Met Tom Van Woensel (PhD student at UFSIA) who constructed TRAQ and nTRAQ which are simulators based on G/G/1 queueing theory.
  • February 2000
    • Talked with my promotor about the operation we are about to undertake.
    • Finished the network modeller.
    • Started modelling the road network using my new network modeller.
    • Learned to use LaTeX for typing the thesis document.
    • Created my first document dealing with all the mathematics so far used in the thesis.
    • Started designing the client/server simulator tool.
    • Read an article about "model-view-controllers".
    • Demonstrated the use of the network viewer, network modeller, and client/server simulator.
    • Modified the website of Mitrasim 2000.
  • January 2000
    • Exams (with excellent performance !).
    • Worked on the network modeller.
    • Visited my promotor who is now a member of the university's personnel.
  • December 1999
    • Designing the road network proved to be difficult, so I started thinking about a network modeller.
    • Fundamentally altered the underlying network structure: instead of interpolating parabolas I started using interpolating Catmull-Rom splines. Every link in the network now is categorised according to its type.
    • Started designing the network modeller.
    • Created a large, detailed map of the road network by using Microsoft's Terraserver's satellite pictures.
    • Upgraded the network viewer to cope with the splines.
    • Devised a solution for the particularly nasty integral that computes the arc length of a link (i.e., the spline it is represented by).
    • Studied for exams.
  • November 1999
    • Studied "Traffic Flow Theory: A State-of-the-Art Report" by the Transportation Research Board - TRB (project funded by the Federal Highway Administration - FHWA).
    • Read "Traffic Perfomance Models I: Fundamentals of Microscopic and Macroscopic Traffic Flow Theory and Performance Models" by Haris N. Koutsopoulos (Volpe National Transportation Systems Center).
    • Read "Traffic Perfomance Models II: Examples of Simulation Models: DynaMIT Supply Simulator and MITSIM" by Haris N. Koutsopoulos (Volpe National Transportation Systems Center).
    • Added a small didactic example from "Noorderlicht: De automobilist als deeltje" (Tuesday 09/11/1999, NED3).
    • Developed the 3D-rendering engine.
    • Completed the stand-alone network viewer.
    • Documented the network viewer.
    • Fixed a bug in the calculation of the straight-line distance of a link.
    • Fixed a bug in the network viewer's routine for rendering curved links.
    • Started designing the road network around the Kennedy tunnel.
  • October 1999
    • Read "Paramics: A System Overview" by Quadstone Limited.
    • Read "Paramics: Moving Vehicles on the Connection Machine" by Gordon Cameron (Edinburgh Parallel Computing Center - EPCC).
    • Read "Paramics-MP: Design Description" by G. Duncan (EPCC).
    • Read "Paramics-MP: Final Report" by G. Duncan (EPCC).
    • Received course notes from MIT's summer school dealing with traffic-simulation.
    • Created website.
    • Changed the name from Mitrasim v2 to Mitrasim 2000.
    • Designed a network viewer with 3D-viewing capabilities in mind.
    • Defined the method for representing curved links (using a parabola that interpolates three predefined points).
    • Solved a particularly nasty integral handling the arc length of a link.
  • September 1999
    • Exams (hmmm).
    • Designed a general network structure for the traffic simulator.
    • Started creating the base classes dealing with the network's structure.
    • Designed the multi-lingual interface.
    • Designed the parsing of the network's definitionfile.
    • Read "A Simulation Laboratory for Evaluation of Dynamic Traffic Management Systems" by Qi Yang (PhD in Transportion at the MIT).
  • August 1999
    • Contacted new promotor (Serge Demeyer).
    • Written the thesis outline and planned a time table.
    • Contacted Haris E. Koutsopoulos (Volpe Center, Cambridge) and requested course notes from MIT's summer school dealing with traffic-simulation.
    • Read "Modeling Driver's Acceleration and Lane Changing Behavior" by Kazi Iftekhar Ahmed (PhD in Science in Transportation Systems and Decision Sciences at the MIT).
    • Studied for exams.
  • July 1999
    • Found a thesis subject worthy of my attention.
    • Contacted previous promotor (Jan Paredaens).

A Written Report about My Thesis Defence Jump to top of page

On Thursday, June 29, 2000, at 10h00, doomsday had arrived: it was the day of my thesis defence...

For me, the day started very early since I had to dismantle my computer at home and transport it to the university where I'd set up the whole thing for the demonstration. I took a final glance at my slides and the accompanying notes, drank some water and waited until my audience had arrived. The people in this audience were Krista Boon, Rudi Decubber, Gunther Stuer, Franky Backeljauw, Jo Maerivoet, Helga Boon, Davy De Bock, Lieve De Cleen and the thesis-related people Serge Demeyer, Tom Van Woensel, Stijn Dekeyser and Benny Vanhoudt.

After a short welcome word, the attraction began. I spoke uninterrupted for about 20 minutes, after which I gave a demonstration for about 10 minutes, during which I showed most of the options my software supported.

From then on, doom was at hand. Whereas other people's thesis defences are short (say 25 minutes or at most half an hour), my defence lasted for 1 hour and 15 minutes ! The people in the jury were very hard on me and generally gave me a bad time. They started asking questions each in turn. My promotor, Serge Demeyer, actually didn't say a thing, only in the end (see later).

The first person to ask something was Stijn Dekeyser: he asked a bit about the software-side of the project, why I made certain choices, etc. He also asked me if it would make a difference if the on-ramp at the Kennedy tunnel (direction of Antwerp) was placed right instead of left. I responded I didn't know exactly because it was a hypothesis I didn't test, but I also stated it could be tested very quickly by changing one parameter in the simulation (namely the placement of the onramp).

The second person to ask me questions was Benny Vanhoudt. It is my impression that this didn't exactly go the way it should. Benny was generally not interested in my work and just sat there because he had to. He asked very little questions, one was even like: "On page xxx, you use the factor 4, why ?". This question had to do with the topic Benny was involved in, namely queueing theory. I stated that I retrieved the formulas from scientifically-approved-and-accepted literature, but they all said that it is not because something is written down somewhere, you should use it in your own work. I objected that the formulas were published in scientific magazines (they were even constructed by a member of the jury !), but they didn't listen to me. At some moments, Benny was even very annoying by ignoring me when I directly anwsered his questions. This is *not* something you do at such a moment !

But worse was to come...

The last person to ask me questions, was Tom Van Woensel, a macroscopic traffic researcher at the UFSIA. He went on and on and on and on ... (you'll get the picture). He asked me very detailed questions (which I rather enjoyed because most of them I could really answer) and complained about some of my conclusions. One thing I'll remember him saying, is that he didn't approve of me plotting some discrete data and then fitting a nice polynomial through it. He asked if I statistically verified those result (to which I replied yes, because I really did) and warned me that one may never assume such underlying relationships, even if we are dealing with empirical evidence.

And so the jury went on, tried to trick me in every corner.

After a while, the conclusion of the jury became clear to me: they found my computer model too inept, and therefore nearly all my conclusions were found invalid. I objected heavily because I could only speak about the conclusions my computer model gave me, and that all these conclusions MUST be considered in view of this model. If the conclusions don't fit reality, that's too bad, but the main thing is that they are correct in terms of the computer model.

Finally, Serge Demeyer ended my defence by stating that I would find the model to be inadequate, after which I couldn't say very much because I was (1) exhausted, (2) tired of constantly having to fight every accusation thrown at me, and (3) there was no more point in speaking, the jury had already made up her mind.

An hour later I visited my promotor to ask my score, which he gave me after which we talked for about one hour and a half about the jury's grade. I didn't approve of my score at all, and I still don't. I think I was judged by incorrect means: a thesis does not need to provide the community with new scientific insights, it serves only to proof that a student can work individually and is able to process great amounts of literature and craftmanship. To the jury however, this was not enough, they demanded more (which they legally aren't allowed to, according to the laws at the university).

I still think they didn't account for my nine months labour (programming, constructing the correct mathematical model), the intense work (driving/reconnaisance the Antwerp Ring, effecting days of experiments, ...). They only saw the last month of my work and considering the final score I find it hardly worth the effort spent on my thesis !

Furthermore, I am but a student working alone and they can't expect me to accomplish the same work as a team of several people dedicated to their jobs... Compare it to the creation of Paramics, a well-known microscopic traffic simulator, which took 20 people around 5 years. That's a 100 person-years compared to the one of me: I think I did a rather good job.

At the beginning of my thesis, I stated that I wanted to obtain a high score. When they gave me my final grade, it was much lower than expected. My promotor stated that in order to obtain a 16 or a 17, one has to contribute to the scientific community. To obtain a 18 or a 19, one has to create a thesis document that can be officially published... The 15 I was given, stems from the fact that I completed the work, all on my own without semantic help from my promotor !

Conclusion: my promotor did an excellent job at guiding me but my thesis committee was inadequate at rating me (some people think they know everything related to traffic).

Update: at the University of Leuven (KUL) people noticed my thesis and saw the potential I have in me, something my thesis comittee totally failed to do... As a direct result, I went on to pursue an academic career at the KUL, where I did research on the modelling, simulation, and control of traffic flows; this led me to obtain my PhD degree.