def max_energy_in_storage_rule(mod, s, tmp):
    """
    **Constraint Name**: GenVarStorHyb_Max_Energy_in_Stor_Constraint
    **Enforced Over**: GEN_VAR_STOR_HYB_OPR_TMPS

    The amount of energy stored in each operational timepoint cannot exceed
    the available energy capacity.
    """
    return mod.GenVarStorHyb_Starting_Energy_in_Storage_MWh[s, tmp] \
        <= mod.Energy_Capacity_MWh[s, mod.period[tmp]] \
        * mod.Availability_Derate[s, tmp]