From bd1261e3404486b755a57753252f6fa2df3547bb Mon Sep 17 00:00:00 2001 From: steffenaxer <26229392+steffenaxer@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:40:15 +0100 Subject: [PATCH 1/3] Remove redundant zoneToLinksMap --- .../zones/systems/grid/square/SquareGridZoneSystem.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/contribs/common/src/main/java/org/matsim/contrib/common/zones/systems/grid/square/SquareGridZoneSystem.java b/contribs/common/src/main/java/org/matsim/contrib/common/zones/systems/grid/square/SquareGridZoneSystem.java index f47ed5669c9..a017bc154e6 100644 --- a/contribs/common/src/main/java/org/matsim/contrib/common/zones/systems/grid/square/SquareGridZoneSystem.java +++ b/contribs/common/src/main/java/org/matsim/contrib/common/zones/systems/grid/square/SquareGridZoneSystem.java @@ -55,7 +55,6 @@ public class SquareGridZoneSystem implements GridZoneSystem { private final IdMap zones = new IdMap<>(Zone.class); - private final IdMap> zoneToLinksMap = new IdMap<>(Zone.class); private final Map> index2Links; private final Network network; @@ -114,7 +113,7 @@ public Optional getZoneForCoord(Coord coord) { @Override public List getLinksForZoneId(Id zone) { - return zoneToLinksMap.get(zone); + return this.index2Links.get(Integer.parseInt(zone.toString())); } private Optional getOrCreateZone(Coord coord) { @@ -129,12 +128,6 @@ private Optional getOrCreateZone(Coord coord) { if(zoneFilter.test(zone)) { internalZones[index] = zone; zones.put(zone.getId(), zone); - List linkList = zoneToLinksMap.computeIfAbsent(zone.getId(), zoneId -> new ArrayList<>()); - List links = index2Links.get(index); - if(links!=null) - { - linkList.addAll(links); - } } else { return Optional.empty(); } From 6a0ec7d38fcc848ecd54c7da2e5f2a94494f5834 Mon Sep 17 00:00:00 2001 From: Kai Martins-Turner Date: Tue, 26 Nov 2024 11:21:43 +0100 Subject: [PATCH 2/3] Update trigger for DTD deployment job. Run on merged PRs; fix syntax for target path. --- .github/workflows/deploy-dtds.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-dtds.yaml b/.github/workflows/deploy-dtds.yaml index bb48f61d27b..caf62f55141 100644 --- a/.github/workflows/deploy-dtds.yaml +++ b/.github/workflows/deploy-dtds.yaml @@ -1,14 +1,15 @@ name: deploy-dtds-on-website on: - push: - branches: - - master + pull_request: + types: + - closed paths: - - matsim/src/main/resources/dtd + - 'matsim/src/main/resources/dtd/**' jobs: rsync-dtds: + if: github.event.pull_request.merged == true // only if PR closed by merging name: sync DTDs to website runs-on: ubuntu-latest From d25a1e9a1361b2c282bdb7c3cea5a7ce9ba18f1a Mon Sep 17 00:00:00 2001 From: Kai Martins-Turner Date: Tue, 26 Nov 2024 11:48:28 +0100 Subject: [PATCH 3/3] formatting. Commit is mainly done to trigger deploy-dtd workflow. --- matsim/src/main/resources/dtd/lspsDefinitions_v1.xsd | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/matsim/src/main/resources/dtd/lspsDefinitions_v1.xsd b/matsim/src/main/resources/dtd/lspsDefinitions_v1.xsd index 32a03b4d072..ff3cb9be076 100644 --- a/matsim/src/main/resources/dtd/lspsDefinitions_v1.xsd +++ b/matsim/src/main/resources/dtd/lspsDefinitions_v1.xsd @@ -1,11 +1,11 @@ + targetNamespace="http://www.matsim.org/files/dtd" + xmlns="http://www.matsim.org/files/dtd" + elementFormDefault="qualified" + xml:lang="en"> - + @@ -24,6 +24,7 @@ +