- Installation Instructions
- Terminology Overview
- User Interface
- How to ... ?
See the README.unix.txt file that is included in the .tar.gz archive. Please also take a look on the note about command line options for auto saving further down. It has Windows examples, but the core part about the command line arguments for auto saving in Junctioneer is still the same.
- Make sure you can run win32 binaries. 64-bit systems without a 32-bit compatibility layer are not supported.
- Download the zip-file
- Extract the contents to <some directory>. Your regular windows user needs to have write access to this directory.
- Create a shortcut on the start menu/desktop to <install dir>\Junctioneer.exe
- Use the shortcut to run the program
Please, continue and read the next section about auto saving options which is important if you experience crashes or similar problems that you want to report.
Auto save command line options
There are a few command line arguments which can be used to fine-tune how often the program should make auto saves. The auto save function do not save to the regular save file, instead it creates numbered files in the <install dir>\maps\autosave directory. The files are quite small, but if you want, you can erase the contents of the autosave directory from time to time. The auto saves are meant to be used as backup and for reproducing crashes if/when they occur. To show the available arguments run Junctioneer.exe --help from the terminal (in the <install dir>).
An example output is show below for version 0.1.4.5 of Junctioneer. Please check with your version if new commands have been added, or if old commands have been removed/renamed.
If you need help on how to add command line arguments to a shortcut in windows, please refer to the windows shortcut CLI arguments howto.
Since 0.3.0 beta 1, you can also edit options.xml in %AppData%\Junctioneer (windows) or ~/.junctioneer (linux) to set the auto save options.
- Networks in Junctioneer are built up by nodes and links
- Networks are stored in maps. (xml map-files)
- There are three types of nodes
- junction node
- source node
- sink node
- Several links can be connected using a junction node
- Vehicles are created at source nodes
- Vehicles are destroyed when they reach a sink node
- Links that are connected with a node become yellow at the connected end
- A junctionn node can be uncontrolled, use traffic lights or stop/yield control
- The shape of a link is defined by its path
- The links are directional and usually goes from one node to another node
- Vehicles tries to reach their destination
- One or several sink nodes can make up a destination
- Each source node has individual arrival intensities for each destination
- Traffic lights can be selected as a junction control type for junction nodes
- Inputs and outputs of a junction node can be assigned a tag (a text string)
- A schedule controls which inputs and outputs of traffic lights that should be enabled a given time by listing the tags that should be enabled. All other tags will be disabled
- In a schedule, the time is divided into non-overlapping periods. The length of each period can be constant or expressed using an Expression.
- Inputs and outputs that do not have a tag will always be enabled
The user interface consists of three main features:
- two main modes: build mode and simulation mode
- in build mode, interaction with the network is done by selecting a tool corresponding to the type of object you want to edit (link tool and node tool)
- each tool have a set of actions that can be accessed from the toolbar or right clicking in the main window that appear only if they can be executed (eg. delete node only appears if a node is selected
Junctioneer start in build mode, which allows network construction as well as saving and loading of maps. When you run a simulation, the program enters simulation mode which does not permit save/load or modifying of the network. When simulation is stopped, Junctioneer goes back to build mode.
In build mode there are three main ways of construction:
- Use the Node Tool to create/modify/delete nodes
- Use the Link Tool to create/modify/delete links
- Use the Schedule Editor to create/modify/delete schedule periods
- Define vehicle types in the Vehicle type list window
If one of the two tools is used, then tool specific actions will appear to the right of the toolbar as well as in the right click menu. A few actions (usually experimental) do not have a icon yet and do only appear in the right click menu. Depending on the current selection different options are available. To not give too many options, creating of new objects is for example only available when no object is selected. You can only select links with the link tool and only nodes with the node tool.
Link tool details
Link selection and modifications deserve some further explanations. For links there exist several selection levels:
- No link selected
- Link is selected, but no specific part of it
- Link is in edit mode and a path point or path element is selected
To proceed from one level to the next you click on the link. To select a path point you have to click close enough on it so that it becomes blue. To move up one level the escape key can be used. You can also click some distance away from the link to deselect. Depending on what level you are at different tool actions will be present. Also note that most actions are only available at the topmost level that is possible for the action to be executed.
Node tool details
The node tool should be fairly straight forward to use. It can create/move/edit properties/delete nodes. There is a shortcut to bring up the node properties window: double click on a node to bring it up. Just keep in mind that you need to first select the node tool, since clicks on nodes will only be detected by the node tool.
From the node tool you also find an action to merge two links if they are connected to a junction node which has no other connections. A such merge will result in the node being deleted.
Newly created junction nodes will not use any control mechanism to avoid collisions. To set the control mechanism, open the node edit window and select either traffic light control or yield control. The yield control in Junctioneer is not very efficient to encourage you to use the signal control features. Also note that for yield to work, both the right of way link and yield link have to be sufficient long to allow cars to see each other. For traffic control, please see the howto on traffic lights.
If there is at least two schedule periods, the Schedule Viewer is opened automatically when simulation mode is entered. The Schedule Viewer shows a graphical timeline with all schedule periods. A vertical line shows the current time in the schedule. (new in 0.2.0)
In case you use a formula to define the length of schedule periods, that formula will only be evaluated when that period is about to be activated and during the time that the period is active.
Note: Some hotkeys cannot be used when a text edit box is selected for typing.
- Ctrl + N = New
- Ctrl + O = Open
- Ctrl + S = Save
- F1 = open about dialog
- Menu-key or Return = open action menu (same as right clicking on the background)
- Space = simulate a left click with current tool at current cursor position in the network
- Arrow keys or hjkl = move cursor (1 length unit) (2D only)
- Tab = cycle active tool
- 1, 2, 3, ... = execute action with this number when counting action toolbar buttons from the left
- Ctrl + Shift + G = Toggle snapping of mouse cursor to grid
- Ctrl + arrow keys or hjkl = move view (or drag with middle mouse button) (2D only)
- + = zoom in view
- - = zoom out view
- 0 = default zoom
- Ctrl + R = Reset view aka "I'm lost, find my model"
- Ctrl + G = Toggle visual grid
- Ctrl + Shift + G = Toggle snapping of mouse cursor to grid
- Ctrl + B = Switch between symbolic display or a more realistic display where roads have a width.
- Ctrl + 2 = Switch to 2D display
- Ctrl + 3 = Switch to 3D display (note that as of 0.3, the only way to navigate in the 3D world is to use the camera control window)
- F5 = start simulation
- F6 = stop simulation
- F9 = slow down simulation
- F10 = reset simulation speed to 1:1 real time
- F11 = speed up simulation
- Pause = toggle pause
How to ... ?
This howto has its own page: link to the Traffic Lights howto
The expression feature described here requires Junctioneer 0.2.0 or later.
In some edit boxes, expressions are allowed. Expressions can use simple math and built-in functions to calculate a resulting value. For example, the maximum speed of a vehicle type can be described using an expression. This expression is evaluated when vehicles are created, and may include (among other things) calls to the random number generator to give varying vehicle properties. Setting the maximum speed to 1.2 + IntUnif(0, 3) * 0.2 would give vehicles with 1.2, 1.4 or 1.6 as maximum speed. If IntUnif is replaced by DoubleUnif, then all values between 1.2 and 1.8 may be chosen.
Since 0.3, you can also use expressions to define the length of schedule periods to allow some dynamics in traffic control.
Expressions can contain
- +, -, * and / (Junctioneer honors the usual priority orders in math)
- Function calls to built-in functions (see complete list below)
When expressions are entered in the GUI, feedback is given on the fly if they are valid or not. This validation works by simply evaluating the expression as you type and see if any problem occurs. For deterministic expressions that do not read any simulation state information this should give a good validation. For expressions that make use of random functions and/or simulation state information, extra care has to be taken to write expressions that will always be valid. For example, make sure that your expressions never will give division by zero.
In the tooltip of fields that allow Expressions, there is usually a note on the allowed range of expression results. The allowed range will be enforced by clamping the result from expressions down to the allowed value range.
List of built-in functions
The list of built-in functions is also distributed with the binary and can be viewed offline from the help menu.
This howto assumes that you already know which argument command that you want to append to Junctioneer. In this guide the command --autosave-intervall=1 will be used. (the procedure is the same for any other program)
- Right click on your shortcut and open the properties dialog
- In the edit box for target, append your desired command at the very end. After the quote characters that surrounds the path if it contains a space.
- Click okay
My target path in the image above do not contain any spaces, but I've added the quotes there manually so that it will be easier see where they should be relative to the appended command.