How Precision is Calculated While Doing The Rating in BRM (Doc ID 1352327.1)

Last updated on MARCH 07, 2017

Applies to:

Oracle Communications Billing and Revenue Management - Version 7.3.1.0.0 to 7.5.0.0.0 [Release 7.3.0 to 7.5.0]
Information in this document applies to any platform.
***Checked for relevance on 27-Jun-2014***
***Check for Relevance on 7th March 2017***

Goal


Consider the following scenario

In pin.beid file

840 0 10 0.0000000001 0.0000000005 0.0000000004 USD $ * 0 0 1 US Dollar
840 0 10 0.0000000001 0.0000000005 0.0000000004 USD $ * 1 0 1 US Dollar
840 0 10 0.0000000001 0.0000000005 0.0000000004 USD $ * 2 0 1 US Dollar
840 0 10 0.0000000001 0.0000000005 0.0000000004 USD $ * 3 0 1 US Dollar
===================
1000095 0 10 0.0000000001 0.0000000005 0.0000000004 YES MIN * 0 0 1 Free Seconds
1000095 0 10 0.0000000001 0.0000000005 0.0000000004 YES MIN * 1 0 1 Free Seconds
1000095 0 10 0.0000000001 0.0000000005 0.0000000004 YES MIN * 2 0 1 Free Seconds
1000095 0 10 0.0000000001 0.0000000005 0.0000000004 YES MIN * 3 0 1 Free Seconds
===================

In pin.conf

rating_quantity_rounding_scale 10

=========================

Price Plan
-----------------------------


service-- /service/ip
----------------------------

Events Measured By
--------------------------------------------------------------------------
1.Monthly Cycle Forward Event Occurrence
2.Session Event Duration


Monthly Cycle Forward Event
----------------------------------------
Resource ID Scaled Amount Units
------------------ ---------------------- --------------------
Free Seconds -1000 none

====================

Session Event
---------------------------

Quantity Discount Brackets
=====================

Resource Balance :- Free Second

Rate
-------

No Minimum-0.00000
--------------------------------

Resource ID Scaled Amount Units
----------------- --------------------- -------
US Dollars[840] 0.00000 Minutes
Free Seconds 1.00000 Minutes

0.00000-No Maximum
------------------------------
Resource ID Scaled Amount Units
----------------- --------------------- -------
US Dollars[840] 1..00000 second

==================================================================================

Minimum Event quantity for Session Event:-10 seconds

Create an account with this plan .

Do the usage

sample_act -v -e session -l xxxxxx -d 60000 -s /service/ip

===============================================

Analysis
-------------

In the planĀ  1000 Min free is granted through MCF.
The scaled impact of the NCR (Free Seconds) is 1/60 per second. But this is getting rounded off to 0.016667 (actual value = 0.016666666666666666666666666666667)
So when a usage of 60000 sec is passed, there should not be any charges applied.
Because of this rounding the quanity which can be accommodated in -1000 mins becomes 59999.999880 seconds which should be more , because 1000 min should be 60000 secs

Below is the log snippets

D Sat Oct 1 22:14:06 2011 agana cm:23532 fm_rate_rate.c:896 1:agana:sample_act:23531:1:161:1313559390:2
Total scaled amount : 0.016667
D Sat Oct 1 22:14:06 2011 xxxx cm:23532 fm_rate_rate.c:898 1:xxxx:sample_act:23531:1:161:1313559390:2
Total Fixed amount : 0.000000
D Sat Oct 1 22:14:06 2011 xxxx cm:23532 fm_rate_rate.c:921 1:xxxx:sample_act:23531:1:161:1313559390:2
ratable_qty_bracketp : [0.000000,60000.000000]
D Sat Oct 1 22:14:06 2011 xxxx cm:23532 fm_rate_utils.c:340 1:xxxx:sample_act:23531:1:161:1313559390:2
Amount to be subtracted : -1000.000000
D Sat Oct 1 22:14:06 2011 agana cm:23532 fm_rate_rate.c:931 1:agana:sample_act:23531:1:161:1313559390:2
step_bracket - fixed_amt : [-999999999.000000,1000.000000}
D Sat Oct 1 22:14:06 2011 xxxx cm:23532 fm_rate_utils.c:373 1:xxxx:sample_act:23531:1:161:1313559390:2
Amount to be divided with : 0.016667
D Sat Oct 1 22:14:06 2011 xxxxx cm:23532 fm_rate_utils.c:397 1:xxxxx:sample_act:23531:1:161:1313559390:2
Bracket After division : [-999999999.000000,59999.999880}

When specified precision value for the Non Currency
resource is 10 in pin_beid file then why it isĀ  (NCR) is getting rounded off to 6
decimal places?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms