Welcome to miniTraff
Version 4.5.0 is available for testing
Now with invisible map colors (no, really) and selectable
flashing yellow turn arrows!
Asymptotically approaching usability since 2003!
miniTraff simulates a user created map of streets and intersections.
Vehicles move along the streets
controlled by the signals within
the intersections.
miniTraff allows traffic engineers and students to model designs
for traffic layouts and test timing schemes (including semi-actuation
and density) for efficiency.
These programs require the Java Runtime Environment (JRE) version 1.5
(or higher). You can download the JRE free from
Sun.
You don't need the JDK (Java Development Kit) or anything else.
Importing LandXML
files will require a SAX parser. If you do not
already have a parser installed you can download one free via
www.saxproject.org.
See "LandXML Trouble-shooting" in the (im/Ex)port /panel help for all
the dirt.
I've attempted to test it as well as possible, but my test platforms
are Linux (Debian w/ a 2.6.21 kernel and Fluxbox) and Windows ME,
so other platforms may have problems. (and more testing is always
needed)
04.03.00 was the last version of miniTraff or mapTraff that could import
the "Old_miniTraff" format. I'll make it available for a while, but you
should make sure any old '*.mtf' files are exported into the current
'miniTraff' format.
miniTraff has the following features:
- Fully expandable
intersection and signal logic:
- attempts to follow
MUTCD 2003 (near as I can understand it);
- any number of
legs and phases with overlaps;
- leading phases set using Barrier, Ring and Sequence numbers;
- selectable multi-digit phase designation (i.e.
1,6,3,8,5,2,7,4,11,16,13,18, etc.);
- Phases can be 'mirrored'
(forerunner of coordination);
- adjustable green and yellow intervals by phase;
- stop or yield signs (two way, four way or more);
- adjustable 'minimum stop time' by leg (for stop or yield);
- adjustable red clearance and initial offset
(for synchronization) by intersection;
- selectable permissive left (or right for right hand
drive);
- selectable right on red (or left, ditto for rest of
this page).
- Worldly map design features:
- supports either Right or Left-hand drive;
- density and semi-actuation, with
- loops any distance from the stop bar (up to the length
of the street);
- adjustable intersection size (stop bar to center);
- selectable intersection node numbers;
- billions of streets and intersections
(if you have enough memory);
- streets of any length (up to 32,700 meters or yards)
and direction with multiple lanes;
- street lengths can be entered in yards (meters) or
seconds (seconds are used internally);
- speed limit, direction, or number of lanes can change
at any point within a street
(streets are composed of multiple street fragments);
- selectable number of right or left turn
lanes
(left + through + right <= 20 lanes total);
- multiple selectable right, left or 'U' turn destinations;
- right and left shared or exclusive turn lanes;
- multiple adjustable right and left vehicle turn percentages and
- multiple adjustable right and left exclusive turn lane lengths.
- Convenient map assembly and maintenance features:
- "Add Turns" and "Toggle Lights" for an entire
intersection automatically;
- turn percents update automatically when a street,
fragment or intersection leg is deleted;
- thru and turn phases automatically disabled when the
associated destinations are not available;
- copy fragments from one street to another;
- find unmapped streets or intersections with
the 'verify mapping' feature;
- find a specific street with a sub-string
(case dependent);
- find all intersections that use a street;
- save and restore data for multiple 'Cities';
- save and restore multiple Default value sets
(default values are flagged with a selectable
color) and
- export and import data using miniTraff (*.mtf) formats,
LandXML (*.xml) formats or
UTDF
(Version 6, *.csv) formats.
- Cunning micro-simulation features:
- 1/10th second time resolution;
- adjustable vehicle "spacing" (front bumper separation);
- adjustable vehicle length standard deviation;
- adjustable vehicle speed standard deviation;
- adjustable vehicle acceleration and deceleration;
- adjustable 'slowing point' when approaching a yellow or
red light, or a stop sign;
- adjustable traffic volume at each entry/exit point;
- save and recall multiple timing plans or traffic volumes (using
UTDF
or miniTraff import/export);
- save and recall queries
into different Cities (using miniTraff import/export);
- vehicles can enter the map at the start of any
fragment (but not within an intersection);
- vehicles can exit the map at the end of any fragment
(but not within an intersection);
- vehicles change lanes to pass slower vehicles and to
move into turning lanes;
- adjustable lane change delay (for multiple lane changes);
- vehicles wait for oncoming traffic at stop signs, right
on red and permissive lefts (conflict avoidance);
- vehicles change color when moving, stopped or running
red lights;
- vehicles display their desire to turn (R,L,S,N) and
- vehicles display 'T' when in an exclusive turn lane.
- Affective traffic control features:
- run traffic continuously (with or without the map being visible);
- freeze and restart traffic;
- "nudge" traffic forward 1/10 second;
- run traffic simulation slower or (slightly) faster and
- reset time, traffic and lights to zero.
-
Thoughtful usability features:
- help dialogs for every panel;
- help text can be searched locally or globally;
- selectable 'pop-up error message' level (guru, regular or newbe);
- a query system for creating dynamic ad hoc
queries against internal
program variables;
- reporting for
queries and selected program data;
- selectable beep when a loop is crossed, or a light
changes color;
- selectable font style and size;
- adjustable map colors (including invisible);
(New)
- adjustable informational and error message colors;
- flag
all vehicles with a specific lane
and/or turn preference and display them in a different color;
- 'recenter' the map and zoom it in or out;
- scroll the map in two speeds (it is 18.6 miles square);
- view any intersection full screen or as an
insert in any corner of the display;
- full screen signals are color labeled (RYG) for accessibility;
(New)
- signal display matches the intersection layout
on the map;
- signal heads rotate to either 'vertical' or
'relative' orientation;
- selectable "directional arrows" or "classic dots" at the
street fragment ends;
- the map displays the actual (UTM) coordinates of
the central 'yellow' circle;
- selectable flashing yellow or red permissive turn arrows;
(New)
- 'always green' signals blink (to emphasize their state);
- Regenerate (and auto-load) 'xtest.tfc' test data from File menu and
- Hot swap to mapTraff from File menu.
- Plus, it is 100% Java so it can be run on multiple OSes
(theoretically).
- Windows icon for miniTraff included (miniTraff.ico);
- Windows icon for mapTraff included (mapTraff.ico);
- Linux (X11) icon for miniTraff included (lights.xpm) and
- Linux (X11) icon for mapTraff included (mapTraff.xpm).
(you have to hook the icons up)
mapTraff has the following features:
- Create maps from
UTM (Universal Transverse Mercator) coordinates
(UTM coordinates are available on any decent GPM);
- Export and import data to a miniTraff (*.mtf) format, a
LandXML (*.xml) format or a
UTDF
(*.csf) format;
- Adjust Gridline spacing for freehand location estimation.
(New)
- Create Streets and Intersections at the mouse location;
(Almost New)
- Create, edit and delete Intersections;
- Create, edit, complement and delete Streets;
- Create, split, edit and delete street Fragments;
- Select
Intersections, Streets and Fragments with the mouse,
(street selection comprehends Right or Left-hand Drive);
- Create a Fragment at right angles to existing Fragment
(using the mouse);
- Split a Fragment where it crosses another Fragment
(using the mouse);
- Create an Intersection attached to a street Fragment
(using the mouse);
- Create a street attached to an Intersection
(using the mouse);
(Almost New)
- Attach more street Fragments to an existing Intersection
(using a dialog);
- Convert all metric units to imperial or vice versa;
- Translate, rotate, scale and join maps (AKA templates);
- Adjust map colors (including invisible) with a dialog;
(New)
- Change Default values with a dialog;
- Search help screens locally or globally and
- Hot swap to miniTraff from File menu.
I also have plans for future upgrades to miniTraff.
- Vehicle separation proportional to current speed;
- Better acceleration /
deceleration modeling;
- Variable traffic volume (increase and decrease over time);
- Coordination panel for Arterial or Network Control;
- Traffic Signal Priority and Preemption;
- Adaptive Control Strategies (ACS);
- Even more
MUTCD
(and other standard) complacency;
- Drunk drivers and road rage;
- Your pipe dream goes here.
I believe that a healthy user community can help me to
improve the existing code and plan new extensions.
miniTraff uses several advanced features in Java and
can serve as an example for others who are learning Java.
- The main() method checks for a trailing 'Carriage Return'
parameter, so that it can be called from the same script (batch file)
in both Linux and Windows systems;
- Source download includes a build.xml file so that
it can be compiled with Apache Ant;
- Source download includes JUnit test files which
are automatically run by Apache Ant;
- Reflection (dynamic method selection and execution, used heavily
by queries);
- Subclassing FilenameFilter interface to extend functionality;
- Keyboard post processing (and construction of key events);
- Use of KeyListener for keyboard control of scrolling panels;
- GridBagLayout, CardLayout and most other layouts;
- Reading and writing serialized objects (to save and restore the
traffic data);
- Reading and writing text (use of StringTokenizer and split());
- Reading 'Column Separated Values' (in an *.CSV file) where the
existence and order of columns is not guaranteed;
- Reading text files and JPEGs
(including reading text help files that are stored inside the jar file);
- Use of a SAX Parser for importing the
LandXML data;
- Use of SimpleDateFormat for custom date creation;
- Use of 'generics' for type safe collections (Vector and ArrayList);
- Use of StringBuffer and StringBuilder for String creation;
- Reasonably complete javadoc for all visible (public) objects and
methods;
- Dynamically created multiple threads (up to 13 with
queries - things
slow down a bit);
- A double buffered display
(with multiple methods updating the buffers);
- transparent (alpha = 0) map colors;
- a half transparent half opaque BufferedImage for fragment end caps;
- Dynamic (and complementary) foreground and background colors on
the UColors "OK" button;
- Playing dynamically created sounds (using PCM encoding);
- An internal method within the display that creates a Pop-up menu
with a right mouse click;
- UPrint, An overloaded display dialog which is used for error
messages, the query displays
and quick debugging.
and
- mapTraff contains a mouSelect method which can
select the points and lines
drawn on the Canvas;
- mapTraff (CHart.java) contains a keyBuddy (KeyAdapter) class which
uses reflection to simplify translation of the ENTER and ESCAPE keys
by Dialogs;
- mapTraff contains a modal dialog (CName.java, used when
complementing streets) which creates a modal help dialog (so that
the input to the help dialog is not blocked);
- mapTraff re-uses the miniTraff CardLayout() panels GXport, GValues
and GLeg, as dialogs and adds help and cancel buttons.
The naming convention for releases is as follows:
I use a six digit Version/Release/Modification number,
so ##@@%% translates into Version ## Release @@ Modification %%
- A Version change signifies either a change to the
underlying form or function of the program, or the need to get the
release numbers down to a manageable amount;
- A Release change adds new features to the product. This usually
invalidates old *.trf files (miniTraff's storage format);
- A Modification is a minor bug-fix or an aesthetic change (like
standardizing my endemic spelling).
To download the program, read the paragraph below, then go
here.
You want the 'jar' file. You probably also want the
'Maps' file, which contains exported [*.mtf and *.xml
format] example maps. They may not be the same version level, this is OK.
You don't need the Source or the Javadoc to run the
programs (and you really don't want them unless you are a programmer).
I strongly recommend reading (and downloading) the
'Notes' file that accompanies the
'jar' file (the icon looks like a tiny clipboard).
Quick start Instructions for the JAR download
- If you have created any Cities, export them to *.mtf
format files. Put these files somewhere safe. You can import these
files when you can not read *.tfc files that were created in
previous versions.
- Unzip the miniTraff##@@%%.zip file.
This will create a 'miniTraff' directory which will make cleanup
easier if you decide this was a waste of time. You can also
run miniTraff or mapTraff from a floppy disk.
- The zip file can be deleted now - optional.
- mapTraff only
- Run the 2cjrun.bat file to start mapTraff.
- Change and save the citYwide (CTRL-Y) Default Values.
- Bring up the help panel (CTRL-/) and read the "Mapping Tutorial".
- Create a map and save it.
- miniTraff only
- Run the 1jarun.bat file to start miniTraff
- Display the map and signals (CTRL-V)
- Run traffic (make the lights change and the vehicles move CTRL-R)
- Gaze in wonder for a while...
- Kill traffic (stop it from running CTRL-K) - optional
- Hide the map and signals (CTRL-H) - optional
- Quit the program entirely (CTRL-Q) - works at any time
miniTraff mouse use:
When the map display
has covered the main menu, a left click will close the display and a
right click will open a pop-up menu. CTRL-/ will bring up a panel
specific help screen for the current display.
mapTraff mouse use:
A left click may open a pop-up selection
menu (or an error
message if nothing is selected). A right click will open a pop-up
creation menu. CTRL-/ will bring up the mapTraff general help screen.
If you want more, check out the Screenshots
page.
Copyright (C) 2003-2008 by Ralph L. DeCarli. All rights reserved.
miniTraff and mapTraff are licensed under the Open Software
License version 1.1. This software is provided under this License on
an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied,
including, without limitation, the warranties of NON-INFRINGEMENT,
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.