Charge Rates establish how much to charge for usage. Charge rates are applied when usage properties matching the charge rate names are found in the usage data. In order for a charge rate of a given name to be applied, a usage record attribute of the same name must exist.
There are four major categories of charge rates: Resource, Usage, Multiplier, and Fee. These are distinguished by the way they are factored into the charge calculation. Resource charge rates are additive charges that are multiplied by the amount of time that they are used in seconds. Usage charge rates are additive charges that are not multiplied by time. Multiplier charge rates apply multipliers to the sum of the Resource and Usage charges. Fee charge rates are added after the multipliers have been applied.
Each of the major charge rate types has two sub-types: value-based and name-based.
Name-based charge rates charge rates are used for usage properties that take strings for values (e.g. QualityOfService=premium or Project=chemistry). The charge rate that is applied will be determined by a lookup of the usage property value to see if there is a matching charge rate value. A default rate may be specified by creating a name-based charge rate with an empty charge rate value. Multiple values may be assigned to the same rate via separate charge rate definitions or by combining the values in a single charge rate value separated by commas.
Value-based charge rates are used for usage properties that take numbers for values (e.g. Processors=2 or CpuTime=12.67). The charge rate that is applied will be multiplied by the usage property value. The charge rate value is commonly left blank to be taken as the default rate for the full range of usage property values. A particular value may also be specified as the charge rate value which means that that rate will only be used if the usage property value exactly matches the charge rate value. A half-bounded expression may be used by specifying a less than or greater than sign with an optional equal sign, followed by the number. For example, the charge rate value <=4 would match a usage property value of x if x <= 4. A charge rate value may also be specified as a range (of the form <number>[-<number>]). For example, the range 1-4 would be match a usage property value of x if 1 <= x <= 4. If you need to be more specific about the boundedness of the ranges, you may replace the dash with a less than sign with an optional equal sign on either side of it to indicate whether the endpoints are included. For example, the range 1<4 would match if 1 < x < 4, 1=<4 would match if 1 <= x < 4, 1<=4 would match if 1 < x <=4 and 1=<=4 would match if 1 <= x <= 4. So you might use ranges like 1=<2, 2=<4, 4=<8, and >=8. Multiple values or value ranges having the same charge rate may be specified in a single expression separated by commas.
Thus there are eight composite types of charge rates referred to by their acronyms: VBR (Value-Based Resource), NBR (Name-Based Resource), VBU (Value-Based Usage), NBU (Name-Based Usage), VBM (Value-Based Multiplier), NBM (Name-Based Multiplier), VBF (Value-Based Fee) and NBF (Name-Based Fee).
Value-Based Resource — Value-Based Resource (or Consumable Resource) Charge Rates define how much it costs per unit of time to use a consumable resource like processors, memory, telescope time, generic resources that are charged per time used, etc. These resource metrics must first be multiplied by the usage duration in seconds before being added to the total charge. Value-Based Resource Charge Rates are of Type "VBR", with the Name being the resource name (such as Processors) and the given Rate (such as 1) being multiplied by the consumed resource value (such as 8).
Name-Based Resource — Name-Based Resource Charge Rates define how much it costs per unit of time to use a named resource like license, etc. The cost for the named resource must first be multiplied by the usage duration in seconds before being added to the total charge. Name-Based Resource Charge Rates are of Type "NBR", with the Name being the resource name (such as License), the Value being the resource value (such as matlab), and having the given Rate (such as 5).
Value-Based Usage — Value-Based Usage Charge Rates define how much to charge for metrics of total resource usage such as cputime, power consumed, generic resources or licenses that are charged flat fees per use, etc. These usage metrics are added to the total charge without being multiplied by the duration. Value-Based Usage Charge Rates are of Type "VBU", with the Name being the resource name (such as Power) and the given Rate (such as .001) being multiplied by the consumed resource value (such as 40000).
Name-Based Usage — Name-Based Usage Charge Rates define how much it costs to use a named attribute having a flat charge such as feature, etc. These usage metrics are added to the total charge without being multiplied by multiplied by the duration. Name-Based Usage Charge Rates are of Type "NBU", with the Name being the resource name (such as Feature), the Instance being the usage value (such as GPU), and having the given flat Rate (such as 200).
Value-Based Multiplier — Value-Based Multiplier Charge Rates are scaled multipliers which apply a multiplicative charge factor based on a numeric scaling factor. These incoming scaling factors are multiplied against the Value-Based Multiplier Rate and then are multiplied against the total of the resource and usage charges. Value Based Multiplier Charge Rates are of Type "VBM", with the Name being the multiplier name (such as Discount) and the given Rate (such as 1) being multiplied with the scaling factor (such as .5) before being multiplied to the total charge.
Name-Based Multiplier — Name-Based Multiplier Charge Rates are quality based multipliers which apply a multiplicative charge factor based on a quality of the usage such as quality of service, nodetype, class, user, time of day, etc. These charge multipliers are determined by a hash or lookup table based on the value of the usage attribute. These rates are multiplied against the total of the resource and usage charges. Name-Based Multiplier Charge Rates are of Type "NBM", with the Name being the multiplier name (such as QualityOfService), the Value being the quality instance (such as Premium), and having the given multiplier Rate (such as 2).
Value-Based Fee — Value-Based Fee Charge Rates define how much to charge for scaled or enumerated fees such as setup fees, shipping charges, etc. which should be added after the multipliers are applied. These fees are added to the total charge. Value-Based Fee Charge Rates are of Type "VBF", with the Name being the fee name (such as Shipping) and the given Rate (such as 25) being multiplied by the scaling or counted value (such as 4).
Name-Based Fee — Name-Based Fee Charge Rates define how much it costs to use a named attribute having a flat charge such as feature, etc. which should be added after the multipliers are applied. These fees are added to the total charge. Name-Based Fee Charge Rates are of Type "NBF", with the Name being the fee name (such as Zone), the Value being the fee value (such as Asia), and having the given flat Rate (such as 100).
By default, usage charges are calculated according to the following formula: For each value-based resource charge rate matching a usage property in the usage record data, a value-based resource charge is calculated by multiplying the usage property value by the charge rate and by the duration of time it was used. For each name-based resource charge rate matching a usage property name and value in the usage record data, a name-based resource charge is calculated by multiplying the charge rate by the duration of time it was used. For each value-based usage charge type matching a usage property in the usage record data, a value-based usage charge is calculated by multiplying the usage property value by the charge rate. For each name-based usage charge type matching a usage property name and value in the usage record data, a name-based usage charge is given by the charge rate. These value-based and name-based resource charges and the value-based and name-based usage charges are added together. Then, for each value-based multiplier charge rate matching a usage property in the usage record data, a value-based multiplier is calculated by multiplying the usage property value of the charge rate. For each name-based multiplier charge rate matching a usage property name and value in the usage record data, a name-based multiplier is given by the charge rate. The sum of the resource and usage charges is then multiplied by the product of the applicable value-based and name-based multipliers. Next, for each value-based fee charge type matching a usage property in the usage record data, a value-based fee charge is calculated by multiplying the usage property value by the charge rate. For each name-based ree charge type matching a usage property name and value in the usage record data, a name-based fee charge is given by the charge rate for that fee. Finally, these value-based and name-based fee charges are added to the multiplied usage charge subtotal.
In short, the formula can be represented by (((((Σ(VBR*value)+Σ(NBR)+Σ(MVBR*value))*duration)+(Σ(VBU*value)+Σ(NBU))) *Π(VBM*value)*Π(NBM))+(Σ(VBF*value)+Σ(NBF))).
(Undefined variable: MyVariables.!CopyrightInfo!)