Reusing Calculation Rules

One of the steps you will go through when implementing your rates is to look at the bill lines for your rates and ask yourself what are the variables that cause each line's charges to be calculated the way they are. After you've determined all of the potential bill lines you can start designing your calculation groups and rules. Typically, you create one calculation rule for every line that can appear on the customer's bill. These rules can be grouped in different configurations based on how you want your bills to appear and the needs of your implementation. Recall that bill segment calculation headers are created for Pre-Processing, Rate Version, and Post-Processing calculation groups. In addition, most rules can be configured generate a bill line.

Identifying Calculation Rules that can be Shared/Reused

As you analyze the bill lines used by your rates, you should look for bill lines that utilize similar or identical variables or calculations. These calculations are candidates for reuse. For example, if all of your residential rates offer a discount for early payment, you would want to create a single rule to calculate that discount, and then use it each of the rates to which it applies.

How to Reuse Calculation Rules

There are two approaches that can be used to reuse calculation rules.

  • Encapsulating Rules in a Calculation Group

    This approach involves grouping rules that can be applied to more than one rate into a single calculation group. You would use this approach when you identify charges and other components in your rates that apply to multiple rates, but that can be grouped together. Taxes for multiple types of jurisdictions (for example, State, County, and City) would be suitable for this approach.

    To use this approach, you simply create a calculation group that contains the rules to be applied to more than one rate. For the tax example, you might create the following group and rules:

    Calculation Group: Taxes, which includes:

    Calculation Rule: State Tax (Apply To)

    Calculation Rule: County Tax (Apply To)

    Calculation Rule: City Tax (Apply To)

    This "Taxes" calculation group can be included as a Rate Version Calculation Group in each of the rates to which the taxes apply. This calculation group could also be referenced by an "Execute Calculation Group" rule, as outlined below.

  • Using "Execute Calculation Group" Rules

    This approach involves creating a calculation group that contains one or more rules, which is then referenced by another "Execute Calculation Group" rule. This approach can be used when you identify a charge or calculation that could be applicable within one or more calculation groups. For example, if multiple rates involve calculating peak demand (or some other quantity that is not measured by your customers' meters), you could create a "Calculate Demand" rule and include it in a group that is then referenced by an "Execute Calculation Group" rule.

    To use this approach, you create a calculation group that contains the calculation rules to be used within multiple calculation groups. You then create an "Execute Calculation Group" rule that references the group. Last, you include this "Execute Calculation Group" rule in the calculation groups to which it applies. For the calculate demand example, you might create the following:

    Calculation Rule: Calculate Demand (Execute Calculation Group), which references:

    Calculation Group: Calculate Demand, which includes:

    Calculation Rule: Calculate Demand (Calculate Service Quantity)

    The "Calculate Demand" Execute Calculation Group rule can be included in any calculation group used to calculate service quantities that includes calculating peak demand.

    "Execute Calculation Group" rules can be used with any calculation group. To return the taxes example from above, if you wanted to include your "Taxes" calculation group within other groups, you could use the following:

    Calculation Rule: Taxes (Execute Calculation Group), which references:

    Calculation Group: Taxes, which includes:

    Calculation Rule: State Tax (Apply To)

    Calculation Rule: County Tax (Apply To)

    Calculation Rule: City Tax (Apply To)

    See "Execute Calculation Group Rules - Nesting Calculation Rules" in About Calculation Rules for more information about Execute Calculation Group rules.