Skip to content

Cost Data Calculations

The entire cost data calculation is splitted into several stages. In KTC Server there are 5 job types and each of them is responsible for generation certain cost data. In this document you will get familiar with cost data calculation by tariffs on meters and sub-meters, summing tariff costs on meters, calculation of VAT and aggregation cost data from meters to parent summary nodes. There is one more way how cost data appear in the system and actually this is invoice import, which also will be described in this document. For more convenient handling connection between meters and tariffs we recommend to use meter packs, so please find more information about them in the sections below.

User manual

Field processors

After installation of KTC Server all cost field processor are automatically created in Data Field Processors data source. Each of them is responsible for certain part of cost data calculation. Here is a full list of field processors default names and their types that we use in cost calcuclation:

  • Cost Calculator with type Analyser Cost Calculator designed for calculation meter cost values based on the consumption data and corresponding tariff. You can read more about it here Cost Field Processor

  • Sub-meter Cost Calculator with type Analyser Sub-meter Cost Calculator designed for distribution cost values from base meter to sub-meter and calculation sub-meter cost data by tariffs connected to them on the consumption data and corresponding tariff

  • Total Cost Calculator and type Analyser Total Cost Calculator designed for summing up on meter all cost values generated by different tariffs. You can read more about it here Total Cost Field Processor

  • Total Cost Vat Calculator with type Analyser Total Cost Vat Calculator designed to calculate VAT part for cost values

  • Cost Summarizer with type Analyser Cost Summary Calculator designed for aggregation all month cost fields from meter level to upper summary nodes. You can read more about it here Cost Summarizer

Calculation jobs

In order to calculate data by using each of mentioned field proccesor you have to create calculation job for each data processor. It can be done in Jobs data source by creating under root node corresponding job type. For all cost calcuclation except Cost Summarizer jobs it supposed to use Field Sink Read Job. When creating Cost Summarizer job you have to set its type Chunked Field Sink Read Job. In jobs settings should be always configured field sink for readout and for data storage. Also it is required to set appropriate field processor and filter by group reference or nodes.

If you want to create automatically whole cost calculation job sequence that includes all cost calculation jobs it can be done from Customers data source. In Clayster Managment tool call context menu for selected customer and choose Generate Analyser Caclculation Jobs

Once jobs creation finished in Jobs data source should appear customer job sequence that includes aslo sequence 8.Cost Caclculations with appropriate customer name. Under cost calcuclation sequence there are all cost calculation jobs that is needed in order to have cost data generated. Each job in this order expects that its input data already pre-calculated by previous job.



Cost Calculations

Calculation meter Costs by tariffs

Before executing calculation meter costs by tariff you've to create tariff itself. In Tariffs data source under root node create new tariff and add under it sub-tariff node with start date and cost value.

Now it is required to connect meter nodes to just created tariff, it can be done in Meters Tariffs data source. Once tariff is created in meters tariffs data source should be also created tariff reference, if it doesn't exist you can add it from context menu on root node. Under tariff reference node should be created Meters Tariffs node with start date and connected group, meter or meter pack node. You can read more about meter packs creation in this section Meter pack nodes



Setup calculation meter costs by tariffs

  • In Data Field Processors data source create a new Cost field processor or use existing one with name Cost Calculator

  • In Jobs data source create a new Field Sink Read Job which suppose to read data from ProcessedData_Month or Proxy field sink and process data using Cost Calculator field processor. For data storage in calculation job should be set ProcessedData_Month or Proxy field sink. In the job settings set a proper customer node reference on tab 'Filter'. Standard customer job sequence, which includes all cost jobs, could be generated from context menu for each customer in customer data source.



Example

Open Clayster Management tool and Setup cost calculation job. Follow next steps in order to prepare data and settings to get cost fields created.

  1. Import or add manually consumption fields on meter

  2. Define Tariff

  3. Connect meters to Tariff by adding group reference or meter nodes

  4. Execute cost calculation job with show result option

  5. Check if all Cost fields are created

Calculation sub-meter costs

For sub-meter there are fews ways of calculating cost data. First of all sub-meter can be connected to tariff as normal meter, in this case cost will be calculated according to tariff. When sub-meter is not connected to tariff directly there are 3 options on base meter, which defines how cost will be distributed from base meter to sub-meter

  • In case if method selected Not at all then cost values will not be distributed

  • when selected Split by consumption it means that Fixed and Running cost values from base meter will be distributed with taking into account consumption proportion set on each submeter

  • when selected Split by area it means that only Fixed cost values from base meter will be distributed with taking into account area proportion, which is calculated as a part from total area of all sub meters



Setup calculation sub-meter costs job

  • In Data Field Processors data source create a new Cost field processor or use existing one with name Sub-meter Cost Calculator

  • In Jobs data source create a new Field Sink Read Job which suppose to read data from ProcessedData_Month or Proxy field sink and process data using Cost Calculator field processor. For data storage in calculation job should be set ProcessedData_Month or Proxy field sink. In the job settings set a proper customer node reference on tab 'Filter'. Standard customer job sequence, which includes all cost jobs, could be generated from context menu for each customer in customer data source.

  • Execute job **Calculate sub-meter Costs ** with show result option and check if calculated data correctly calculated according to selected cost split method on base meter or tarrifs attached to sub meter.

Total cost calculation

Total Cost calculation sums up on meter all cost values generated from different tariffs by job ** Calculate meter Costs by Tariffs**.

Lets consider we have cost fields calculated by Fixed and Running tariffs for January 2020:

FixedCost, by EL-Fixed-Month tariff, Month, EL ProdType/EL Util = 105 Kr

RunningCost, by EL-Running-tariff, Month, EL ProdType/EL Util = 650 Kr

The Total Cost filed processor will sum those values and create new fields for certain meter:

Total FixedCost, EL ProdType/EL Util = 105 Kr

Total RunningCost, EL ProdType/EL Util = 650 Kr

and

Total Cost, EL ProdType/EL Util = 755 Kr

Setup total cost calculation job

  • In Data Field Processors data source create a new Total Cost field processor or use existing one with name Total Cost Calculator

  • In Jobs data source create a new Field Sink Read Job which suppose to read data from ProcessedData_Month or Proxy field sink and process data using Total Cost Calculator field processor. For data storage in calculation job should be set ProcessedData_Month or Proxy field sink. Standard customer job sequence, which includes all cost jobs, could be generated from context menu for each customer in customer data source.

  • On the Content tab make sure that option Subresults may be divide is NOT checked and Read nodes from bottom and up is checked, otherwise the results might not be correct.

  • You should set filter by customer group node or appropriate summary node:

  • Select instance of Total Cost Field Processor in Processors tab:

  • In order to have better performance in Advanced Filter tab select "Include numeric values" only:



Example

Open Clayster Management tool and Setup total cost calculation job. Follow next steps in order to precalculate input data to get total cost fields created by total cost field processor.

  1. Calculate meter Cost fields (see Cost Field Processor section)

  2. Execute job with show result option

  3. Check if total costs calculated correctly

Total cost VAT calculation

Total Cost VAT calculation generates Total VAT fields from existsing cost fields

Setup total cost VAT calculation job

  • In Data Field Processors data source create a new Total Cost field processor or use existing one with name Total Cost VAT Calculator

  • In Jobs data source create a new Field Sink Read Job which suppose to read data from ProcessedData_Month or Proxy field sink and process data using Total Cost Calculator field processor. For data storage in calculation job should be set ProcessedData_Month or Proxy field sink. Standard customer job sequence, which includes all cost jobs, could be generated from context menu for each customer in customer data source.

  • On the Content tab make sure that option Subresults may be divide is NOT checked and Read nodes from bottom and up is checked, otherwise the results might not be correct.

  • You should set filter by customer group node or appropriate summary node

  • Select instance of Total Cost VAT Field Processor in Processors tab

  • In order to have better performance in Advanced Filter tab select "Include numeric values" only:



Cost month summary

Cost Summary field processor is designed for aggregation all month cost fields from meter level to upper summary nodes. It generates the same list of cost fields that exists on the meter and sums up meter values to top-level group nodes.

Setup cost month summary calculation job

  • In Data Field Processors data source create a new Cost Summary field processor or use existing one with name Cost Summarizer.

  • In Jobs data source create a new Chunked Field Sink Read Job which suppose to read data from ProcessedData_Month or Proxy field sink and process data using Cost Summary Calculator as batch field processor. For data storage in calculation job should be set ProcessedData_Month or Proxy field sink. Standard customer job sequence, which includes all cost jobs, could be generated from context menu for each customer in customer data source.

  • On the Content tab make sure that option Subresults may be divide is NOT checked and Read nodes from bottom and up is checked, otherwise the results might not be correct.

  • In the Filter tab you need to select the appropriate customer group or summary node. That is important step because field processor will process all summary nodes only and sum up data from underlaying meters.

  • Also in order to have better performance we recommend to set Field filter to Cost and Impact. This will allow to readout only those fields from summary nodes, for instance when job will be processing summary node the Cost Summary field processor will find all underlying meters and do read out all Cost fields for them.

  • In the processors tab set Cost Summarizer as batch field processor.

  • In the sinks select Proxy or ProcessedData_Month as batch field sink, all aggregated fields will stored there. By default should be selected the same sink as for data readout.

  • To improve performance and not read unnecessary data it is recommended to open advanced filter tab and include NumericFields only, because cost fields are NumericFields

  • Execute job and check results by performing readout on summary node from corresponding field sink. Please note that after calculculation finished none of results will be shown because of job type Chunked Field Sink Read Job, it is not implemented in this version.

Meter pack nodes

To simplify mapping meter to tariffs there is a possibility to create a pack of meters which can be attached to Tariffs or Tariff Group In order to create meter pack you have to open Topology data source, then expand Analyser Meters Root node and select Customer Topology Node. Call context menu on it and choose Add->Meters pack node. It is required to fill ID and set production type in the tab Analyser

Next you have to add meters to just created meter pack. Edit meter pack and switch to tab Nodes, here you can add only meters that matches by production type set for meter pack, add them and save changes.

Now you can connect meters pack in Meters Tariffs data source, it can be done while modifying MetersTariffs node see snapshot below. After chnages saved run Calculation meter Costs by tariffs and check if cost fields created for all meters from meter pack that have consumption data



Deployment

Cost field processors and standard cost calculation job sequence is a part of **KTC Server ** in order to install it administrator needs perform deployment of the zip package and configure it according to the hosting model by following installation instructions