Skip to content

Commit 3acf883

Browse files
authored
fix: using the person analysis filter in PublicTransportLegReaderFromPopulation (#203)
1 parent 6082c28 commit 3acf883

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/java/org/eqasim/core/analysis/pt/PublicTransportLegReaderFromPopulation.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ public Collection<PublicTransportLegItem> readPublicTransportLegs(String populat
3838
}
3939

4040
public Collection<PublicTransportLegItem> readPublicTransportLegs(Population population) {
41-
return population.getPersons().values().stream().flatMap(person -> getPublicTransportLegs(person).stream()).collect(Collectors.toList());
41+
return population.getPersons().values().stream()
42+
.filter(person -> personAnalysisFilter.analyzePerson(person.getId()))
43+
.flatMap(person -> getPublicTransportLegs(person).stream())
44+
.collect(Collectors.toList());
4245
}
4346

4447
public Collection<PublicTransportLegItem> getPublicTransportLegs(Person person) {

0 commit comments

Comments
 (0)