Car cost 100km consumption detail maybe false

Bug #159066 reported by Vicente
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Low
Maxime DOYEN

Bug Description

car cost of homebank:

fecha contador carburante precio cantidad dist. 100km
1/10/07 212953KM 49,09L 1,01 -49,58 999km 4,91L
15/10/07 213952KM 47,05L 1,00 -47,00 942km 4,99L
28/10/07 214894KM 45,01L 1,02 -46,00 106km 42,46L
31/10/07 215000KM 5,00L 1,00 -5,02 100km 5,00L
01/11/07 215100KM 4,72L 1,01 -4,76 --- ---

it's really false.

it should be:

INI= 212953 FULL

D V FULL REFUEL KM
213952 47,05 TRUE 999 4,71
214894 45,01 TRUE 942 4,78
215000 5 FALSE 106 ---
215100 4,72 TRUE 206 4,72 =100*(5+4,72)/206

Revision history for this message
Vicente (jviares) wrote :
description: updated
Revision history for this message
Vicente (jviares) wrote :
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Will have a more intense look asap !

Changed in homebank:
assignee: nobody → mdoyen
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Ok, I have checked allof that.
The problem seem to be that I compute results individually for each line which can be wrong when there is some break in full refuel.
On the screenshot you will see on the right (green) a cumulative computing that fix the problem in both way:
- partial refuel after full (wrong 42.46l)
- and full after partial (wrong 0.59l)

The fixed dist, fuel, etc... will not be displayed, just computed for displaying the right results for consumption.
Tell me what you think about that way to fix the problem.

Revision history for this message
Vicente (jviares) wrote :

It isn't suficient.

I think is neccesary a field to indicate if it is full reful or partial refuel.

See my other calcs becouse they not match with yours.

km refuel price dist Full Refuel comsuption
2953 49,09 49,58 999 true 4,71
3952 47,05 47 942 true 4,78

In the first movement de car use 47,05 L in 999km. I thing you are making calcs with 49,09 L.

sorry my poor english.

Revision history for this message
Richard Barrington (richard-freedomwigs) wrote :

I will "second" this bug.

The calculation appears to assume the tank starts at 0L, however this is very unlikely to happen... who runs their car dry? Or maybe it's an out-by-one error somewhere...

Anyway, I think the first entry into the list should not be calculated, it should be used as a reference to calculate the difference for the following entry.

Eg, the first line:
18/11/07, 203731 km, 45.28 l, $1.74, $-78.75, 349 km, 12.97L

is incorrect, because the distance I had travelled at that time was 0 km, so there should be no Dist. and no 100 Km values.

30/11/07, 204080 km, 46.74 l, $1.75, $-81.65, -, -

is incorrect, because I had travelled 349 km since the last fill, which should be in the Dist. field, and the L/100 Km value should be calculated.

My actual consumption should be 13.39 L/100 km in the second row ((46.74 L / 349 km) * 100), not the 12.97 L/100 km calculated in the first row.

Richard

Maxime DOYEN (mdoyen)
Changed in homebank:
status: Confirmed → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Ok, I have looked again and I think the solution is as it can be seen in the attached screenshot.

In the screenshot, the first refuel is the really first refuel, so it will not take place to any calculation, as we do not have sufficient datas.

Then any user must read line 2 like:
I have refuelled with 47.05L at 213952 meter, at that point I drived 999km and average consumption was (not for that refuel, but before that) 4.71L/100km.

The mixup was to try relate the drived distance (999 km) to the previous refuel 49.09L.

Hope this will be correct !
Let me know.

Maxime.

Revision history for this message
Vicente (jviares) wrote : Re: [Bug 159066] Re: car cost fail

Homebank eed full and partial refuel.
You see this case:

km
refuel
dist
100km
100km

 1st refuel 212953 49,09

 full refuel 213952 47,05 999 4,71
 full refuel 214894 45,01 942 4,78
 full refuel 215900 45,72 1006 4,54
 partial refuel 216700 5 800 0,63
 full refuel 216900 43 200 21,5 4,8

---------- Forwarded message ----------
From: Maxime Doyen <email address hidden>
Date: 2008/7/7
Subject: [Bug 159066] Re: car cost fail
To: <email address hidden>

Ok, I have looked again and I think the solution is as it can be seen in
the attached screenshot.

In the screenshot, the first refuel is the really first refuel, so it
will not take place to any calculation, as we do not have sufficient
datas.

Then any user must read line 2 like:
I have refuelled with 47.05L at 213952 meter, at that point I drived 999km
and average consumption was (not for that refuel, but before that)
4.71L/100km.

The mixup was to try relate the drived distance (999 km) to the previous
refuel 49.09L.

Hope this will be correct !
Let me know.

Maxime.

** Attachment added: "Screenshot.png"
  http://launchpadlibrarian.net/15876747/Screenshot.png

--
car cost fail
https://bugs.launchpad.net/bugs/159066
You received this bug notification because you are a direct subscriber
of the bug.

Revision history for this message
Maxime DOYEN (mdoyen) wrote : Re: car cost fail

Well... I agree with you. I though I have found the magic formula, but it's just only a specific case that works well with it.

In fact the main trouble is that computing average 100km consumption can only work if you do full refuel everytime.
So that still a problem. Whatever we can do it will never be exact.

Let's for example imagine someone never doing full refuel (I know some) then how we can compute? the results will always be false !

I have googled trying to find a sympathic mathematical algorithm to solve the problem with no success. All the things I have found uses the common rule of three and need a full refuel each time to be correct (and it's logical in a way).

I should think again to my proposal above on 2007-11-11, that was to sum distance and refuel and then compute an average, it is not exact but it should work in every case.
I think we should resign that 100km consumption value to be an estimation.

The important thing is most the distance you have made between each refuel and how much it costs you, isn't it ?

Maxime.

Revision history for this message
Vicente (jviares) wrote : Re: [Bug 159066] Re: car cost fail

I think that you can add "fr" param in transaction. Ej:

d=229866 v=50,25 fr=true
or
d=229866 v=50,25 fr=false

that you think

2008/7/8 Maxime Doyen <email address hidden>:

> Well... I agree with you. I though I have found the magic formula, but
> it's just only a specific case that works well with it.
>
> In fact the main trouble is that computing average 100km consumption can
> only work if you do full refuel everytime.
> So that still a problem. Whatever we can do it will never be exact.
>
> Let's for example imagine someone never doing full refuel (I know some)
> then how we can compute? the results will always be false !
>
> I have googled trying to find a sympathic mathematical algorithm to
> solve the problem with no success. All the things I have found uses the
> common rule of three and need a full refuel each time to be correct (and
> it's logical in a way).
>
> I should think again to my proposal above on 2007-11-11, that was to sum
> distance and refuel and then compute an average, it is not exact but it
> should work in every case.
> I think we should resign that 100km consumption value to be an estimation.
>
> The important thing is most the distance you have made between each
> refuel and how much it costs you, isn't it ?
>
> Maxime.
>
> --
> car cost fail
> https://bugs.launchpad.net/bugs/159066
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Maxime DOYEN (mdoyen)
Changed in homebank:
importance: Medium → Low
Revision history for this message
Maxime DOYEN (mdoyen) wrote : Re: car cost fail

To be fixed later

Changed in homebank:
status: In Progress → Confirmed
Revision history for this message
Bastian Becker (bastianbecker-deactivatedaccount) wrote :

Could it be that you've fixed the problem in 4.0? Now it shows me the right fuel (see attached picture).

Maxime DOYEN (mdoyen)
summary: - car cost fail
+ Car cost 100km consumption detail maybe false
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

I only chnage the transaction order from asc date to asc meter.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Any feedback about this bug state? Fixed or not ?

Revision history for this message
Vicente (jviares) wrote : Re: [Bug 159066] Re: Car cost 100km consumption detail maybe false

With full refuel is ready. (HomeBank.ej1.jpg)

With partial refuel is not ready (HomeBank.ej2.jpg)

2009/12/23 Maxime DOYEN <email address hidden>

> Any feedback about this bug state? Fixed or not ?
>
> --
> Car cost 100km consumption detail maybe false
> https://bugs.launchpad.net/bugs/159066
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Ok, thanks for the feedback and screenshots, this will help !

Revision history for this message
spiral (perfectdrug) wrote :

Ok thought about it further, and I think I have found the "magic" formula;)
The calculation is only correct if you do full refuels, as said before. But if you do partial fills it gets confused. So we need something to indicate its not a full refuel.
With this in place you can summarize all partial refills and add it up to the next full refill and calculate with this.

e.g.
you do 3 partial refills and then a full refill
so you driven the distance from the last refill and the 3 partial refills before.
same for the gasvolume: volumefullrefuel + 3 partialrefillvolumes
with this then: totalfuel * 100 / totaldistance

(I hope you understand as I'm not a native speaker)

What do you think?

Revision history for this message
Vicente (jviares) wrote :

Yes.
Home bank need ej:

"fullRef -d=20000 -v=40 -pf=true"
or

"partRef -d=20000 -v=40 -pf=false"

2009/12/29 spiral <email address hidden>

> Ok thought about it further, and I think I have found the "magic" formula;)
> The calculation is only correct if you do full refuels, as said before. But
> if you do partial fills it gets confused. So we need something to indicate
> its not a full refuel.
> With this in place you can summarize all partial refills and add it up to
> the next full refill and calculate with this.
>
> e.g.
> you do 3 partial refills and then a full refill
> so you driven the distance from the last refill and the 3 partial refills
> before.
> same for the gasvolume: volumefullrefuel + 3 partialrefillvolumes
> with this then: totalfuel * 100 / totaldistance
>
> (I hope you understand as I'm not a native speaker)
>
> What do you think?
>
> --
> Car cost 100km consumption detail maybe false
> https://bugs.launchpad.net/bugs/159066
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Harald (haraldboehmecke) wrote :

Hello, this is still an issue in V4.0.3

Any updates if a fix will be issued for this?

Revision history for this message
Vicente (jviares) wrote :

No, I do not see another solution.

2010/4/30 Harald <email address hidden>

> Hello, this is still an issue in V4.0.3
>
> Any updates if a fix will be issued for this?
>
> --
> Car cost 100km consumption detail maybe false
> https://bugs.launchpad.net/bugs/159066
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Harald (haraldboehmecke) wrote :

yes there is a solution. See Spiral's proposition. It is the same which is being used in other fuel calculators online.

See http://www.spritmonitor.de/de/detailansicht/355909.html

Partial refuels are added up until a full refuel is entered and the information is then calculated all together.

Can this be integrated to homebank?

100Km fuel consumption has no sense like this and its a great feature to homebank!

Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: none → 4.4
status: Confirmed → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

@harald:
Do you know where are the full refuel on the page you posted ?
http://www.spritmonitor.de/de/detailansicht/355909.html

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

@ all:
I think indicate a partial refuel in the following manner (using : or ~ instead of =):

- partial will be d=5555 v:5.32 or v~5.32
- full still be d=5555 v=45.03

I prefer to avoid force the user to seize pf= in every case, just simpler to change the actual rule.

Let me know what you think and prefer between : or ~ or propose something else.

Revision history for this message
Vicente (jviares) wrote :

I prefer ~

2010/8/16, Maxime DOYEN <email address hidden>:
> @ all:
> I think indicate a partial refuel in the following manner (using : or ~
> instead of =):
>
> - partial will be d=5555 v:5.32 or v~5.32
> - full still be d=5555 v=45.03
>
> I prefer to avoid force the user to seize pf= in every case, just
> simpler to change the actual rule.
>
> Let me know what you think and prefer between : or ~ or propose
> something else.
>
> --
> Car cost 100km consumption detail maybe false
> https://bugs.launchpad.net/bugs/159066
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Enviado desde mi dispositivo móvil

Revision history for this message
Harald (haraldboehmecke) wrote :

In answer to:

@harald:
Do you know where are the full refuel on the page you posted ?
http://www.spritmonitor.de/de/detailansicht/355909.html

Every time a Consumption Value is Printed at the right side, it means a full refuel has been done.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Fixed for v4.4

Changed in homebank:
status: In Progress → Fix Committed
Revision history for this message
Maxime DOYEN (mdoyen) wrote :
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Guys, could you please give it a try to v4.4 and let me know if everything works fine ?

Revision history for this message
Vicente (jviares) wrote :

Sorry for the delay.
I test version 4.4 and I think it works correctly in relation to the cost of
car.

Using for partial refuel "~".

2011/1/22 Maxime DOYEN <email address hidden>

> Guys, could you please give it a try to v4.4 and let me know if
> everything works fine ?
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/159066
>
> Title:
> Car cost 100km consumption detail maybe false
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.