Tiered Tariffs

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tiered Tariffs

tonyk
Hello, i am playing around with tiered tariffs, wondering if i can make a tiered spec, with weekly TOU.
For example:

A spec which would have 2 tiered rates for mondays:

Rate r1 = new Rate().withTierThreshold(0).withMinValue(rateValue * PRICE_MULTIPLIER * MIDDLE_RATE_MULTIPLIER);
                 r1.withWeeklyBegin(1);
                 r1.withWeeklyEnd(1);

                 Rate r2 = new Rate().withTierThreshold(40).withMinValue(rateValue * PRICE_MULTIPLIER * MAX_RATE_MULTIPLIER);
                 r2.withWeeklyBegin(1);
                 r2.withWeeklyEnd(1);

I fill the rest of the rates for every other day and get an "incomplete coverage in multi rate tariff" status for my specification.

Found different information about it, some say it's possible to make tiered TOU tariffs, Tariff code seems to suggest it too (didn't look too far into it though)

Am i missing something or are specifications like i try to create just not supported.

Thanks in advance
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

grampajohn
Administrator
Hello, Tony -
tonyk wrote
Hello, i am playing around with tiered tariffs, wondering if i can make a tiered spec, with weekly TOU.
For example:

A spec which would have 2 tiered rates for mondays:

Rate r1 = new Rate().withTierThreshold(0).withMinValue(rateValue * PRICE_MULTIPLIER * MIDDLE_RATE_MULTIPLIER);
                 r1.withWeeklyBegin(1);
                 r1.withWeeklyEnd(1);

                 Rate r2 = new Rate().withTierThreshold(40).withMinValue(rateValue * PRICE_MULTIPLIER * MAX_RATE_MULTIPLIER);
                 r2.withWeeklyBegin(1);
                 r2.withWeeklyEnd(1);

I fill the rest of the rates for every other day and get an "incomplete coverage in multi rate tariff" status for my specification.

Found different information about it, some say it's possible to make tiered TOU tariffs, Tariff code seems to suggest it too (didn't look too far into it though)

Am i missing something or are specifications like i try to create just not supported.
It should work to use tiers and TOU together. There are a couple of test cases in TariffTests that exercise combinations of tiers and TOU rates.

I believe this example shows two rates that each have zero duration. They both start and end at 00:00 on Monday. You should specify the weeklyEnd as 2 in this example. That would make them end at 00:00 on Tuesday, which is when the next one would presumably start.

Does this make sense?

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

tonyk
Thanks. I will look into the TestCases when im home again.

I wondered about the .withWeeklyBegin(1) and .withWeeklyBegin(1) since i wanted to make the Rates for a single day only -> 1:1, 2:2, ...., 7:7
If i remember correctly the code in Rates was looking at the duration with a <= end, so i thought giving him the same day would work. How would i go about the sunday rate if your suggestion is the right one? Begin(7) --> End(1)


After some more testing i found out that if i give the same thresholds for each day (0 - 40) instead of variable (0 - var), the "incomplete coverage in multi rate tariff" message is gone. Is it not possible to use variable thresholds for every day?

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

grampajohn
Administrator
Tony and all -
tonyk wrote
.... How would i go about the sunday rate if your suggestion is the right one? Begin(7) --> End(1)
Correct. You can do overnight rates the same way, using the dailyBegin/dailyEnd values.
After some more testing i found out that if i give the same thresholds for each day (0 - 40) instead of variable (0 - var), the "incomplete coverage in multi rate tariff" message is gone. Is it not possible to use variable thresholds for every day?
This should work. I would have to see exactly what you are doing and what the results are in order to help you diagnose it.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

tonyk
Thanks again,
here is what im trying to do:

Rate r1 = new Rate().r1.withWeeklyBegin(1).r1.withWeeklyEnd(2).
                 r1.withTierThreshold(0.0).withMinValue(10);
                 
Rate rr1 = new Rate().rr1.withWeeklyBegin(1).rr1.withWeeklyEnd(2)
                 .rr1.withTierThreshold(110.0).withMinValue(10);
                 
Rate r2 = new Rate().r2.withWeeklyBegin(2).r2.withWeeklyEnd(7)
                 .r2.withTierThreshold(0.0).withMinValue(10);
                 
Rate r3 = new Rate().r3.withWeeklyBegin(2).r3.withWeeklyEnd(7)
                 .r3.withTierThreshold(120.0).withMinValue(10);


Here is the log from server:

144427 INFO  common.Tariff: tariff 200000069, tiers: [0.0, 110.0, 120.0]
144427 WARN  TariffMarketService: incomplete coverage in multi-rate tariff 200000069

Didn't find the exact same combination in the test class you mentioned, so not sure if it's actually possible to have a single rate both with a threshold and a TOU.

However if i make the thresholds even, 0 - 0 and 110 - 110, i get no warnings about the tariff.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

grampajohn
Administrator
Tony -
tonyk wrote
here is what I'm trying to do:

Rate r1 = new Rate().r1.withWeeklyBegin(1).r1.withWeeklyEnd(2).
                 r1.withTierThreshold(0.0).withMinValue(10);
                 
Rate rr1 = new Rate().rr1.withWeeklyBegin(1).rr1.withWeeklyEnd(2)
                 .rr1.withTierThreshold(110.0).withMinValue(10);
                 
Rate r2 = new Rate().r2.withWeeklyBegin(2).r2.withWeeklyEnd(7)
                 .r2.withTierThreshold(0.0).withMinValue(10);
                 
Rate r3 = new Rate().r3.withWeeklyBegin(2).r3.withWeeklyEnd(7)
                 .r3.withTierThreshold(120.0).withMinValue(10);
This is incomplete because day 7 has no coverage. You need to cover the interval [7-1).

Other points:
- you don't need to specify a tier threshold of 0.0 - that's the default.
- I assume this is not actual Java code. That would be more like

Rate r1 = new Rate().withWeeklyBegin(1).withWeeklyEnd(2).withMinValue(10);

Also, if this is a consumption tariff, the minValue should probably be negative, but less negative than the value in the default consumption tariff which (if memory serves) is -0.5 / kWh. For a production tariff, this would be an extremely attractive rate, but you would likely go broke quickly because you cannot sell energy for that price.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

tonyk
Hi and thanks.
Yes you are right, it wasn't real java code and minvalues are positive because i threw in some random value, just to try and get the tariff to get published.


Your suggestion to cover Sunday with a [7 - 1] rate sadly didn't help.

Having [1 - 2], [2 - 7], [7 - 1] or [1 - 2], [2 - 1] didn't help with that warn message.

The only way my tariff gets recognized by the server is still giving all rates the same threshold,
if i give all rates a threshold of lets say 120 instead of (110, 120, 130), the tariff gets published even with sunday not covered ( [1 - 2], [2, 7] rate intervalls).



Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

Porag
Hi

Is it possible to make a single tariff with both hourbased TOU rates and Tiered usage rates?

Thanks
Porag
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tiered Tariffs

grampajohn
Administrator
Porag wrote
Is it possible to make a single tariff with both hourbased TOU rates and Tiered usage rates?
Yes, but I cannot guarantee that all combinations will work. I would be interested in seeing the exact details of ones that do not. However, I believe that if the server returns a TariffStatus of SUCCESS, then it should be fine. You should be able to test it yourself by trying to create a Tariff from your TariffSpecification - that's the point where all the rates are mapped out.

Cheers -

John
Loading...