diff --git a/README.md b/README.md
index 62d1130..3744053 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,6 @@
This repository provides an open MATSim transport model for Hamburg, provided by the [Transport Systems Planning and Transport Telematics group](https://www.vsp.tu-berlin.de) of [Technische Universität Berlin](http://www.tu-berlin.de).
-> Currently the model is work in progress and no release version is available.
-
### Licenses
The **MATSim program code** in this repository is distributed under the terms of the [GNU General Public License as published by the Free Software Foundation (version 2)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html). The MATSim program code are files that reside in the `src` directory hierarchy and typically end with `*.java`.
@@ -21,3 +19,78 @@ The **MATSim input files, output files, analysis data and visualizations** are l
Handling of large files within git is not without problems (git lfs files are not included in the zip download; we have to pay; ...). In consequence, large files, both on the input and on the output side, reside at https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/hamburg .
----
+### Simple things (without installing/running MATSim)
+
+
+
+##### Run VIA on output files
+
+1. Get VIA from https://www.simunto.com/via/. (There is a free license for a small number of agents; that will probably work but only display a small number of vehicles/agents.)
+1. Go to https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/hamburg/hamburg-v1/hamburg-v1/.
+1. Inside there, decide for a scenario that you find interesting (e.g. hamburg-v1.1-10pct) and go into that directory. look for an `output-*` directory that you find interesting and go into that directory.
+1. Download `*.output_network.xml.gz` and `*.output_events.xml.gz`. Best make sure that they do not uncompress, e.g. by "Download linked file as ...".
+1. Get these files into VIA. This can be achieved in various ways; one is to open VIA and then drag the files from a file browser into VIA.
+1. Run VIA and enjoy.
+
+### Downloading the repository alternative 1: Download ZIP
+
+1. Click on `Clone or download` and then on `Download ZIP`.
+1. Unzip the repository.
+1. Go to "Run the scenario" below.
+
+### Downloading the repository alternative 2: Clone the repository
+
+##### Initial stuff (needs to be done once)
+
+1. Install git for the command line.
+1. Type `git clone https://github.com/matsim-scenarios/matsim-hamburg.git` in the command line.
+
+(Or use your IDE, e.g. Eclipse, IntelliJ, to clone the repository.)
+
+This will result in a new `matsim-hamburg` directory. Memorize where you have put it. You can move it, as a whole, to some other place.
+
+##### Update your local clone of the repository.
+
+1. Go into the `matsim-hamburg` directory.
+1. Type `git pull`
+
+(Or use your IDE, e.g. Eclipse, IntelliJ, to update the repository.)
+
+This will update your repository to the newest version.
+
+### Run the scenario
+(Requires either cloning or downloading the repository.)
+
+##### ... using a runnable jar file (only available for releases)
+1. You can build an executable jar-file by executing one of the following commands in the top directory.
+ This will download all necessary dependencies (it might take a while the first time it is run) and dump the jar into the top directory.
+ 1. `./mvnw clean package -DskipTests=true`
+ 1. or on Windows: `mvnw.cmd clean package -DskipTests=true`
+1. Double-click on that .jar file (in a file system browser). Alternatively, try opening it with the following command:``
+ java -jar [FILENAME].jar
+ ``
+
+1. In the GUI, click on the "Choose" button for configuration file. Navigate to one of the `scenario` directories and load one of the configuration files.
+1. Increase memory in the GUI.
+1. Press the "Start MATSim" button. This should run MATSim. Note that MATSim accepts URLs as filenames in its config, so while the config files are part of the git repo, running them will pull additional material from our server.
+1. "Open" the output directory. You can drag files into VIA as was already done above.
+1. "Edit..." (in the GUI) the config file. Re-run MATSim.
+
+##### ... using an IDE, e.g. Eclipse, IntelliJ
+1. Set up the project in your IDE.
+1. Make sure the project is configured as maven project.
+1. Run the JAVA class `src/main/java/org/matsim/run/RunBaseCaseHamburgScenario.java` or `src/main/java/org/matsim/gui/MATSimGUI.java`.
+1. "Open" the output directory. You can drag files into VIA as was already done above.
+1. Edit the config file or adjust the run class. Re-run MATSim.
+
+### More information
+
+For more information about MATSim, see here: https://www.matsim.org/.
+
+### Acknowledgements
+
+The travel demand data for the metropolitan area Ruhr is provided by Senozon Deutschland GmbH (https://senozon.com).
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 421be8c..f095772 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.github.matsim-scenarios
matsim-hamburg
- 1.0-SNAPSHOT
+ 1.1
MATSim Open Hamburg scenario project
MATSim Open Hamburg scenario project
diff --git a/scenarios/input/dummy-plan.xml b/scenarios/input/dummy-plan.xml
new file mode 100644
index 0000000..ebbaa21
--- /dev/null
+++ b/scenarios/input/dummy-plan.xml
@@ -0,0 +1,327 @@
+
+
+
+
+
+
+ EPSG:25832
+
+
+
+
+
+
+ 32640.0;44460.0;54720.0;57540.0;-Infinity
+ -Infinity;35880.0;46140.0;55140.0;59220.0
+ home;business;business;business;home
+ 59
+ always
+ m
+ always
+ none
+ NULL
+ person
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+
+
+
+
+
+
+ -Infinity
+ -Infinity
+ home
+ 61
+ always
+ f
+ always
+ none
+ NULL
+ person
+
+
+
+
+
+
+
+
+
+
+
+
+ 36780.0;44760.0;50460.0;54000.0;71160.0;75780.0;79440.0;84840.0;-Infinity
+ -Infinity;38940.0;47880.0;51540.0;54840.0;72360.0;76920.0;80160.0;85500.0
+ home;business;business;business;business;business;business;business;business
+ 64
+ always
+ f
+ always
+ none
+ NULL
+ person
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+ car
+
+
+
+
+
+
+
+
+
+
+
+
+ 19883.0;56491.0;58350.0;59495.0;69118.0;81850.0;-Infinity
+ -Infinity;20083.0;56683.0;58903.0;68503.0;70003.0;82603.0
+ home;work;home;leisure;leisure;leisure;home
+ 17
+ never
+ m
+ never
+ none
+ NULL
+ person
+
+
+
+
+
+
+ bike
+
+
+
+
+
+
+ ride
+
+
+
+
+
+
+ ride
+
+
+
+
+
+
+ pt
+
+
+
+
+
+
+ ride
+
+
+
+
+
+
+ ride
+
+
+
+
+
+
+
+
+
+
+
+
+ commercial
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scenarios/input/hamburg-v1.0-1pct.config.xml b/scenarios/input/hamburg-v1.0-1pct.config.xml
deleted file mode 100644
index 8f2b843..0000000
--- a/scenarios/input/hamburg-v1.0-1pct.config.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/scenarios/input/hamburg-v1.1-10pct.config.xml b/scenarios/input/hamburg-v1.1-10pct.config.xml
new file mode 100644
index 0000000..782daff
--- /dev/null
+++ b/scenarios/input/hamburg-v1.1-10pct.config.xml
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scenarios/input/hamburg-v1.1-1pct.config.xml b/scenarios/input/hamburg-v1.1-1pct.config.xml
new file mode 100644
index 0000000..8ba1263
--- /dev/null
+++ b/scenarios/input/hamburg-v1.1-1pct.config.xml
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scenarios/input/hamburg-v1.1-25pct.config.xml b/scenarios/input/hamburg-v1.1-25pct.config.xml
new file mode 100644
index 0000000..63f5a66
--- /dev/null
+++ b/scenarios/input/hamburg-v1.1-25pct.config.xml
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/org/matsim/analysis/GenerateStopId2StopName.java b/src/main/java/org/matsim/analysis/GenerateStopId2StopName.java
index dcf399b..d718947 100644
--- a/src/main/java/org/matsim/analysis/GenerateStopId2StopName.java
+++ b/src/main/java/org/matsim/analysis/GenerateStopId2StopName.java
@@ -20,7 +20,7 @@ public static void main(String[] args) throws IOException {
BufferedWriter bw = new BufferedWriter(outputStreamWriter);
bw.write("id" + splitSymbol + "name" );
- Config config = ConfigUtils.loadConfig("../shared-svn/projects/RealLabHH/matsim-input-files/v1/hamburg-v1.0-1pct.config.xml");
+ Config config = ConfigUtils.loadConfig("../shared-svn/projects/RealLabHH/matsim-input-files/v1/hamburg-v1.1-1pct.config.xml");
Scenario scenario = ScenarioUtils.loadScenario(config);
for (TransitStopFacility tr :
diff --git a/src/main/java/org/matsim/parking/UtilityBasedParkingPressureEventHandler.java b/src/main/java/org/matsim/parking/UtilityBasedParkingPressureEventHandler.java
index d74b1f4..ccbd989 100644
--- a/src/main/java/org/matsim/parking/UtilityBasedParkingPressureEventHandler.java
+++ b/src/main/java/org/matsim/parking/UtilityBasedParkingPressureEventHandler.java
@@ -32,7 +32,10 @@ public void reset(int iteration) {
public void handleEvent(PersonArrivalEvent event) {
if (scenario.getPopulation().getPersons().containsKey(event.getPersonId()) && event.getLegMode().equals(parkingRelevantTransportMode)) {
-
+
+ if(!scenario.getNetwork().getLinks().get(event.getLinkId()).getAttributes().getAsMap().containsKey(parkPressureAttributeName)){
+ throw new RuntimeException(parkPressureAttributeName + " is not found as an attribute in link: " + event.getLinkId());
+ }
double parkPressureScore = (double) scenario.getNetwork().getLinks().get(event.getLinkId()).getAttributes().getAttribute(parkPressureAttributeName);
if (parkPressureScore != 0){
diff --git a/src/main/java/org/matsim/run/HamburgExperimentalConfigGroup.java b/src/main/java/org/matsim/run/HamburgExperimentalConfigGroup.java
index 501f60f..fe5ef59 100644
--- a/src/main/java/org/matsim/run/HamburgExperimentalConfigGroup.java
+++ b/src/main/java/org/matsim/run/HamburgExperimentalConfigGroup.java
@@ -27,7 +27,7 @@ public HamburgExperimentalConfigGroup() {
private boolean usePersonIncomeBasedScoring = false;
private double freeSpeedFactor = 1.;
private boolean useLinkBasedParkPressure = false;
- private String parkPressureLinkAttributeFile = "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/hamburg/hamburg-v1/hamburg-v1.1/hamburg-v1.1-link2parkpressure.csv";
+ private String parkPressureLinkAttributeFile = null;
private String parkPressureScoreParams = "1.,0.7,0.";
private double parkPressureScoreConstant = 0.;
private boolean increaseStorageCapacity = true;
diff --git a/src/main/java/org/matsim/run/RunBaseCaseHamburgScenario.java b/src/main/java/org/matsim/run/RunBaseCaseHamburgScenario.java
index 393c76f..4dabaf6 100644
--- a/src/main/java/org/matsim/run/RunBaseCaseHamburgScenario.java
+++ b/src/main/java/org/matsim/run/RunBaseCaseHamburgScenario.java
@@ -45,7 +45,6 @@ public class RunBaseCaseHamburgScenario {
public static final String COORDINATE_SYSTEM = "EPSG:25832";
public static final String VERSION = "v1.1";
- public static final int SCALE = 1;
public static final double[] X_EXTENT = new double[]{490826.5738238178, 647310.6279172485};
public static final double[] Y_EXTENT = new double[]{5866434.167201331, 5996884.970634732};
@@ -56,7 +55,7 @@ public static void main(String[] args) throws ParseException, IOException {
}
if (args.length == 0) {
- args = new String[] {"../public-svn/matsim/scenarios/countries/de/hamburg/hamburg-v1/hamburg-v1.1/hamburg-v1.1-1pct/hamburg-v1.1-1pct.config.xml"};
+ args = new String[] {"scenarios/input/hamburg-v1.1-10pct.config.xml"};
}
RunBaseCaseHamburgScenario baseCaseHH = new RunBaseCaseHamburgScenario();
@@ -170,7 +169,7 @@ public static Scenario prepareScenario(Config config) throws IOException {
// add parkPressureAttribute
if(hamburgExperimentalConfigGroup.isUseLinkBasedParkPressure()){
- if (hamburgExperimentalConfigGroup.getParkPressureLinkAttributeFile() != "") {
+ if (hamburgExperimentalConfigGroup.getParkPressureLinkAttributeFile() != null) {
log.info("Adding missing park pressure link attributes based on provided files...");
NetworkParkPressureReader networkParkPressureReader = new NetworkParkPressureReader(scenario.getNetwork(),hamburgExperimentalConfigGroup);
networkParkPressureReader.addLinkParkTimeAsAttribute();
diff --git a/src/test/java/org/matsim/prepare/ScenarioReducer.java b/src/test/java/org/matsim/prepare/ScenarioReducer.java
index 7a31134..fa80d95 100644
--- a/src/test/java/org/matsim/prepare/ScenarioReducer.java
+++ b/src/test/java/org/matsim/prepare/ScenarioReducer.java
@@ -37,7 +37,7 @@ public static void main(String[] args) {
if(args.length > 0 ){
configFile = args[0];
} else
- configFile = "test/input/test-hamburg.config.xml";
+ configFile = "scenarios/input/hamburg-v1.1-10pct.config.xml";
ScenarioReducer scenarioReducer = new ScenarioReducer(configFile);
diff --git a/test/input/test-hamburg-with-pt-network.xml.gz b/test/input/test-hamburg-with-pt-network.xml.gz
index 7cbd80e..320b1d7 100644
Binary files a/test/input/test-hamburg-with-pt-network.xml.gz and b/test/input/test-hamburg-with-pt-network.xml.gz differ