private void createParkingSink(TrafficSink trafficSink, RoadSegment roadSegment) {
// setup source which models the re-entrance of vehicles leaving the parking lot
if (!trafficSink.isSetParking()) {
return;
}
Parking parking = trafficSink.getParking();
RoadSegment sourceRoadSegment = Preconditions.checkNotNull(roadNetwork.findByUserId(parking.getSourceRoadId()),
"cannot find roadSegment=" + parking.getSourceRoadId() + " specified as re-entrance from the road="
+ roadSegment.id());
TrafficSourceMicro trafficSource = new TrafficSourceMicro(defaultTrafficComposition, sourceRoadSegment);
if (trafficSink.isLogging()) {
trafficSource.setRecorder(new FileTrafficSourceData(sourceRoadSegment.userId()));
}