• "Frankly, I know what's wrong but don't know how to fix it." - Bernie Ecclestone.

# Correct Fuelusage figures for rFactor

Discussion in 'Off Topic' started by Lee Knight, Jul 6, 2011.

1. ### Lee Knight

Messages:
956
Ratings:
+240
Has anyone worked out a calculator or something for determining fuelusage for rF (or any of the other sim's) tracks?
I read somewhere a while back that track distance x 14 (or16 or perhaps it was 18) will give the answer, but Ive personally found that that sum does tend to over fuel a car on longer tracks with the AI going for another lap they never make or to pull in on every lap & that up beyond 30+km's I can virtually get away with just rounding the distance up & adding a zero onto it before the decimal point as fuelusage doesn't seem to be a linear calculation.
Although this method is not precise & still requires, at times much, experimentation which can become quite tiresome with tracks around 50 to 90km's in length.....
Especially when the next time out in a different car mod, that hasn't had it's own fuel figures properly calculated, causes a serious rethink on the last figure attained....
Any information or thoughts on this would be greatly appreciated, thank you.
(edit)
Also, is there someway of making the AI cars 'gear up' their ratio's for higher speed circuits, & I suppose, lowering for tighter/slower circuits so as to be more competitive after having done that for my own car?
I'm wondering if it's possible to do this within the tracks AIW File much like adjusting the fuelusage figure?

2. ### Alexander Rhodes

Messages:
605
Ratings:
+9
There isn't anyway to calculate your usage or AI's usage unless you can guarantee your going to drive every lap exactly the same way. You'd then have to calculate how much faster the car will accelerate with less fuel, and therefore how much more fuel the car will use each lap, and still have to drive exactly the same each time around, so in short, there is no point calculating fuel usage based on number of laps.

However, that being said, F1 teams and a few other single seater teams use time as a measure for judging how much fuel is needed. They do this by running an engine (in a lab) at a certain amount of rpm for a certain amount of time. The fuel used is then multiplied by the maximum number of hours it's expected to run, and therefore if your rpm stayed the same all the way around the lap you'd know exactly how much fuel to use. F1 teams use an average, max, and min of rpm per circuit then calculate the fuel usage for each RPM, from that you can get an average, and therefore fuel the car above this for high-speed circuits, or below it for low speed circuits.

3. ### Lee Knight

Messages:
956
Ratings:
+240
Errr....what I meant was, if I have a couple of Mods that are set right for fueling then on the same track- even though they have different fuelling usage rates- they should both run out in roughly the same spot (preferably just after the finish line) when using a correct fuel usage figure for the track.
Is there someway that I can calculate the fuel usage figure for a track other than by experiment?
Ive seen a fairly accurate calculator for working out car usage rates, surely there must be someone who knows what a track fuel usage figure refers too as it doesnt seem to be linear at all in comparison to distance at all!
Ive been thinking on this for a bit & I hope Ive got the question right this time.....
Alexander's answer above seems to be more related to the cars usage rather then a sims track fuel usage.....
Thanks in advance guys

4. ### Alexander Rhodes

Messages:
605
Ratings:
+9
But thats the point, it's not the track that uses fuel, it's the car lol. The track will not have fuel usage calculations, the car and driver will, and it will vary from driver to driver. For example, If you fuel a car with 18L for a 6 lap race, the car you are using is a 2.0 clio, you fuel another car with 18L to enter in the same race, this time it's a 3.5L V8 race car, It would be very unlikely the V8 race car would finish. Thats why we work out how much a car uses, not how much a track uses.

But if your wanting to know how many laps you can do before you run out of fuel, rFactor has a built in estimation, right where it asks you how much fuel you want in the car e.g. "75L (21 Laps)". Or if your wanting a loose estimate on fuel used per lap, divide the tank size by the number of laps it can do e.g. 75/21=3.57L average per lap. The actual usage will definitely vary though, on a full tank you might use 4L per lap, and on empty it might be 3L.

5. ### Lee Knight

Messages:
956
Ratings:
+240
Gday Alaxander,
I realize the first paragraph & your second paragraph is what Im getting at....
In a tracks AIW file there is a listing titled 'FuelUse' about 14 line down in the Waypoint section & 4 lines down from 'lap_length'.....
FuelUse is used to calculate that figure for your laps/liters reading in rF
BTB seems to spit out a 5 figured generic number for all tracks starting with 37(414, I think....)
This figure doesn't work with longer tracks.
For example, one Im working on has the line 'lap_length=11633.6' & required the line further down to be changed to 'FuelUse=155000.0'
to make sure that even a heavily consuming car can make the finishing line on the "in game" calculated lap/fuel figure....
This 11.6km circuit (with a good guess) took several 5lap races to come up with that figure.
Imagine trying to calculate for a track thats80 to90km's in length per lap!
Whats more shorter tracks seem to require a higher figure in relation to distance than a longer track (short track distance x 14 for starting out, medium sized 11x, 80km-10 or even 9x lap_length....)
I was hoping someone here might be able to tell me the relation between the to figures & if not why they are not linear, than perhaps at least an accurate calculation to derive a FuelUse figure without needing to resort to time spent doing the old 'Suck it & see' approach....
So far Ive been finding a thirsty Mod, dropping in 50 or 100liters & then trying to workout in reverse what you've written in the last paragraph.
It gets me there, but I also get to bed late & next day feel like Ive been on the road all night
Thanks for your input anyway though, it is appreciated!

6. ### Alexander Rhodes

Messages:
605
Ratings:
+9
I think many people have tried to fix the AI irregularities. The honest truth is, when it comes to AI files, you can't fix stupid. As much as it may hurt to hear, there won't be any way to calculate the correct figure unless you know the entire equation, and what the measurements are in. You also need to make sure that the AI drivers are not going off the track, a spin on a 90km track could easily add a couple of litres, the fact it's 90km's could mean a few spins, and the AI do tend to spin and crash from time to time.

So if anyone actually wanted to get this understood, it would mean calculating for the car's use per lap, then calculating what it would cost for a spin, and adding at least 1 spin per 5 laps just in case, this could be why the AI drivers overfuel, because if you run out just over the line, then what would have happened if you'd have spun the car?

7. ### Lee Knight

Messages:
956
Ratings:
+240
A while ago I got an Rfactor Fuel consumption calculator for cars which seems to be fairly accurate from here http://www.nogripracing.com/details.php?filenr=32947
Im figuring that the AIW's FuelUse figure is for (a) the AI cars so that they make a full lap without needing to much fuel to slow them down yet enough to make it through a race (where possible) without needing to stop every lap loosing time to take on yet more fuel (whether needed or not) to make another lap & (b) so that we can do the same in Garage....
I can understand leaving an 'OH SH@#\$! factor in the tank-even the professionals do this as well as getting home fuel.
But as you've said & what Im trying to find out is, how to 'calculate the correct figure' as well as the 'equation, and what the measurements are in.'

8. ### Alexander Rhodes

Messages:
605
Ratings:
+9
And to reverse engineer the equation, you need to know what the numbers mean in the text, and what the output number would be, plus it's measurement.

To reverse engineer the measurements to understand those numbers, you'd need to know the equation.

What I'm saying is, you'd be better off guessing, as finding out the equation could be a lot more time consuming than your current process. That is unless someone else has taken an interest into the rFactor AI's fuel usage, which I doubt.

9. ### John DiFool

Messages:
27
Ratings:
+1
For AI cars you can give them setups that you've made, custom for each specific type of vehicle.

10. ### Thorn West

Messages:
18
Ratings:
+1
In regards to fuel usage in rfactor there happen to be a few parameters that govern this.

1. being the fuel usage written in the AIW file which appears to be effected by the type and style of track as well as the length, I am working on a calculator to hopefully accurately calculate this, unfortunately these things take time.

2. Exponential fuel consumption value found in the engine.ini which after six months of work which involved a lot of discussions with engineers and collecting data off real race car drivers I created the Rfactor fuel consumption calculator which I see a link for has been posted on this forum there are two versions available of this but the second is more user friendly and calculates on different types of fuel, i haven't as yet found a way to make this anymore accurate then what it is but it doesn't appear to be far off the mark.

3. Fuel Estimate also in the engine.ini effects the mileage of cars in rfactor and also effects AI cars, however this is something I am still fiddling with but in most cases when using the fuel consumption calculator setting it 1.0 seems fairly accurate in most cases.

In regards to your last question there are tutorials on how to set up the ai cars in the track files for different circuits, I will go back find them and post a link this, I hope this will help.

Regards

Thorn West

11. ### Lee Knight

Messages:
956
Ratings:
+240
Thank you Thorn & I look forward to seeing & using your AIW Fuel Calculator when it's finished!
I'll also be using your Car Fuel Calculator I downloaded a while ago soon for a mod that Ive got in the pipeline at the moment.
Cheers for the info too,
BLeeK

12. ### Ed_Severson

Messages:
1
Ratings:
+0
I came across this thread a few weeks ago while searching for some information, and I think I have sort of figured out what the original poster is getting at, so I wanted to come back to it. I have been using the IDT Champ Car mod and had experienced some big discrepancies between the number of laps projected for a fuel load and the actual number of laps I could run on that fuel load. After tinkering a bit with the numbers, here's what I've come up with (and this is a bit of an over-simplification):

As discussed above, the two most important figures are the FuelConsumption parameter in the engine.ini file, and the FuelUse parameter in the track.aiw file. The FuelConsumption number is tied to the car's performance, and is something that probably should not be changed unless you have reason to think that it is wildly inaccurate. In the case of the Champ Car mod, I have FuelConsumption set to 7.44118e-5 -- a shade off of the mod default figure because I tinkered with it a bit trying to figure this out, but it's within a half percent or so of the original value.

Running at Barber Motorsport Park (2.38 miles), I did a 28 lap stint and my data acqusition plugin told me I consumed 30.25 gallons of fuel, an average of 1.080 gallons per lap. Converting to liters, that's 4.088 L/lap. On an mpg basis, that's about 2.20 mpg, which I know from experience is a reasonable figure for that car on that circuit. Therefore, the FuelConsumption figure was close. For a full 35-gallon tank, rFactor projected I could go 31 laps (2.11 mpg).

In the Barber AIW file, FuelUse was set to 56718. Now, it took me a while to connect the dots here because I'm American so I monitor fuel consumption in gallons instead of liters, but multiplying FuelConsumption and FuelUse:

7.44118e-5 * 56718 = 4.22

That is the number of liters of fuel rFactor projects I will use in 1 lap! 4.22L/lap * 31 laps = 130.84 L (34.56 gallons). I later did a full stint and found I could run 32 laps even though I was projected to be able to run only 31. For 32 laps at my established rate of 4.088 L/lap, I'd consume 130.82 L. I altered FuelUse from 56718 to 54946 (56718*31/32) and the next time I ran rFactor it projected 32 laps on a full tank instead of 31.

So, long story short, multiplying the FuelConsumption and FuelUse numbers should give you your 1-lap fuel consumption in liters (on average). Granted, this information is most useful if you know your approximate consumption rate in mpg or similar. In the case of a Champ Car, around 1.85 to 2.2 mpg is reasonable, depending on the type of circuit. I went through the same exercise with the old CART 1998 Houston circuit at a projected 1.85 mpg and finally got the projected number of laps to line up with reality where initially I was running nearly 20 laps more than rFactor projected on a full tank.

Lee, that may not save you much experimentation, but if you happen to know a good approximation of your car's mileage, you can get yourself in the ballpark.

13. ### John DiFool

Messages:
27
Ratings:
+1
Well, I've had a devil of a time trying to optimize the AI's pit windows on the Targa Florio. The default FuelUse= is 1,118,060*, but this results in their pitting after only 1-2 laps (I disabled tire wear since the AI doesn't seem affected by it much in the mod I've been testing with-VLN'05), when most cars (per my tests) can go 4 laps. I dropped it down to 700,000, which seems to get them to pit on schedule for the most part, but the problem with that was if they did miss their window they'd run out, which then required me to tweak the AIFuelMult= in each .HDV down to something like 0.50 so they can make it back around if they did miss it. Combine that with a bug in the Targa pit lane where the first pit box doesn't work for them (they'll cruise in and then immediately leave without stopping-these cars will eventually run out and retire), and I've about pulled all my hair out before I settled on a fairly workable set of values.

[*Commas inserted for clarity's sake]

14. ### Thorn West

Messages:
18
Ratings:
+1
Hi

Just a word to help with calculating the fuel usage for tracks, I am close to completing a calculator to calculate fuel usage for a circuit, in the meantime my tests have revealed that the way my calculator will work, will calculate a similar result as to what the AIW editor would calculate so in the meantime any one have issues with calculating track fuel usage should use the fuel calculation function in the AIW editor as this is designed to calculate this correctly.

Regards

Thorn West

• Like x 1
15. ### KieferDJW

Messages:
74
Ratings:
+7
Good to hear that Thorn!
It was getting boring to drive lap after lap to figger out the right fuel usage at the aiw...
Actually, I would need the help from your tool for my next (hopely soon) upcoming track.
Do you think you can send me a link so that I can test it?

• Like x 1
16. ### Lee Knight

Messages:
956
Ratings:
+240
Can barely wait now Ive suffered a hick-up with my own track....
I had a good working figure for a 33.7km track I've been building & without changing the layout OR the AIW file (I've just been decorating lately) the figure is suddenly no longer any good!
Im still using the same cars on it as before too!
Most frustrating.....

17. ### KieferDJW

Messages:
74
Ratings:
+7
Mmh... and I thought it'd be difficult with my "short" track.
Do you have not changed the aiw-strings (fuel / lap length)?
Good luck, Lee!