Skip to content

Commit 55f2274

Browse files
committed
instructions from OSM to VISSIM
1 parent 9835f3e commit 55f2274

14 files changed

+141
-10
lines changed

images/clipboard-1335430846.png

10.4 KB
Loading

images/clipboard-1368820168.png

9.08 KB
Loading

images/clipboard-1386225607.png

6.11 KB
Loading

images/clipboard-1628707682.png

665 KB
Loading

images/clipboard-1913791636.png

36.3 KB
Loading

images/clipboard-2046495721.png

29.9 KB
Loading

images/clipboard-3354929018.png

10.1 KB
Loading

images/clipboard-3426944487.png

11.5 KB
Loading

images/clipboard-3625359455.png

422 KB
Loading

images/clipboard-560841291.png

329 KB
Loading

images/clipboard-638341654.png

7.36 KB
Loading

images/clipboard-789558749.png

15.5 KB
Loading

macro.qmd

+125-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,127 @@
11
---
2-
title: "Macro Simulation"
3-
author: "M"
2+
title: "Case Study for Macro Simulation"
3+
author: "R Félix"
44
---
5+
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.

vissim.qmd

+16-8
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,38 @@ author: "Mauricio Orozco"
66
::: callout-important
77
## This tutorial is only for Windows
88

9-
If you do not use Windows, you need to have a [Virtual Machine](software.qmd#operating-system). If you have an Arm processor this [won't work](https://us-resources.ptvgroup.com/en-us/ptv-support/system-requirements), even with a VM.
9+
If you do not use Windows, you need to have a [Virtual Machine](software.qmd#operating-system).
10+
If you have an Arm processor this [won't work](https://us-resources.ptvgroup.com/en-us/ptv-support/system-requirements), even with a VM.
1011
:::
1112

1213
In this tutorial we will guide you to install and start using Vissim.
1314

1415
[PTV Vissim](https://www.ptvgroup.com/en/products/ptv-vissim) is a micro simulation software, non-free, available only for Windows OS.
1516

16-
## Installation
17+
## Installation {#vissim-install}
1718

1819
PTV Vissim is available to download at: <https://cgi.ptvgroup.com/visionSetups/en/filter;product=PTV%20Vissim>
1920

2021
![](images/clipboard-1433786646.png)
2122

22-
Choose the most recent version (recommended). The file may be more than 1.3 GB.
23+
Choose the most recent version (recommended).
24+
The file may be more than 1.3 GB.
2325

2426
If you don't have Python installed already in your PC, don't worry, you can opt to install it along the Vissim setup.
2527

2628
The [available instructions](https://us-resources.ptvgroup.com/en-us/ptv-support/ptv-vissim-installation-instruction) are very straight forward.
2729

2830
### Licence activation
2931

30-
> You should have received a server address of where the CERIS licence lives. If not, contact the course teacher.
32+
> You should have received a server address of where the CERIS licence lives.
33+
> If not, contact the course teacher.
3134
3235
To use Vissim with the CERIS licence, you need to download [PTV Licence Manager (Standard)](https://cgi.ptvgroup.com/visionSetups/Setups/LICENSEMANAGER/LicenseManager.exe).
3336

3437
![](images/clipboard-2536119485.png){width="610"}
3538

36-
It will ask you to download also another tiny software [CodeMeter Runtime](https://us-resources.ptvgroup.com/en-us/ptv-support/ptv-visum-installation). Say yes!
39+
It will ask you to download also another tiny software [CodeMeter Runtime](https://us-resources.ptvgroup.com/en-us/ptv-support/ptv-visum-installation).
40+
Say yes!
3741

3842
After install it, open PTV Licence Manager, and click on ⚙️ Edit CodeMeter settings:
3943

@@ -47,15 +51,19 @@ Press close (go back) and now 🔍 **Find Licences**.
4751

4852
![](images/clipboard-1159052615.png){width="376"}
4953

50-
An available licence row should now appear on the list 🎉. Close it.
54+
An available licence row should now appear on the list 🎉.
55+
Close it.
5156

5257
## Getting started
5358

54-
When launching Vissim for the first time, you should have something like this. This is a good signal, it means that the connection to the licence server is running smoothly and that you are ready to start working on your projects! 🚀
59+
When launching Vissim for the first time, you should have something like this.
60+
This is a good signal, it means that the connection to the licence server is running smoothly and that you are ready to start working on your projects!
61+
🚀
5562

5663
![](images/clipboard-3046978452.png)
5764

58-
The "Tutorial First Steps" may be wise to follow if you are not familiar with the software. It covers the following topics:
65+
The "Tutorial First Steps" may be wise to follow if you are not familiar with the software.
66+
It covers the following topics:
5967

6068
- Developing the network
6169
- Run Simulation

0 commit comments

Comments
 (0)