Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the MATSim network file for Mount Alexander Shire #5

Closed
2 of 4 tasks
dhixsingh opened this issue Jan 18, 2018 · 7 comments
Closed
2 of 4 tasks

Update the MATSim network file for Mount Alexander Shire #5

dhixsingh opened this issue Jan 18, 2018 · 7 comments
Assignees
Labels
Projects

Comments

@dhixsingh
Copy link
Contributor

dhixsingh commented Jan 18, 2018

The Mount Alexander Shire MATSim network network file used by all tests and in the EES ui is here.

The task is to:

  • Extract two OSM networks from OpenStreetMap; one detailed for the Mount Alexander Shire region, and another much larger one only with major roads but capturing all cities in the region including Bendigo, Ballarat, Shepperton, Geelong, Melbourne. Then combine them to get a single OSM. The network merging is described in the MATSim user guide in section 7.2.1.
  • Post-process the combined file to fix free speeds and bad lengths etc. (will require a new script).
  • Remove the speed adjustments done in code here.
  • Build the Mount Alexander Shire MATSim network file again with sensible Australian defaults using NetworkGenerator.

Liaise with @chamindab and @rmit-s3560603-karthikey-surineni since parts of this task overlap with what needs to be done for the Hawkesbury network as well as the Melbourne network.

@dhixsingh dhixsingh added the ees label Jan 18, 2018
@dhixsingh dhixsingh self-assigned this Jan 18, 2018
@dhixsingh dhixsingh added this to To Do in v3.0 via automation Jan 18, 2018
@dhixsingh
Copy link
Contributor Author

---------- Forwarded message ----------
From: Nagel Kai
Date: 12 December 2017 at 10:45
Subject: Bradford
To: Dhirendra Singh

Dear Dhirendra,

I should have sent this email before the other one.

They are always taking the "long" route, even before the fire is there. See below.

Reason is that your "secondary" road have speed 16.66 (=60km/h), while your tertiary roads have speed 27.77 (=100km/h). (The "unclassified" roads, which again one level below that, have 12.5 (=45km/h).)

We had originally not really defined the base road characteristics of our OSM reader, assuming that they would vary from region to region anyways. As is typical, everybody was and is just using the default values. Some of us have now tried to put in some more reasonable default values. Maybe you want to re-import your networks at some point, with the newest MATSim OSMReader.

I have actually seen more weirdnesses in your network, such as links with speed infinity (am setting those to a speed of 9999999999. in MATSimModel to make the router work).

Am "correcting" it in various ways inside matsimmodel, but maybe at some point you may want to clean up your input data.

Best wishes

Kai

@dhixsingh
Copy link
Contributor Author

dhixsingh commented Jan 18, 2018

Should also change the scenarios/tests to link to a single network file so that it is then easier to update it in the one place. Right now each scenario saves its own copy. Raised #9 for this.

@dhixsingh
Copy link
Contributor Author

dhixsingh commented Feb 6, 2018

Commit b9cc923 contains the updated network file mount_alexander_shire_network_20180206.xml.gz, that was created as follows:

osmosis --rb file=AU.pbf --bounding-box top=-36.8758 left=143.8344 bottom=-37.2762 right=144.5533 completeWays=true --used-node --wb mas-allroads.osm.pbf

osmosis --rb file=AU.pbf --bounding-box top=-33.184 left=138.208 bottom=-39.215 right=151.776 --tf accept-ways highway=motorway,motorway_link,trunk,trunk_link,primary,primary_link --used-node --wb mas-bigroads.osm.pbf

osmosis --rb file=mas-allroads.osm.pbf --rb file=mas-bigroads.osm.pbf --merge --wx mas-merged-network.osm 

mvn exec:java -Dexec.mainClass="io.github.agentsoz.util.NetworkGenerator" -Dexec.args="-i ./scenarios/mount-alexander-shire/mas-merged-network.osm -o ./scenarios/mount-alexander-shire/mount_alexander_shire_network_20180206.xml"

Tests have not been updated to use this yet, as the link IDs have all changed and the network change event files used by tests will no longer work. Probably easiest is to just remove the network change event files, and after visual inspection, accept the new results one by one.

@dhixsingh
Copy link
Contributor Author

dhixsingh commented Feb 7, 2018

Commit 91ed456 contains as updated file mount_alexander_shire_network_2018.xml.gz with the Mount Alexander Shire MATSim network. There is also a new script create-mas-network.sh that automates the process.

@dhixsingh
Copy link
Contributor Author

Note the OpenStreetMap recommendation for tagging in Australia.

Also, the current recommended maxspeed defaults for Australia are reproduced below.

highway=motorway - 100 km/h usually, 110 km/h only where sign-posted
highway=primary - 80 to 90 km/h
highway=secondary - 50 to 70 km/h
highway=tertiary - 50 km/h
highway=residential - 50 km/h, usually 40 km/h in school zones

These should be reflected in NetworkGenerator that currently has:

// Explicitly specify the defaults for Australian roads
onr.setHighwayDefaults(1, "motorway", 2, 110.0/3.6, 1.0, 2000, true);
onr.setHighwayDefaults(1, "motorway_link", 1, 80.0/3.6, 1.0, 1500, true);
onr.setHighwayDefaults(2, "trunk", 1, 80.0/3.6, 1.0, 2000);
onr.setHighwayDefaults(2, "trunk_link", 1, 50.0/3.6, 1.0, 1500);
onr.setHighwayDefaults(3, "primary", 1, 80.0/3.6, 1.0, 1500);
onr.setHighwayDefaults(3, "primary_link", 1, 60.0/3.6, 1.0, 1500);
onr.setHighwayDefaults(4, "secondary", 1, 30.0/3.6, 1.0, 1000);
onr.setHighwayDefaults(4, "secondary_link", 1, 30.0/3.6, 1.0, 1000);
onr.setHighwayDefaults(5, "tertiary", 1, 25.0/3.6, 1.0, 600);
onr.setHighwayDefaults(5, "tertiary_link", 1, 25.0/3.6, 1.0, 600);
onr.setHighwayDefaults(6, "unclassified", 1, 15.0/3.6, 1.0, 600);
onr.setHighwayDefaults(7, "residential", 1, 15.0/3.6, 1.0, 600);
onr.setHighwayDefaults(8, "living_street", 1, 10.0/3.6, 1.0, 300);

dhixsingh added a commit that referenced this issue Feb 20, 2018
@dhixsingh dhixsingh moved this from Inbox to In progress in v3.0 Feb 21, 2018
@dhixsingh
Copy link
Contributor Author

Since 2804a23 Maldon100WithEmergencyVehiclesTest uses the new network. Will raise a separate issue for updating other tests as needed.

@dhixsingh
Copy link
Contributor Author

Attached are some views of the final network. Colours represent freespeed:

  • 110 km/h is dark blue
  • 90-100 km/h is light blue
  • 60-80 km/hr is yellow
  • 50 km/h and lower is red

Here is the full extent of the new network:
mas-network-2018-full

Here is the same network zoomed into the area of detail:
mas-network-2018-zoom

Some issues in the underlying OSM network are evident. In the zoomed view, the patch of blue roads in the top left (west of Bendigo), suggests inconsistencies in mapping data--those roads have been tagged with a speed limit of ``100 km/h` whereas other likely similar nearby roads are not. The extent of the problems is not clear and requires further investigation.

Mount Alexander Shire Municipal Fire Management Planning Committee is aware of the OSM issues, and till such that that we can commit resources to investigating these further, we will accept this network for ongoing work.

v3.0 automation moved this from In progress to Done Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v3.0
  
Done
Development

No branches or pull requests

1 participant