comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFraction.java @ 6970:7be97faf5848

flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 05 Sep 2013 17:15:04 +0200
parents 33f3cc375a23
children 9f45c17e8fda
comparison
equal deleted inserted replaced
6969:c137f5028591 6970:7be97faf5848
23 double suspSediment; 23 double suspSediment;
24 double loadTotal; 24 double loadTotal;
25 double total; 25 double total;
26 double unknown; 26 double unknown;
27 /** Values are valid within this km range. */ 27 /** Values are valid within this km range. */
28 Range sandRange = null; 28 Range sandRange;
29 Range fineMiddleRange = null; 29 Range fineMiddleRange;
30 Range coarseRange = null; 30 Range coarseRange;
31 Range suspSandRange = null; 31 Range suspSandRange;
32 Range suspSandBedRange = null; 32 Range suspSandBedRange;
33 Range suspSedimentRange = null; 33 Range suspSedimentRange;
34 Range loadTotalRange = null; 34 Range loadTotalRange;
35 Range totalRange = null; 35 Range totalRange;
36 Range unknownRange = null; 36 Range unknownRange;
37 37
38 public SedimentLoadFraction() { 38 public SedimentLoadFraction() {
39 sand = 0d; 39 sand = 0d;
40 fineMiddle = 0d; 40 fineMiddle = 0d;
41 coarse = 0d; 41 coarse = 0d;
187 } 187 }
188 188
189 public void setUnknownRange(Range unknownRange) { 189 public void setUnknownRange(Range unknownRange) {
190 this.unknownRange = unknownRange; 190 this.unknownRange = unknownRange;
191 } 191 }
192
193 /** Returns true if all fraction values except SuspSediment are unset. */
194 public boolean hasOnlySuspValues() {
195 return
196 getSuspSediment() != 0d &&
197 getCoarse() == 0d &&
198 getFineMiddle() == 0d &&
199 getSand() == 0d &&
200 getSuspSand() == 0d;
201 }
202
203 /** Returns true if all fraction values except SuspSediment are set. */
204 public boolean hasButSuspValues() {
205 return
206 getSuspSediment() == 0d &&
207 getCoarse() != 0d &&
208 getFineMiddle() != 0d &&
209 getSand() != 0d &&
210 getSuspSand() != 0d;
211 }
212
213 /** Returns true if all fraction needed for total calculation are set. */
214 public boolean isComplete() {
215 return
216 getCoarse() != 0d &&
217 getFineMiddle() != 0d &&
218 getSand() != 0d &&
219 getSuspSand() != 0d &&
220 getSuspSediment() != 0d;
221 }
192 } 222 }
193 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 223 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org