Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java @ 9620:26e113e8224f
Nachtrag Pos. 20: flood duration calculation for multiple infrastructure groups/types,
local class FloodDurationCalculationResult.Infrastructure renamed and extracted into own class
author | mschaefer |
---|---|
date | Thu, 10 Oct 2019 17:11:54 +0200 |
parents | d889ffe2fb05 |
children | 02ca823ec9c6 |
comparison
equal
deleted
inserted
replaced
9619:63bbd5e45839 | 9620:26e113e8224f |
---|---|
18 import org.dive4elements.river.artifacts.model.CalculationResult; | 18 import org.dive4elements.river.artifacts.model.CalculationResult; |
19 import org.dive4elements.river.artifacts.model.WQDay; | 19 import org.dive4elements.river.artifacts.model.WQDay; |
20 import org.dive4elements.river.artifacts.model.river.RiverInfoProvider; | 20 import org.dive4elements.river.artifacts.model.river.RiverInfoProvider; |
21 import org.dive4elements.river.artifacts.resources.Resources; | 21 import org.dive4elements.river.artifacts.resources.Resources; |
22 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | 22 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; |
23 import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure; | |
24 import org.dive4elements.river.artifacts.sinfo.tkhstate.WinfoArtifactWrapper; | 23 import org.dive4elements.river.artifacts.sinfo.tkhstate.WinfoArtifactWrapper; |
25 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; | 24 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; |
26 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; | 25 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; |
27 import org.dive4elements.river.model.River; | 26 import org.dive4elements.river.model.River; |
27 import org.dive4elements.river.model.sinfo.Infrastructure; | |
28 | 28 |
29 /** | 29 /** |
30 * Calculation of the flood durations of the infrastructures of the km range of a river | 30 * Calculation of the flood durations of the infrastructures of the km range of a river |
31 * | 31 * |
32 * @author Matthias Schäfer | 32 * @author Matthias Schäfer |
74 private void calculateResult(final String label, final DoubleRange calcRange, final RiverInfoProvider riverInfoProvider, final FloodDurationAccess access, | 74 private void calculateResult(final String label, final DoubleRange calcRange, final RiverInfoProvider riverInfoProvider, final FloodDurationAccess access, |
75 final Calculation problems, final WINFOArtifact winfo, final FloodDurationCalculationResults results) { | 75 final Calculation problems, final WINFOArtifact winfo, final FloodDurationCalculationResults results) { |
76 | 76 |
77 final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, riverInfoProvider); | 77 final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, riverInfoProvider); |
78 | 78 |
79 // FIXME: fetch from access; maybe we need database for that... whatever | 79 // FIXME: fetch from access (fetchInfrastructureTypes only for test purposes) |
80 final Set<Infrastructure> infrastructureKeys = null; | 80 final Set<String> infrastructureChoices = Infrastructure.fetchInfrastructureTypes(riverInfoProvider.getRiver(), calcRange.getMinimumDouble(), |
81 calcRange.getMaximumDouble(), access.getRiverside().getAttributeKey()); | |
81 | 82 |
82 calculator.execute(problems, label, calcRange, access.getRiverside(), infrastructureKeys, access.getIsWspl(), winfo, results); | 83 calculator.execute(problems, label, calcRange, access.getRiverside().getAttributeKey(), infrastructureChoices, access.getIsWspl(), winfo, results); |
83 } | 84 } |
84 | 85 |
85 /** | 86 /** |
86 * Calculates the flood duration curve of a station | 87 * Calculates the flood duration curve of a station |
87 */ | 88 */ |