def kirchhoff_voltage_law_rule(mod, c, tmp):
    """
    **Constraint Name**: TxDcopf_Kirchhoff_Voltage_Law_Constraint
    **Enforced Over**: CYCLES_OPR_TMPS

    The sum of all potential difference across branches around all cycles
    in the network must be zero in each operational timepoint. In DC power
    flow we assume all voltage magnitudes are kept at nominal value and the
    voltage  angle differences across branches is small enough that we can
    approximate the sinus of the angle with the angle itself, i.e. sin(
    theta) ~ theta. We can therefore write KVL in terms of voltage angles as
    follows:

    ..math:: \\sum_{l} C_{l,c} * \theta_{l} = 0   \\forall c = 1,...,L-N+1

    Using the linearized relationship between voltage angle
    differences across branches and the line flow, :math:`\theta_{l} = x_{l}
    * f_{l}`, we can factor out the voltage angles and write KVL purely in
    terms of line flows and line reactances:

    .. math:: C_{l,c} * x_{l} * f_{l} = 0   \\forall c = 1,...,L-N+1

    The latter equation is enforced in this constraint.

    Note: While most power flow formulations normalize all inputs to per
    unit (p.u.) we can safely avoid that here since the normalization
    factors out in the equation, and it is really just about the relative
    magnitude of the reactance of the lines.

    Source: Horsch et al. (2018). Linear Optimal Power Flow Using Cycle Flows
    """

    return sum(
        mod.TxDcopf_Transmit_Power_MW[l, tmp]
        * mod.tx_dcopf_cycle_direction[mod.period[tmp], c, l]
        * mod.tx_dcopf_reactance_ohms[l]
        for l in mod.TX_DCOPF_IN_PRD_CYCLE[mod.period[tmp], c]
    ) == 0