Skip to content

Commit

Permalink
Merge branch 'master' into otfvis-module-protection-hint
Browse files Browse the repository at this point in the history
  • Loading branch information
kainagel committed May 9, 2024
2 parents 0f8e482 + 208bc3a commit 0e36d76
Show file tree
Hide file tree
Showing 241 changed files with 6,577 additions and 3,197 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-coverage.yaml
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-on-pr-merge.yaml
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: 'matsim-releases'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-on-release-created.yaml
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: matsim-releases
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-weekly.yaml
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: 'matsim-releases'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full-integration.yaml
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-push.yaml
Expand Up @@ -87,7 +87,7 @@ jobs:
if: ${{matrix.module != 'matsim' || steps.detect-changes.outputs.outside-contribs == 'true'}}
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -12,5 +12,8 @@ matsimExamples
matsim/docs/doxygen/html
matsim/src/main/java/Doxyfile

# VS Code files
.vscode

# ignore output directories:
output/
37 changes: 35 additions & 2 deletions contribs/application/pom.xml
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>org.matsim</groupId>
Expand All @@ -20,12 +21,21 @@
</repository>
</repositories>

<properties>
<avro.version>1.11.3</avro.version>
</properties>

<dependencies>

<dependency>
<groupId>tech.tablesaw</groupId>
<artifactId>tablesaw-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${avro.version}</version>
</dependency>

<dependency>
<groupId>org.matsim.contrib</groupId>
Expand Down Expand Up @@ -107,7 +117,7 @@
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.7.5</version>
<version>4.7.6</version>
</dependency>
<dependency>
<groupId>it.unimi.dsi</groupId>
Expand Down Expand Up @@ -140,4 +150,27 @@
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
47 changes: 47 additions & 0 deletions contribs/application/src/main/avro/xyt.avsc
@@ -0,0 +1,47 @@
{
"namespace": "org.matsim.application.avro",
"type": "record",
"name": "XYTData",
"fields": [
{
"name": "crs",
"type": "string",
"doc": "Coordinate reference system"
},
{
"name": "xCoords",
"doc": "List of x coordinates",
"type": {
"type": "array",
"items": "float"
}
},
{
"name": "yCoords",
"doc": "List of y coordinates",
"type": {
"type": "array",
"items": "float"
}
},
{
"name": "timestamps",
"doc": "List of timestamps in seconds",
"type": {
"type": "array",
"items": "int"
}
},
{
"name": "data",
"doc": "XYT data for each dataset. The key is the name, the data is stored in one chunk of data.",
"type": {
"type": "map",
"values": {
"type": "array",
"items": "float"
}
}
}
]
}
Expand Up @@ -142,6 +142,7 @@ private Config prepareConfig() {
config.transit().setTransitScheduleFile(ApplicationUtils.matchInput("transitSchedule", input.getRunDirectory()).toAbsolutePath().toString());
config.transit().setVehiclesFile(ApplicationUtils.matchInput("transitVehicles", input.getRunDirectory()).toAbsolutePath().toString());
config.plans().setInputFile(null);
config.facilities().setInputFile(null);
config.eventsManager().setNumberOfThreads(null);
config.eventsManager().setEstimatedNumberOfEvents(null);
config.global().setNumberOfThreads(1);
Expand Down Expand Up @@ -337,8 +338,8 @@ private void writeTimeDependentRaster(Network network, Config config, EmissionsO
Coord coord = raster.getCoordForIndex(xi, yi);
double value = timeBin.getValue().get(Pollutant.CO2_TOTAL).getValueByIndex(xi, yi);

// if (value == 0)
// continue;
if (value == 0)
continue;

printer.print(timeBin.getStartTime());
printer.print(coord.getX());
Expand Down

0 comments on commit 0e36d76

Please sign in to comment.