diff --git a/core/src/main/java/org/eqasim/core/analysis/pt/PublicTransportLegReaderFromPopulation.java b/core/src/main/java/org/eqasim/core/analysis/pt/PublicTransportLegReaderFromPopulation.java index e20e37a4c..67d339e61 100644 --- a/core/src/main/java/org/eqasim/core/analysis/pt/PublicTransportLegReaderFromPopulation.java +++ b/core/src/main/java/org/eqasim/core/analysis/pt/PublicTransportLegReaderFromPopulation.java @@ -38,7 +38,10 @@ public Collection readPublicTransportLegs(String populat } public Collection readPublicTransportLegs(Population population) { - return population.getPersons().values().stream().flatMap(person -> getPublicTransportLegs(person).stream()).collect(Collectors.toList()); + return population.getPersons().values().stream() + .filter(person -> personAnalysisFilter.analyzePerson(person.getId())) + .flatMap(person -> getPublicTransportLegs(person).stream()) + .collect(Collectors.toList()); } public Collection getPublicTransportLegs(Person person) {