This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision  Previous revision  
user:reports:dat:fuel:consume_fuel [14/05/2018 07:10] tagr [Consumption calculation] 
user:reports:dat:fuel:consume_fuel [06/10/2018 14:21] (current) tagr 


Line 1:  Line 1:  
{{indexmenu_n>6}}  {{indexmenu_n>6}}  
  ======Consumption calculation======  +  ======Consumption Calculation====== 
:!: //Attention!//\\ In order to calculate the consumption, the processed data is used (it is done on the //[[./prepare_dat]Data preparation]]// and //[[./filter_datFiltration]]// steps).  :!: //Attention!//\\ In order to calculate the consumption, the processed data is used (it is done on the //[[./prepare_dat]Data preparation]]// and //[[./filter_datFiltration]]// steps).  
Line 11:  Line 11:  
*Reports → Report Template Properties → Options → Exclude thefts from fuel consumption;  *Reports → Report Template Properties → Options → Exclude thefts from fuel consumption;  
*Special Case: filling/theft is sliced with one of the interval frontiers.  *Special Case: filling/theft is sliced with one of the interval frontiers.  
  
=====Replace invalid values with math consumption=====  =====Replace invalid values with math consumption=====  
... → 'Fuel level sensors' block → 'Replace invalid values with math consumption'  ... → 'Fuel level sensors' block → 'Replace invalid values with math consumption'  
  
  In case of values falseness, they are replaced with the values calculated mathematically. The mathematical calculation uses the data indicated in the properties of ignition, relative and absolute engine hours sensors (the //Consumption, l/h// option) and the value of the engine efficiency sensor.  +  In the case of values falseness, they are replaced with the values calculated mathematically. The mathematical calculation uses the data indicated in the properties of ignition, relative and absolute engine hours sensors (the //Consumption, l/h// option) and the value of the engine efficiency sensor. 
Algorithm:  Algorithm:  
  Let Vinit to be the initial volume for the interval (what interval is taken is defined in the specified report template), Vfinal — the final volume. Then the difference is calculated between them with respect to fillings volume, i. e. Vinit – Vfinal + Vfill. In case the calculated value is equal to or greater than zero, the interval is marked as correct. But if the result value is negative, the consumption is treated as falsy and math consumption takes place.  +  Let Vinit be the initial volume for the interval (what interval is taken is defined in the specified report template), Vfinal — the final volume. Then the difference is calculated between them with respect to fillings volume, i. e. Vinit – Vfinal + Vfill. In case the calculated value is equal to or greater than zero, the interval is marked as correct. But if the result value is negative, the consumption is treated as falsy and math consumption takes place. 
Line 28:  Line 27:  
Switch it off when a discharge is authorized, for instance, agriculture vehicles are filled with refueller and the user wishes to know the total turnover of spent fuel during the specified period of time.  Switch it off when a discharge is authorized, for instance, agriculture vehicles are filled with refueller and the user wishes to know the total turnover of spent fuel during the specified period of time.  
  =====Special Case: filling/theft is sliced with one of interval frontiers. What is the way filling/theft being detected?=====  +  =====Special Case: filling/theft is sliced with one of the interval frontiers. What is the way filling/theft being detected?===== 
Let us consider the case on the example of filling. Assume we have sliced the filling with the initial frontier of the interval. As described in the //[[./detect_fillings#special_casehow_a_filling_is_processedHow a filling is processed]]// section, a filling timestamp is defined dynamically according to the unique case. Since we have sliced the filling with an interval, the second message of the interval becomes the initial filling message and it informs that the fuel level has grown compared to the previous value (the first message is the reference used to calculate the delta (//d=Vcurr  Vprev//) for the second message, it cannot be calculated for the first message because of the absence of the previous one).  Let us consider the case on the example of filling. Assume we have sliced the filling with the initial frontier of the interval. As described in the //[[./detect_fillings#special_casehow_a_filling_is_processedHow a filling is processed]]// section, a filling timestamp is defined dynamically according to the unique case. Since we have sliced the filling with an interval, the second message of the interval becomes the initial filling message and it informs that the fuel level has grown compared to the previous value (the first message is the reference used to calculate the delta (//d=Vcurr  Vprev//) for the second message, it cannot be calculated for the first message because of the absence of the previous one).  
\\ The filling final message remains the same.  \\ The filling final message remains the same.  
  \\ The filling volume declines compared to unsliced filling reference (because of the initial message shifts to the right).  +  \\ The filling volume declines compared to the unsliced filling reference (because of the initial message shifts to the right). 
\\ The filling timestamp might hold the position/shift to the right, because it all depends on whether the message, whose timestamp is regarded as an unsliced filling timestamp, is taken into account when calculating the time of the filling. If it is taken, the filling time does not change.  \\ The filling timestamp might hold the position/shift to the right, because it all depends on whether the message, whose timestamp is regarded as an unsliced filling timestamp, is taken into account when calculating the time of the filling. If it is taken, the filling time does not change. 
