def update(self): """Calculate the smoothing parameter values. The following example is explained in some detail in module |smoothtools|: >>> from hydpy import pub >>> pub.timegrids = "2000.01.01", "2000.01.03", "1d" >>> from hydpy.models.dam import * >>> parameterstep() >>> neardischargeminimumtolerance(0.0) >>> neardischargeminimumtolerance.values[1] = 2.5 >>> derived.neardischargeminimumsmoothpar2.update() >>> from hydpy.cythons.smoothutils import smooth_logistic2 >>> from hydpy import round_ >>> round_(smooth_logistic2( ... 0.0, derived.neardischargeminimumsmoothpar2[0])) 0.0 >>> round_(smooth_logistic2( ... 2.5, derived.neardischargeminimumsmoothpar2[1])) 2.51 """ metapar = self.subpars.pars.control.neardischargeminimumtolerance self.shape = metapar.shape self(smoothtools.calc_smoothpar_logistic2(metapar.values))
def update(self): """Calculate the smoothing parameter value. The documentation on module |smoothtools| explains the following example in some detail: >>> from hydpy.models.dam import * >>> parameterstep() >>> from hydpy.cythons.smoothutils import smooth_logistic2 >>> from hydpy import round_ >>> volumetolerance(0.0) >>> derived.volumesmoothparlog2.update() >>> round_(smooth_logistic2(0.0, derived.volumesmoothparlog2)) 0.0 >>> volumetolerance(2.5) >>> derived.volumesmoothparlog2.update() >>> round_(smooth_logistic2(2.5, derived.volumesmoothparlog2)) 2.51 """ metapar = self.subpars.pars.control.volumetolerance self(smoothtools.calc_smoothpar_logistic2(metapar))
def update(self): metapar = self.subpars.pars.control.neardischargeminimumtolerance self.shape = metapar.shape for idx, metapar in enumerate(metapar.values): self.values[idx] = smoothtools.calc_smoothpar_logistic2(metapar)