comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation3.java @ 709:3b7e9ddf6bb1

New model to transport data and error reports of calculations. flys-artifacts/trunk@2165 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 20 Jun 2011 12:32:32 +0000
parents c501f27c1f71
children 0296684a5553
comparison
equal deleted inserted replaced
708:757ff56b43b3 709:3b7e9ddf6bb1
18 this.km = km; 18 this.km = km;
19 this.days = days; 19 this.days = days;
20 this.qs = qs; 20 this.qs = qs;
21 } 21 }
22 22
23 public WQDay calculate(WstValueTable wst) { 23 public CalculationResult calculate(WstValueTable wst) {
24 24
25 double [] ws = wst.interpolateW(km, qs, new double[qs.length], this); 25 double [] ws = wst.interpolateW(km, qs, new double[qs.length], this);
26 26
27 WQDay wqday = new WQDay(days, ws, qs); 27 WQDay wqday = new WQDay(days, ws, qs);
28 28
29 if (hasProblems()) { 29 if (hasProblems()) {
30 logger.debug("calculation caused "+numProblems()+" problem(s)."); 30 logger.debug("calculation caused "+numProblems()+" problem(s).");
31 wqday.removeNaNs(); 31 wqday.removeNaNs();
32 } 32 }
33 33
34 return wqday; 34 return new CalculationResult(wqday, this);
35 } 35 }
36 } 36 }
37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org