edu.kit.ifv.mobitopp.populationsynthesis.fixeddestinations.HasWorkActivity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mobitopp Show documentation
Show all versions of mobitopp Show documentation
mobiTopp (http://mobitopp.ifv.kit.edu/) is an agent-based travel demand model developed at the Institute for transport studies at the Karlsruhe Institute of Technology (http://www.ifv.kit.edu/english/index.php). Publications about mobiTopp can be found on the project site (http://mobitopp.ifv.kit.edu/28.php).
The newest version!
package edu.kit.ifv.mobitopp.populationsynthesis.fixeddestinations;
import java.util.function.Predicate;
import edu.kit.ifv.mobitopp.data.tourbasedactivitypattern.Activity;
import edu.kit.ifv.mobitopp.populationsynthesis.PersonBuilder;
import edu.kit.ifv.mobitopp.simulation.ActivityType;
public class HasWorkActivity implements Predicate {
@Override
public boolean test(PersonBuilder person) {
return person
.getActivityPattern()
.asActivities()
.stream()
.map(Activity::activityType)
.anyMatch(ActivityType.WORK::equals);
}
}