Skip to content

Commit 1a9e07e

Browse files
committed
rename micro file
1 parent 55f2274 commit 1a9e07e

File tree

4 files changed

+124
-130
lines changed

4 files changed

+124
-130
lines changed

images/clipboard-2591903933.png

107 KB
Loading

images/clipboard-2674834530.png

117 KB
Loading

macro.qmd

-127
This file was deleted.

micro.qmd

+124-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,127 @@
11
---
2-
title: "Case Study Micro"
3-
author: "Mauricio Orozco"
2+
title: "Case Study for Micro Simulation"
3+
author: "R Félix"
44
---
55

6-
# Case Study
6+
You may use an intersection file already prepared to be used with VISSIM, like this one:
7+
8+
![](images/clipboard-2674834530.png)
9+
10+
This file is available at [Fenix](https://fenix.tecnico.ulisboa.pt/downloadFile/845043405615934/GagoCoutinho_moved.zip), for registered students.
11+
12+
::: {.callout-important appearance="simple"}
13+
Watch out that the CRS of this file may not be adjusted to the basemap!
14+
15+
Also, some adjustments to the network (such as the **connectors**) may be needed.
16+
:::
17+
18+
How did this file was converted from OpenStreetMap?
19+
🧐
20+
21+
## From OpenStreetMap to VISSIM
22+
23+
### Requirements
24+
25+
This will require:
26+
27+
- VISSIM [installed](vissim.qmd#vissim-install) with an active license
28+
- [Python](https://www.python.org/downloads/) 3.x, and the following packages
29+
- [win32com](https://pypi.org/project/pywin32/)
30+
- [gdal](https://gdal.org/en/latest/api/python_bindings.html)
31+
- [Microsoft Visual C++ build tools](https://stackoverflow.com/a/54136652)
32+
- Optional: [OSGeo4W](https://trac.osgeo.org/osgeo4w/)[^1]
33+
34+
[^1]: This installation already comes with all the required packages.
35+
36+
### OpenStreetMap
37+
38+
Go to OpenStreetMap and zoom into your area.\
39+
Select Export and save the `map.osm` file.
40+
41+
![](images/clipboard-560841291.png)
42+
43+
You don't need to open that file now.
44+
45+
### OSM2VISSIM tool
46+
47+
1. Go to the [OSM2VISSIM tool](https://github.com/bmetrafficlab/OSM2VISSIM/) Github page, and download this `OSM2VISSIM_v0.1.py` [file](https://github.com/bmetrafficlab/OSM2VISSIM/blob/main/OSM2VISSIM%20tool/OSM2VISSIM_v0.1.py).
48+
49+
![](images/clipboard-3354929018.png){width="193"}
50+
51+
2. Create a folder (wherever you want) and put there this `.py` file and the `.osm` file exported before. Now **copy your folder path**!
52+
53+
![](images/clipboard-789558749.png)
54+
55+
3. If you have OSGeo4W installed[^2], open the shell. It will look like this:
56+
57+
[^2]: You may do everything on the cmd (command line prompt terminal), but some errors may be output.
58+
59+
![](images/clipboard-1368820168.png)
60+
61+
4. Navigate to your created folder, using `cd yourfolderpath`
62+
5. Now, run `python OSM2VISSIM_v0.1.py`
63+
64+
![](images/clipboard-1335430846.png)
65+
66+
6. This will open a dialogue window where you are supposed to type your `.osm` file name.\
67+
Mine is `gago`
68+
69+
![](images/clipboard-1386225607.png)
70+
71+
7. Press Set.
72+
73+
::: {.callout-note appearance="simple"}
74+
Don't worry!
75+
Things are happening even if you don't notice.
76+
Just be patient and wait.
77+
:::
78+
79+
This will create a new file, and open VISSIM automatically.
80+
81+
Note: If you go to the Network tab and don't see anything, even after clicking on zoom to network button, close VISSIM, and close the Shell.
82+
This happened to me every first time.
83+
84+
8. Repeat again the steps from 1 to 7.
85+
86+
This will open VISSIM automatically and now the shell will show things happening:
87+
88+
![](images/clipboard-2046495721.png)\
89+
Wait until VISSIM it closes automatically - don't click anything.
90+
91+
9. You may now close the OSGeo4W shell.
92+
93+
A few more files were created now:
94+
95+
![](images/clipboard-638341654.png)
96+
97+
### At VISSIM
98+
99+
Open the file `name.inpx` and close the Start Page.
100+
101+
At Network Editor panel, click Show entire network:
102+
103+
![](images/clipboard-3426944487.png)
104+
105+
As you may note, your network is not exactly in place, when comparing to a basemap.
106+
🥴
107+
108+
![](images/clipboard-3625359455.png)
109+
110+
To adjust this, you may either move the basemap or the network.
111+
112+
First, with the distance tool, measure the distance of one reference point of the network to where it should be placed, in both X and Y directions.
113+
114+
![](images/clipboard-1628707682.png)
115+
116+
Then Edit ⟶ Move Network
117+
118+
![](images/clipboard-1913791636.png)
119+
120+
Repeat the process until the network intersection is centred with the intersection in the basemap.
121+
122+
Save your network file!
123+
🎉
124+
125+
This process resulted in the abovementioned file.
126+
127+
No go on and **adjust** the details that require some attention.

0 commit comments

Comments
 (0)