13.0 Managing Charge Rates

Charge Rates establish how much to charge for usage. There are nine main types of charge rates: Value Based Resources, Name Based Resources, Value Based Usage, Name Based Usage, Value Based Multipliers, Name Based Multipliers, Value Based Fees, Name Based Fees and Multi-dimensional Value Based Resources.

By default, usage charges are calculated according to the following formula: For each Value Based Resource Charge Rate applicable to a given usage, a value-based resource charge is calculated by multiplying the amount of the resource used by the amount of time it was used, multiplied by the charge rate for that resource. For each Name Based Resource Charge Rate applicable to a given usage, a name-based resource charge is calculated by multiplying the charge rate for that named resource by the amount of time it was used. For each Value Based Usage Charge Type applicable to a given usage, a value-based usage charge is calculated by multiplying the amount of the usage by the charge rate for that usage. For each Name Based Usage Charge Type applicable to a given usage, a name-based usage charge is given by the charge rate for that usage. For each Multi-dimensional Value Based Resource Charge Rate applicable to a given usage, a value-based resource charge is calculated by multiplying the amount of the resource used by the amount of time it was used, multiplied by the charge rate for that resource. These value-based, name-based and multi-dimensional value-based resource charges and the value-based and name-based usage charges are added together. Then, for each Value Based Multiplier Charge Rate applicable to the usage, a value-based multiplier is calculated by multiplying the amount of the multiplier by the charge rate for that multiplier. For each Name Based Multiplier Charge Rate applicable to the usage, a name-based multiplier is given by charge rate for that multiplier. 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 applicable to a given usage, a value-based fee charge is calculated by multiplying the amount of the fee by the charge rate for that fee. For each Name Based Fee Charge Type applicable to a given usage, 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 total usage charge.

In short, the formula can be represented by (((((Σ(VBR*value)+Σ(NBR)+Σ(MVBR*value))*duration)+(Σ(VBU*value)+Σ(NBU))) *Π(VBM*value)*Π(NBM))+(Σ(VBF*value)+Σ(NBF))).

13.1 Creating ChargeRates

To create a new charge rate, use the command gmkrate:

gmkrate -T charge_rate_type -n charge_rate_name [-J charge_rate_instance] [-d description] [-- debug] [-?, --help] [--man] [--quiet] [-v, --verbose] [-V, --version] {[-z] charge_rate_amount}

Note Additional detail for this command can be found in the man page by issuing gmkrate --man at the command line.
Example 1. Creating a value-based resource charge rate
$ gmkrate -T VBR -n Memory -z 0.001
Successfully created 1 charge rate
Example 2. Creating a name-based resource charge rate
$ gmkrate -T NBR -n License -J Matlab -z 5
Successfully created 1 charge rate
Example 3. Creating a couple of value-based usage charge rates
$ gmkrate -T VBU -n Power -z 0.001
Successfully created 1 charge rate
$ gmkrate -T VBU -n CpuTime -z 1
Successfully created 1 charge rate
Example 4. Creating a name-based usage charge rate
$ gmkrate -T NBU -n Feature -J GPU -z 200
Successfully created 1 charge rate
Example 5. Creating a value-based multiplier charge rate
$ gmkrate -T VBM -n Discount -z 1
Successfully created 1 charge rate
Example 6. Creating a couple of name-based multiplier charge rates and a default rate
$ gmkrate -T NBM -n QualityOfService -J Premium -z 2
Successfully created 1 charge rate
$ gmkrate -T NBM -n QualityOfService -J BottomFeeder -z 0.5
Successfully created 1 charge rate
$ gmkrate -T NBM -n QualityOfService -z 1
Successfully created 1 charge rate
Example 7. Creating a value-based fee charge rate
$ gmkrate -T VBF -n Shipping -z 25
Successfully created 1 charge rate
Example 8. Creating a name-based fee charge rate
$ gmkrate -T NBF -n Zone -J Asia -z 200
Successfully created 1 charge rate
Example 9. Creating a couple of multi-dimensional value-based resource charge rates
$ gmkrate -T Disk -n User -J dave -z 0.2
Successfully created 1 charge rate
$ gmkrate -T Disk -n User -J michael -z 0.5
Successfully created 1 charge rate
Example 10. Creating some value-based resource charge rates ranges and a default
$ $ gmkrate -T VBR -n Processors -J 1-4 -z 2
Successfully created 1 charge rate
$ gmkrate -T VBR -n Processors -J 5-8 -z 1.5
Successfully created 1 charge rate
$ gmkrate -T VBR -n Processors -z 1
Successfully created 1 charge rate

(Undefined variable: MyVariables.!CopyrightInfo!)