Train movement taking a lot of UPS in my megabase

Anything that prevents you play the game properly. Do you have issues with paying for the game, downloading it or properly running it on your computer? Let us know here.

Train movement taking a lot of UPS in my megabase

Postby Steen » Wed Sep 13, 2017 7:57 pm

I built a 3.3k spm megabase (latest version of factorio) and I am playing right now on 30 fps and 30 ups

My computer specs are: gtx 980, have an i7 5820k and 16gb

So the problem is that of those 30 ups a lot is used for trains (using the 'time-usage' tool ingame). A guy did a performance test for me:
Image
This test says that 8.3 ups is used to move the trains. Almost every other megabase i've seen uses a lot less than that.

There are 327 trains on the map with 3 different sizes (3loc-10w-3loc, 2loc-4w-2loc and 1l-1w-1l) they all run on rocket fuel around a big mainline. All these things don't really explain why the train movement uses that much ups, so it has to be something I have no control about, so my question is can you guys see what is going on here?
Image
In the attachment i dumped my save file + mod map (I don't use every mod in that map, just a few).
Attachments
Save.rar
(65.58 MiB) Downloaded 17 times
Steen
Manual Inserter
Manual Inserter
 
Posts: 2
Joined: Wed May 10, 2017 6:12 pm

Re: Train movement taking a lot of UPS in my megabase

Postby Zavian » Wed Sep 13, 2017 8:17 pm

I'm going to suggest posting your save to viewtopic.php?f=5&t=17501. (Ignore the bit in the first post about 0.12.16. I'm pretty sure Rseding91 is now interested is bases with problems in latest 0.15).
Zavian
Long Handed Inserter
Long Handed Inserter
 
Posts: 81
Joined: Thu Mar 02, 2017 2:57 am

Re: Train movement taking a lot of UPS in my megabase

Postby Rseding91 » Thu Sep 14, 2017 4:18 am

You have 366 trains totaling 1591 cargo wagons, 1463 locomotives and 49 fluid wagons and each tick they move (assuming they aren't stopped).

That's simply what trains take to move. There's nothing you can do to reduce CPU usage of them except use less trains.
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 5904
Joined: Wed Jun 11, 2014 5:23 am

Re: Train movement taking a lot of UPS in my megabase

Postby Optera » Thu Sep 14, 2017 6:11 am

If you want to save UPS by reducing trains you can give LTN a try. (Link in signature)
I'm able to reduce the number of trains by more than 50%.

PS: I'd be very interested to see how much UPS you get with LTN managing all trains in that base.
My Mods:
User avatar
Optera
Smart Inserter
Smart Inserter
 
Posts: 1157
Joined: Sat Jun 11, 2016 6:41 am
Location: Österreich

Re: Train movement taking a lot of UPS in my megabase

Postby quyxkh » Fri Sep 15, 2017 10:44 pm

Rseding91 wrote:You have 366 trains totaling 1591 cargo wagons, 1463 locomotives and 49 fluid wagons and each tick they move (assuming they aren't stopped).

That's simply what trains take to move. There's nothing you can do to reduce CPU usage of them except use less trains.


Would you consider aggregating enroute trains that are in no danger of interaction into a single chord-lengths-from-a-point-on-a-static-path entity? Seems to me you can check for collision and cursor picking and inserter interaction by keeping occupied-rail-segment data updated, so long as there's nothing interesting near any occupied rail segment (and inserters aren't interesting if the train's moving fast enough) turn the train into a single cheap-to-process entity that can be decomposed into its originals when that changes.

edit: really, you don't even need to do that. Leave everything just as it is now, but do all the movement and fuel consumption processing at once for the train, bypassing all individual carriages, via the existing train entity, since those entirely depend on the train's lead point, speed, acceleration, mass, chord length vector and path. There's only one of each of those values for the entire train. I don't know how finicky you are about fuel consumption, but caching energy supply/density and max output with the chord lengths would let you get as precise as you want before distributing the updated values. Is the prospect of a load reduction that scales with train length enough to get a hearing? I make it (vehicle length, connection length, energy supply, density and output rate) plus five for the train as a whole, the rail paths are already being stored.
quyxkh
Fast Inserter
Fast Inserter
 
Posts: 148
Joined: Sun May 08, 2016 9:01 am
Location: California


Return to Technical Help

Who is online

Users browsing this forum: No registered users and 3 guests