Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Traffic Simulation DSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
URBANITE
Open
Traffic Simulation DSS
Commits
999f3fa6
Commit
999f3fa6
authored
1 year ago
by
Smerkol, Maj
Browse files
Options
Downloads
Patches
Plain Diff
fixes for RE -1 problem, KPI and vis Bike safety
parent
bca2aec7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.env
+7
-0
7 additions, 0 deletions
.env
app/netedit/events.py
+11
-9
11 additions, 9 deletions
app/netedit/events.py
with
18 additions
and
9 deletions
.env
+
7
−
0
View file @
999f3fa6
# deployed in city
URBANITE_CITY="amsterdam"
# UI settings for default map position and zoom
CITY_COORDINATES="52.3676,4.9041" # Amsterdam
# CITY_COORDINATES="43.2630,-2.9350" # Bilbao
# CITY_COORDINATES="60.1566, 24.9118" # Helsinki
# CITY_COORDINATES="38.1937, 15.5542" # Messina
CITY_ZOOM_LEVEL="15"
# server settings
DSS_PORT=8083
FLASK_SECRET_KEY="secret"
...
...
This diff is collapsed.
Click to expand it.
app/netedit/events.py
+
11
−
9
View file @
999f3fa6
...
...
@@ -178,22 +178,24 @@ class VehicleEvents(Events):
"
capacity
"
:
capacity
,
}
ev_vehicle
=
event
[
"
vehicle
"
]
if
ev_vehicle
[
1
]
==
"
bicycle
"
:
if
"
bicycle
"
in
ev_vehicle
:
links
[
event
[
"
link
"
]][
"
bike_count
"
]
+=
1
elif
ev_vehicle
[
1
]
==
"
bus
"
:
elif
"
bus
"
in
ev_vehicle
:
links
[
event
[
"
link
"
]][
"
bus_count
"
]
+=
1
else
:
links
[
event
[
"
link
"
]][
"
car_count
"
]
+=
1
for
link_id
,
link_data
in
links
.
items
():
if
links
.
get
(
link_id
,
False
)
and
link_data
[
"
bike_count
"
]
>
0
:
links
[
link_id
][
"
bikeability_safety
"
]
=
10
*
(
1
-
(
link_data
[
"
car_count
"
]
/
link_data
[
"
capacity
"
])
)
# links[link_id].pop("bike_count", None)
# links[link_id].pop("bus_count", None)
# links[link_id].pop("car_count", None)
# links[link_id].pop("capacity", None)
b_c
=
link_data
[
"
bike_count
"
]
m_c
=
link_data
[
"
car_count
"
]
+
link_data
[
"
bus_count
"
]
suma
=
b_c
+
m_c
links
[
link_id
][
"
bikeability_safety
"
]
=
(
math
.
sin
(
b_c
/
suma
)
+
math
.
sin
(
-
(
m_c
/
suma
)))
*
5
+
5
links
[
link_id
].
pop
(
"
bike_count
"
,
None
)
links
[
link_id
].
pop
(
"
bus_count
"
,
None
)
links
[
link_id
].
pop
(
"
car_count
"
,
None
)
links
[
link_id
].
pop
(
"
capacity
"
,
None
)
return
links
# TODO fix after fixing bike_safety_index above
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment