Price per Trips #2433
Replies: 4 comments 11 replies
-
|
Costs are calculated based upon charging, so if you charge during a date range of the |
Beta Was this translation helpful? Give feedback.
-
|
I was curious about this same statistic - to know the cost per trip. We (should) have the costs per charge and how much energy was added, and we know how much energy we have at the start of the trip. For a given trip, we know the kWh used, so the only semi-difficult thing is to calculate the 'value' or cost of the energy in the battery, which could be done using a last in/first out method to add up our previous charges (kWh, $) until we get to our current charge level. Let me use a contrived example. Say I just took a drive that consumed 25 kWh and I want to know how much that cost me, but I've charged several times at different rates recently. Before the drive in question, there was 50 kWh in the battery. We need to calculate the cost of that 50 kWh. Say my most recent charge was 20 kWh at $0.20/kWh ($4.00), so that's all in there. Since 50-20 > 0, look at previous charge. The 2nd most recent charge added 20 kWh at $0.60 ($12.00)...so our total cost for the last 40 kWh is $4 + $12 = $16. Since 50-40 = 10, which is > 0, again look at the next previous charge. The 3rd most recent charge added 50 kWh at $0.20 ($10.00), but we have only 10 kWh of that charge left "in the tank," so 10/50 * 10 = $2.00. Now we know the total cost of the 50 kWh stored in the battery before the trip: $4 + $12 + $2 = $18. Thus, my trip consuming 25 kWh of my 50 kWh valued at $18 is 25/50 * 18 = $9. It's a bit convoluted, but programmatically straightforward. I'm sure some people would find it "interesting." And isn't processing all this data to discover "interesting" facts what it's all about? Thanks for considering this! |
Beta Was this translation helpful? Give feedback.
-
|
thanks sharing your example - i guess it will get more complicated the more drives and charges are happening within a trip. I'm thinking about implementing something like this - a more basic approach has been done proposed here: #4678 (cost per km based on charging cost and driven distance - not factoring in soc at beginning and end of charge) i suggested considering soc at beginning and ending of trip here, that's what i would open a PR for tomorrow: #4678 (comment) still not fully fifo but as long as at least one charge happened within the period of the trip it would give some reasonable numbers. @cschanzle - what do you think - would that be sufficient? once we have average cost per km within the trip it's easy to calculate each drives cost. |
Beta Was this translation helpful? Give feedback.
-
|
Was the price-per-trip feature ever added? My dashboard shows cost in the trip view as being nil. |
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Would it be possible to integrate a price per trip into the list under "Trips"?
Of course, this price should be calculated like the total ad after the selected period.
thank you.
Beta Was this translation helpful? Give feedback.
All reactions