21 package org.matsim.counts.algorithms;
23 import org.apache.logging.log4j.LogManager;
24 import org.apache.logging.log4j.Logger;
40 import java.util.ArrayList;
41 import java.util.List;
64 private final List<CountSimComparison>
result;
83 this.result =
new ArrayList<CountSimComparison>();
101 return volumesPerLinkPerHour.get(
Id.
create(locationId,
Link.class));
106 this.result =
new ArrayList<>();
114 this.result =
new ArrayList<>();
129 if (volumes == null || volumes.length == 0) {
130 log.warn(
"No volumes for count location: " + count.getId().toString());
133 for (
int hour = 1; hour <= 24; hour++) {
134 Volume volume = count.getVolume(hour);
135 if (volume != null) {
136 double countValue = volume.
getValue();
137 double simValue=volumes[hour-1];
139 this.result.add(
new CountSimComparisonImpl(count.getId(), count.getCsLabel(), hour, countValue, simValue));
171 log.warn(
"Cannot find requested link: " + count.
getId().toString());
175 return dist < distance;
188 return dist < distance;
double [] getVolumesPerHourForLink(final Id< Link > linkId)
DistanceFilter distanceFilter
Map< Id< Node >, ? extends Node > getNodes()
void setCountsScaleFactor(final double countsScaleFactor)
static double calcEuclideanDistance(Coord coord, Coord other)
boolean isInRange(Count< Link > count)
final TreeMap< Id< T >, Count< T > > getCounts()
CountsComparisonAlgorithm(final IdMap< Link, double[]> volumesPerLinkPerHour, final Counts< Link > counts, final Network network, final double countsScaleFactor)
final Counts< Link > counts
List< CountSimComparison > getComparison()
static< T > Id< T > create(final long key, final Class< T > type)
double [] getVolumesForStop(Id< TransitStopFacility > locationId)
final List< CountSimComparison > result
final VolumesForId volumesPerLinkPerHour
Map< Id< Link >, ? extends Link > getLinks()
void setDistanceFilter(DistanceFilter distanceFilter)
void setDistanceFilter(final Double distance, final String nodeId)
void setCountCoordUsingDistanceFilter(final Double distance, final String nodeId)
CountsComparisonAlgorithm(final VolumesAnalyzer volumes, final Counts< Link > counts, final Network network, final double countsScaleFactor)
CountsComparisonAlgorithm(VolumesForId volumesPerLinkPerHour, final Counts< Link > counts, final Network network, final double countsScaleFactor)