Please enable JavaScript to view this site.

CWT Software Configuration Handbook 4.40

Element        Path: <cwt><TARIFFPACKAGE><tariff>

The tariff element contains the actual tariff definition of a tariff package that is used for calculation of the price of an article sold in the CWT. Please see Tariff Introduction and Tariff reference for details on how tariffs are defined with a special language.

When calculating cost and time it is inevitable that rounding must be performed. The default and the one used by majority intallations rounding rule is called PayForWholeUnit and basically round down the time and round up the cost.

attribute

roundingRule

Value:PayForWholeUnit,
UnitsUpOrTicksDownWhenDecimal,
UnitsUpTicksDownCheapestForLinearRates
Default:PayForWholeUnit
Description:PayForWholeUnit: round down the time and round up the cost
UnitsUpOrTicksDownWhenDecimal: round up the time and round down the cost
UnitsUpTicksDownCheapestForLinearRates: round up the time and round down the cost and find the lowest cost for given time

Limitations:  when using other rounding rules than PayForWholeUnit:

Some payment labels are undefined like LeftToPayUntilMinReachedLabel

Over payment is undefiend

Topup is undefined

Post Payment is undefined

Example:

<TARIFFPACKAGE ...>
 ...
<tariff roundingRule="UnitsUpTicksDownForLinearRates">
   PACKAGE "Name";
   max ticks = 500;
   min units = 8;
 
   INTERVAL "Mon-Sat";
   timepredicate = "(($daytype=0) and ($hour in [09 to 18[)) or (($daytype=1) and ($hour in[09 to 15[))";
   tariffrate = linear 800 per 60 : tariffstep 1 duration #inf;
 
   INTERVAL "Free" : priority 0;
   tariffrate = flat 0 until end of interval;
</tariff>
</TARIFFPACKAGE>