Sunday, 10 April 2016

Oracle CC&B - Implementation of Electric Vehicle Charging and Billing Requirements


Electric Vehicle Charging – Billing System Requirements: 

Now-a-days consumers are turning to emerging transportation options that are more fuel-efficient and environmentally safer. This grows the market for electric and plug-in hybrid vehicles. Electric Vehicle Charging and Billing requires the utilities to support the business processes with special services to their customers which include the ability to:

  • Customer enrolls and registers for Electric Vehicle charging programs with the utility (Or Customer's Retailer). Assume the Customer uses a unique Card Id at the electric charging station while charging his electric vehicle.
  • Electric Vehicle Charging points and utility/retailer establish/re-establish communications session at the time of charging. The charging point measures the amount of electricity used to charge the vehicle and the time (Time Of Use) taken to charge the vehicle.

  • Provide EV charging and other status data to customer information to utility/retailer. Detail of the charging even will be sent to retailer. The details would include the measurement data, time of use data, Customer’s Card Id and Charging point identifier. 
  •  Utility/retailer accurately bill the Electric Vehicle customers according to their rates / programs / time-of-use.  
  • Utility/retailer provides customer access to Electric Vehicle charging and status information.
This post describes how Electric Vehicle charging business process could be implemented using Oracle Utilities CC&B system. The below example is tried out in V 2.4.x

The customers are setup in Oracle CC&B using traditional V-Setup (Person, Account, Service Agreement, Service point and premise). In this case, each customer would be having a fixed service point where the meter is installed and measured at a per-defined interval.

In case of Electric Vehicle Charging, Electric Vehicle Charging Service Agreement will NOT be linked to a Service Point as there is no fixed Service point (Charging point) for the customer. Electric vehicle can be charged from as many charging points/station. So, a characteristic will be used to capture the customer's card Id (or a unique Identifier) on the EV charge service agreement. Electric Vehicle Charging point will be recorded as geographic value on a Service point (SP).

Electric Vehicle – Billing Data Setup in CC&B system:

Electric Vehicle – Master Configuration:
  • Electric Vehicle Billing master configuration is used to capture the adjustment type to use when computing EV charges. The adjustment type must reference the FT creation algorithm for the distribution code to use from the adjustment's calculation lines (refer to algorithm C1-ADJT-CL).
  • It will also define the default interval size for the charge events received. This will be used when a TOU based interval price applied for a specific bucket of TOU bucket.


The Electric Vehicle Charging event processing and billing processes use the below CC&B entities. 
  •  Customer: Customers in CC&B will be defined using standard person + account setup.
Person:

Account:

  • Service Agreement: Unlike general CC&B Service Agreements, Electric Vehicle Charging Service Agreement will NOT be linked to a Service Point. A characteristic will be used to capture the customer's card Id on the EV charge service agreement. The EV charge service agreement will reference a rate schedule responsible for TOU mapping and pricing of the charge event.
Service Agreement:




Service Agreement – Rate Information: The EV charge service agreement will reference a rate schedule responsible for TOU mapping and pricing of the charge event.

Service Agreement – Characteristics: A characteristic will be used to capture the customer's card id on the EV charge service agreement. 


  • Rate Schedule: The rate engine attached to SA will be used to calculate the EV changes.



  
     Usage Calculation Group on the rate schedule (Electric Vehicle)

  • Electric Vehicle Usage BO (CI_EVBillingUsageRequest): This business object’s life cycle algorithm will invoke the rate engine to compute customer charge for specific charging event by passing the measurement data of the EVC event. CI_EVBillingUsageRequest business object contains the business processes (BO Life cycle algorithms) of a charge event request received from a charging point/station. It will also apply a TOU map to the charge event interval data and computes the resultant TOU usage charge. An EVC adjustment will be created to capture the charges.
  •  Adjustment: Customer charges are created as Adjustments in CC&B system based on the Adjustment type configured in the EV-Master Configuration.



  • Billing: The adjustments created for each Electric Vehicle Charging events will be swept into the next bill generate for the customer.



Upload EVC usage events into CC&B system:
  • EV-Charging event data can be brought into CC&B system using XAI Inbound services or Inbound Web Services (IWS).
  • Once the EV-Charging events are loaded into CC&B, they will be created as Usage records (ie, CI_EVBillingUsageRequest business object instances).


  • Each EV-charging event contains the customer Card Id. It will be used to link the usage record to corresponding Service agreements as each EVC SA will have ‘Electric Vehicle Card Id’ as characteristic in CC&B system. 
  • Each EV-charging event contains a charging point identifier. This will be recorded as geographic value on a Service point (SP) in CC&B system.
 



The following are CC&B (V2.4) new product enhancements introduced to cater the Electric vehicle billing functionality:

  • Adjustment functionality enhanced to add adjustment lines to be posted to general ledger. This creates financial transactions for adjustments to build the general ledger details using calculation lines for calculated adjustments.
  • New Java based Rate engine will be used to compute the Electric vehicle usage charges. This allows interval data to be passed to the rate engine and calculation rule applies the time of use map to interval data to compute the usage charge.
  • New Time of Use mapping functionalities (similar to the TOU Maps available in Oracle Utilities MDM product) are used to compute the TOU based price.  

Sunday, 3 April 2016

CC&B - Call Google Map API: Find and Display Premise Address on Google Map

This post describes how to use Google Map APIs to find and display CC&B premise address on Google Map. 


Google Maps allows us to display maps on web applications. Using Google Maps API, we can customize maps and the information to be displayed on maps. The below example depicts the steps to create an OUAF Zone to display the premise on Google map. This example is tried out using CC&B 2.4.0.3 (SP3) version.

Zone: Create a Zone with Zone Type “F1-MAPEXPL”. Specify the Service Script, UI Map and XML Parameter to pass. 


UI Map: Create a UI Map of type "Complete HTML Document"



UI Map Schema: Create relevant HTML/Java Script to point and display the Premise on Google Map. Refer to http://www.w3schools.com/googleapi/google_maps_basic.asp for more details about how to create HTML/Java Script to call Google Map APIs.
 

Test UI Map: Test the UI map by having a sample XML within the schema. Click on “Test UI Map” link to test the UI Map script.

Service Script: Create a Service Script as defined in the Zone. This Service Script is used to call a Business service.

Service Script – Step (tab): Invoke Business service


Service Script Schema: Include the business service in the schema.



Business Service: Create a Business service. Define Premise maintenance Service as the service name.
 Business Service Schema: Define Premise Id, Address1, Postal and City attributes as part of the schema. These elements will be used in the UI map to pass to the Google map API.


Control Central Account Information Portal: Add the newly created Zone to Control Central Account Information Portal and define ‘override sequence’ if required.

Portal preference page: Make sure the Google map Web service Zone is displayable in Portal  preference page.

Search for a Premise and Go to Account -> Control Central -> Account Information tab. The address, Postal and City will be populated in ‘Google Map Webservice Zone’. Click on ‘Show in Google Map’ button, the premise address will be found and displayed on Google map.


Sample HTML used in UI Map Schema:

<html>
<head>
<title>Google Maps: Display the Premise Addredd using Geocoding</title>
<link type="text/css" rel="stylesheet" href="/cisDisabled.css" />
<link type="text/css" rel="stylesheet" href="/cisEnabled.css" />

<style type="text/css">
.main-font { font-family: verdana; font-size: 11px; color: #000000; font-weight:bold; } .small-font { font-family: verdana; font-size: 09px; color: #000000; font-weight:bold; } .orange-font { font-family: verdana; font-size: 11px; color: #FF6600; font-weight:bold; } .orange-button { background-color: #FF6600; border:1px solid #333; color:#000000; padding:0px 5px 0px 5px; margin:0px 4px 1px 4px; cursor:hand; font-weight:bold; border-color:#90a6bd #333 #333 #90a6bd;}
</style>

<script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAA0Va3Mop5Baby4Q4BEUw7oxRvacbZZx09Jkta6D2TwAxMXh15IRQrnT-twdjmJAJjizCHolActhTuaA" type="text/javascript">
</script>

<script type="text/javascript">


GMap2.prototype.hoverControls = function(opt_noCloseIw){
  var theMap = this;
  theMap.hideControls();
  GEvent.addListener(theMap, "mouseover", function(){
    theMap.showControls();
  });
  GEvent.addListener(theMap, "mouseout", function(){
    theMap.hideControls();
  });
  theMap.libraryCard = 19162;
}
GMap.prototype.hoverControls = GMap2.prototype.hoverControls;

    var map = null;
    var geocoder = null;
    function initialize()
    {     if (GBrowserIsCompatible())
        { map = new GMap2(document.getElementById("map_canvas"));
               
                geocoder = new GClientGeocoder();
        }
    }
    function showAddress(address)
    { if (geocoder)
        { geocoder.getLatLng( address, function(point)
            { if (!point) { alert(address + " not found"); }
             else { map.setCenter(point, 16);
                      map.hoverControls();
                      map.setUIToDefault();
                      var marker = new GMarker(point);
                      map.addOverlay(marker);
                      marker.openInfoWindowHtml(address);
                  }
            }
         );
         }
    }
 </script>
</head>
    <body class="oraZoneMap" onload="initialize()" onunload="GUnload()">
        <form action="#" onsubmit="showAddress(this.address1.value+' '+this.postal.value+' '+this.city.value); return false">
            <table align="center" cellspacing="4" width="100%">
            <tr>
                <td align="center">
                    <input name="address1" type="text"    class="oraInput"         oraField="premiseInfo/address1" />
                    <input name="postal"     type="text"    class="oraInput"         oraField="premiseInfo/postal"/>
                    <input name="city"        type="text"    class="oraInput"         oraField="premiseInfo/city" />
                    <input name="send"      type="submit" class="button" value="Show In Google Map" />
                </td>
            </tr>
            <tr>
                <td align="center">
                    <div id="map_canvas" style="width:1000px;height:500px" />
                </td>
            </tr>
            </table>
        </form>
    </body>
    <xml>

    </xml>
</html>