def capacity_cost_rule(mod, g, p):
    """
    The capacity cost of projects of the *gen_ret_bin* capacity type is its net
    capacity (pre-specified capacity or zero if retired) times the per-mw
    fixed cost for each of the project's operational periods.
    """
    return mod.gen_ret_bin_fixed_cost_per_mw_yr[g, p] \
        * mod.gen_ret_bin_capacity_mw[g, p] \
        * (1 - mod.GenRetBin_Retire[g, p])