def test_yield(qi: float, Di: float, bf: float, telf: float, bterm: float, tterm: float, c: float, m0: float, m: float, t0: float) -> None: assume(tterm * dca.DAYS_PER_YEAR > telf) assume(bterm < bf) thm = dca.THM(qi, Di, 2.0, bf, telf, bterm, tterm) sec = dca.PLYield(c, m0, m, t0) thm.add_secondary(sec) check_yield_model(thm.secondary, 'secondary', qi) wtr = dca.PLYield(c, m0, m, t0) thm.add_water(wtr) check_yield_model(thm.water, 'water', qi)
def test_yield_min_max_invalid() -> None: with pytest.raises(ValueError) as e: y = dca.PLYield(1000.0, 0.0, 0.0, 180.0, 10.0, 1.0)
# se = dca.SE(qi=715, tau=90.0, n=.5) q_se = se.rate(ftime) N_se = se.cum(ftime) N_se = se.monthly_vol(ftime) N_se = se.interval_vol(ftime) D_se = se.D(ftime) b_se = se.b(ftime) beta_se = se.beta(ftime) # dg = dca.Duong(qi=715, a=2.8, m=1.4) q_dg = dg.rate(ftime) N_dg = dg.cum(ftime) N_dg = dg.monthly_vol(ftime) N_dg = dg.interval_vol(ftime) D_dg = dg.D(ftime) b_dg = dg.b(ftime) beta_dg = dg.beta(ftime) # thm.add_secondary(dca.PLYield(c=1000, m0=-.1, m=.5, t0=2 * 365.25 / 12)) g = thm.secondary.rate(ftime) y = thm.secondary.gor(ftime) g = thm.secondary.cum(ftime) g = thm.secondary.monthly_vol(ftime) g = thm.secondary.interval_vol(ftime, t0=0.) g = thm.secondary.D(ftime) g = thm.secondary.beta(ftime) g = thm.secondary.b(ftime)