In the coming months, we will remove charging tariffs from CWO. Instead, CWO will request the price from EV Hub for sessions which will be calculated by EV's own price engine. |
Tariff definition for consumption-based charging
For consumption-based charging, the price should be calculated by consumed energy and not by time. Since the tariff engine cannot handle decimals, we need to work with a unit that is small enough to avoid decimals.
The consumption is charged by kWh, but the tariff engine should calculate by Wh, thus a factor 1000 smaller.
Note: We might get rounding problems if the original tariff is specified with more than 3 decimals. This is by design today. |
Examples:
<TARIFFPACKAGE name="EV1" tariffPackageId="20221130">
<ticket ticketType="PrePay" ticketId="1" />
<ticket ticketType="PrePayCode" ticketId="2" />
<ticket ticketType="PostPayCheckIn" ticketId="5" />
<ticket ticketType="PostPayCheckInCode" ticketId="6" />
<ticket ticketType="PostPayCheckOut" ticketId="9" />
<ticket ticketType="PostPayCheckOutCode" ticketId="10" />
<stepButtons>
<!--For step buttons with type Time the added time will be rounded if the timevalue does not match an exact number of ticks -->
<!--button 2 and button 4 are not present on panel PostPay_Panel2. If you change them to positive values, add them in the panel-->
<stepButton buttonId="1" buttonValue="5" buttonType="Time" buttonText="+5 min" />
<stepButton buttonId="2" buttonValue="-5" buttonType="Time" buttonText="- 5 min" />
<stepButton buttonId="3" buttonValue="30" buttonType="Time" buttonText="+30 min" />
<stepButton buttonId="4" buttonValue="-30" buttonType="Time" buttonText="-30 min" />
</stepButtons>
<description row="0" col="0" string="EV Charging" />
<description row="0" col="1" string=" " />
<description row="1" col="0" string="Everyday" />
<description row="1" col="1" string="00 - 24" />
<description row="2" col="0" string="Normal" />
<description row="2" col="1" string="1 kr/5 @minutes" />
<description row="3" col="0" string="Fast" />
<description row="3" col="1" string="2 kr/5 @minutes" />
<description row="4" col="0" string="Ultra" />
<description row="4" col="1" string="3 kr/5 @minutes" />
<!-- Only for TFT UI (HelpPopup)-->
<description row="8" col="0" string=" " />
<description row="8" col="1" string=" " />
<!-- Only for TFT UI (HelpPopup)-->
<description row="9" col="0" string=" " />
<description row="9" col="1" string=" " />
<tariff>
PACKAGE "EV1";
max ticks = 500;
min ticks = 1;
INTERVAL "Always";
timepredicate = #Always;
tariffrate = linear 1 per 5 : tariffstep 1 duration #inf;
</tariff>
</TARIFFPACKAGE>
<TARIFFPACKAGE name="EndSession" tariffPackageId="20221134" group="EndEVSession">
<ticket ticketType="PrePay" ticketId="1" />
<ticket ticketType="PrePayCode" ticketId="2" />
<ticket ticketType="PostPayCheckIn" ticketId="5" />
<ticket ticketType="PostPayCheckInCode" ticketId="6" />
<ticket ticketType="PostPayCheckOut" ticketId="9" />
<ticket ticketType="PostPayCheckOutCode" ticketId="10" />
<stepButtons>
<!--For step buttons with type Time the added time will be rounded if the timevalue does not match an exact number of ticks -->
<!--button 2 and button 4 are not present on panel PostPay_Panel2. If you change them to positive values, add them in the panel-->
<stepButton buttonId="1" buttonValue="5" buttonType="Time" buttonText="+5 min" />
<stepButton buttonId="2" buttonValue="-5" buttonType="Time" buttonText="- 5 min" />
<stepButton buttonId="3" buttonValue="30" buttonType="Time" buttonText="+30 min" />
<stepButton buttonId="4" buttonValue="-30" buttonType="Time" buttonText="-30 min" />
</stepButtons>
<description row="0" col="0" string="EV Charing" />
<description row="0" col="1" string=" " />
<description row="1" col="0" string="Everyday" />
<description row="1" col="1" string="00 - 24" />
<description row="2" col="0" string=" " />
<description row="2" col="1" string="1 kr/5 @minutes" />
<description row="3" col="0" string=" " />
<description row="3" col="1" string=" " />
<description row="4" col="0" string=" " />
<description row="4" col="1" string=" " />
<!-- Only for TFT UI (HelpPopup)-->
<description row="8" col="0" string=" " />
<description row="8" col="1" string=" " />
<!-- Only for TFT UI (HelpPopup)-->
<description row="9" col="0" string=" " />
<description row="9" col="1" string=" " />
<tariff>
PACKAGE "EndSession";
max ticks = 500;
min ticks = 500;
INTERVAL "Always";
timepredicate = #Always;
tariffrate = linear 5 per 5 : tariffstep 1 duration #inf;
</tariff>
</TARIFFPACKAGE>