示例#1
0
def test_equation_degree_of_net_zero_energy_greater_one():
    """ """
    total_feedin = 150
    total_grid_consumption = 100
    total_demand = 100
    degree_of_nze = E3.equation_degree_of_net_zero_energy(
        total_feedin, total_grid_consumption, total_demand
    )
    exp = 1.5
    assert degree_of_nze == exp, (
        f"The degree_of_nze ({degree_of_nze}) is not calculated correctly. "
        f"It should be equal to {exp}."
    )
示例#2
0
def test_equation_degree_of_net_zero_energy():
    """ Degree of NZE between 0 and 1."""
    total_feedin = 60
    total_grid_consumption = 80
    total_demand = 100
    degree_of_nze = E3.equation_degree_of_net_zero_energy(
        total_feedin, total_grid_consumption, total_demand
    )
    exp = 1 + (total_feedin - total_grid_consumption) / total_demand
    assert degree_of_nze == exp, (
        f"The degree_of_nze ({degree_of_nze}) is not calculated correctly. "
        f"It should be equal to {exp}."
    )