source: proiecte/ptvs/docs/Readme.txt @ 31

Last change on this file since 31 was 31, checked in by (none), 14 years ago
File size: 7.7 KB
Line 
1Setting the environment
2=======================
3
4To build and run the application you will need at least JDK 1.5 and apache ant.
5
6The simulator GUI makes use of the OpenGl library
7
8Windows installation instructions:
9
10Copy "jogl.dll" and "jogl_cg.dll" into the "\bin" directory for the Java SDK
11or JRE installed on your machine (i.e. C:\[jre_location]\bin\jogl.dll).
12
13Copy "jogl.jar" into the "\lib\ext" directory for the Java SDK or JRE installed
14on your machine (i.e. C:\[jre_location]\lib\ext\jogl.jar
15
16
17Configuring the simulator
18=========================
19
20After you launch the simulator (see below), you will see 4 lists.
21
22The TIGER files are "rt1" and "rt2" files. The first list only shows the "rt1" files, which should be
23placed under the "maps/rt" directory. From the RT files, we build, as you know, a "Map" object, which
24we then serialize in a ".map" file. Map files are kept under the "maps/map" directory. We chose
25to keep them in a binary, serialized form, in order to avoid computing them every time. The ".map" files
26can be seen in the second list. In order to recompute a map from the "rt" files, you can use the
27"Create compiled map" button, which will take the selected "rt1" file and its coresponding "rt2" file,
28compute the map, and save
29it in the "maps/map" directory. During the map computation phase, the program will look for an
30".rtx.txt" file under the "maps/rt" directory, with the same name as the ".rt1" file. This ".rtx.txt" file
31contains some additional information about the map, like number of lanes for some roads, or "one-way"
32information about some roads. The format of the ".rtx.txt" file is text, and, in order to use it,
33road id's must be known (id's as they result from the constructed map, not as they are given in the TIGER files).
34There is no way of knowing these
35id's before you actually construct the map. Anyway, if there is no ".rtx.txt" file, there is no problem,
36no extra information will be added. The number of lanes will be set randomly. Also randomly (but with some
37rules in mind), traffic control systems will be set (priority/yield signs, traffic lights)
38
39Having the maps, the next part is to configure traffic scenarios. In order to do this, there are
40".smf" files, which contain basic, empty scenarios for a given map. They just specify entry points, exit points and
41routes between the entries and the exits of a map.
42A full scenario will also add customized flows of vehicles between the entries and the exits, and using
43the routes specified in the ".smf" empty scenario.
44
45The empty scenarios are constructed by using the ".map" objects, and information in the route files,
46found under "/maps/routefiles". These specify, in a text format, entries, exits and routes. The road
47id's and point id's which must be used in the route files are again those which result from the compiled map.
48In order to create the empty scenarios, use the "Create empty scenarios" button.
49
50In order to create full scenarios (that is, to add flows of vehicles to the empty scenarios), use the
51"Scenario designer". This one will take an empty scenario as an input and let you configure the flows
52of vehicles through a GUI. The result will be a full scenario (".fsc"). These ones can be seen in
53the last list of the "MapLoader" GUI. In order to actually simulate a full scenario, use the
54"Simulate scenario" button. Furthermore, the flows specified in a full scenario can be configured to
55vary during the simulation. This can be done through the "variations" files, under "maps/variations".
56
57By the way, all these text files we have used (rtx, route files, variations) obey the same basic rules:
58white spaces and letters are ignored, the only information which will be parsed are the numbers. The
59letters are only used as "comments".
60
61When a simulation is started, you will be able to configure several parameters, through a GUI. Among these,
62there are 3 radio buttons specifying how vehicles should choose their routes. Routes can be predefined (as
63they result from the scenario designer), or they can alter dynamically, as vehicles constantly try to find
64the best route to their destination (This was Raluca's graduation project, you can find more details in
65her graduation thesis).
66
67For the injection of queries, we have not developped a GUI. Currently, the only supported query is the
68one asking for vehicles' speeds. In order to inject such a query on a node, you can use the
69vitp.predefinedqueries.PredefinedQueries class, which has a static member called "queries". In this
70collection queries can be placed, along with the time moment when they must be injected, and with the
71node on which they must be injected. This node can either be specified by its id (use the QueryById
72class), or by its location (use the QueryByLocation class).
73
74Quick launch:
75============
76
77        - ant in the base directory
78
79        - select a scenario (4th list) and click Simulate Scenario
80                        - Apaca.fsc or Ciurel.fsc - isolated intersections that show how adaptive traffic lights work
81                        - also see Turnpike and Manhattan scenarios
82
83        - configure the simulation parameters (or leave them as default)
84
85                        - you can test either with fixed or adaptive traffic lights (especially on the first two scenarios)
86                        - For the moment leave routing type as default (as we had some problems integrating Raluca's dynamic
87                        routing) but we will fix that in a few days
88                        - dissemination model:
89                                        - Neighbor Discovery - cars send only local info
90                                        - Complete Forwarding - cars forward as many cars as they can for the current road
91                                        - Probabilistic Forwarding (DEFAULT) - optimization of the previous with only a few cars
92                                                                                        that send the full database and the others either send
93                                                                                        local info or don't send anything if they are stopped 
94                                        (details in my (Victor) thesis)
95
96       
97
98
99During the simulation:
100======================
101
102        - Control the simulation with Run (starts the simulation), Pause, Step (second by second)
103
104        - On the panel on right it is displayed:
105                        - simulation time
106                        - real time of simulation
107                        - number of events (Send, Receive, GPS, Cleanup)
108                        - number of cars on the map
109
110        - On the bottom-right side of the screen:
111                        - Control delay (delay caused by traffic lights)
112                        - fuel consumed and gas emissions
113
114        - To Select a car - click it until you see it changing its color to light blue (challenging because of problems of transforming
115                        3D coordinates, so be perseverent - try when the simulation is paused)
116
117                - its neighbors received through TrafficView are marked on the map with a pink circle
118
119                - you can switch to DRIVER MODE (button) or "near view" for the selected car, just like in TrafficView
120
121                - on the panel on right are displayed:
122                                - current speed
123                                - Current phase and phase time remaining for the next traffic light as it is published by
124                                the traffic light
125                                - Speed recommendation for optimum delay and fuel consumed (with problems, working on it)
126
127        - To select a traffic light click in the middle of the intersection untill it is displayed on the panel
128        "Selection: Traffic Light"
129               
130                - The approaching cars received through TrafficView either from cars or other taffic lights are displayed
131                with pink circles
132
133                - on the panel on right:
134                                - current signal plan
135                                - demands and volumes computed for all approaches
136
137        - GUI OFF and COM OFF disable the GUI updates (of vehicles) and communication betwwen nodes
138
139        - Trace Car button - colors the selected car differently from the other even after another car is selected
140
141        - Show Route - marks the route of the selected car with a red line
142
143        - Switch view buton
144                - Acceleration view - colors the cars depending on their acceleration (green, yellow, red)
145                - "Dissemination Model" View - colors differently the cars that send only local info (white),
146                                                full cars database (blue) or do not send anything (light blue)
147                                                (see the Probabilistic Forwarding Model in my thesis (Victor) )
148
149
150
151
152
153
Note: See TracBrowser for help on using the repository browser.