The Factorio Benchmark Website

test-000106 : Which fuel type is most UPS efficient?

Factorio Version 0.18.17

The TLDR

Use nuclear fuel in trains, it is more UPS efficient overall because trains complete their journeys more quickly

The Question

On the r/technicalfactorio discord server, flame_sla was wondering if slower trains (using non-nuclear fuel) were more UPS efficient than nuclear fueled trains.

The Test

The test consists of 1000 6-12 trains facing east. All start stations are connected to the circuit network and set to send the signal to the trains. The distance between Start and End stations is approximately 520 tiles. Note: This is the same test map as was used in test-000103 The game was then paused, and the constant combinator set to send the start signal. While paused, the following script was used to set the fuel in the locomotives for each test case:

      
        /c 
        for _, ent in pairs(game.player.surface.find_entities_filtered{name = "locomotive"}) do
            ent.clear_items_inside()
            fuel = {}
            fuel["count"] = 100
            fuel["name"] = "solid-fuel"
            ent.insert(fuel)
        end
      
    

This then generated the following five maps for testing: The test was then run for 2000 ticks on each map in verbose mode, ten times per map. 2000 ticks is enough time that even the slowest trains (coal) makes it from start to end, and stops for a bit. The minimum time tick of each of the 10 runs was taken, and then all of those minimums were added together to create a total run time for each map. This would present pretty close to best case performance for each of the maps.

The Data


From this it is quite clear that the faster trains are better. Any reduction in per-tick processing caused by moving trains more slowly is more than made up for by the fact the journeys don't last as long with faster trains.


Since the data is available, it is interesting to look at the per-tick times for each test.

This is a bit noisy. The large spikes are caused by smoke (as discussed in test-000103). Zooming in on the graph a bit to get rid of those and see the lines better, we get this:

From this we can see that while the slower trains do have a lower processing overhead when accelerating more slowly (likely because of fewer collision checks being performed), the journey takes significantly less time with more rapidly accelerating trains, thus using less processor time overall.

All maps will be uploaded here.

Closing

Nuclear fueled trains are more UPS efficient, as they complete their journey with significantly less overall processing. Depending on the base, this may also mean that fewer total trains are required (certainly fewer would need to be moving at any one time).