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 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(); } 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 @@ +