Page 1 of 1

Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Wed Nov 14, 2018 9:33 pm
by knightelite
Image

As can be seen in the above screenshot, inserters ready to load into a train go inactive when there isn't a train present. Depleted miners go into inactive state. However the mining drills (that still have ore) that are ready to direct-load into the train do not go inactive when there is no train present. Seems like this is a potential UPS drain that could get the same optimization as the inserters for this case.

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 06, 2019 1:52 am
by Rseding91
Thanks for the report however I don't consider this worth changing. Mining drills are virtually never setup to mine directly into trains and as such don't have logic to sleep in rails. Adding that logic would slow down every mining drill that exists just for the off chance someone sets one up to mine into rails.

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 06, 2019 5:27 am
by knightelite
Makes sense, thanks.

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 06, 2019 11:04 am
by Pi-C
knightelite wrote:
Wed Nov 14, 2018 9:33 pm
As can be seen in the above screenshot, inserters ready to load into a train go inactive when there isn't a train present. Depleted miners go into inactive state. However the mining drills (that still have ore) that are ready to direct-load into the train do not go inactive when there is no train present. Seems like this is a potential UPS drain that could get the same optimization as the inserters for this case.
You have train stations and power lines running from the station to the miners. Couldn't you just insert a power switch that turns on power when a train is at the station?

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 06, 2019 1:23 pm
by knightelite
Pi-C wrote:
Sun Jan 06, 2019 11:04 am
You have train stations and power lines running from the station to the miners. Couldn't you just insert a power switch that turns on power when a train is at the station?
From what I've read elsewhere unpowered buildings consume more update time than active but idle ones.

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 06, 2019 3:56 pm
by Pi-C
knightelite wrote:
Sun Jan 06, 2019 1:23 pm
From what I've read elsewhere unpowered buildings consume more update time than active but idle ones.
I guess you're referring to this post?
Rseding91 wrote:
Thu Jan 19, 2017 6:55 pm
"Powering down" things is one of the worse ways you can stop a factory. Simply not giving it any resources to consume/use is the ideal way.

The problem is: "powering down" an entity means the normal update logic on the entity can't run because there's no power to do things like "move the inserter arm". The entity has no update notification when power is restored so it can't disable itself.

Adding such a notification would be a gigantic waste of CPU time because 99% + of the time the entity has power or will have power next tick.
That makes me wonder what legitimate (in the sense of having no negative effects like UPS penalties) use there is for the power switch -- mind you, I don't want to instigate an "axe the power switch" debate! :-)

Previously, I used power switches mainly in far-away mining outposts that were not connected to the main grid, but powered by a local solar farm. These outposts were protected by alternating gun and laser turrets, and when accumulator charge dropped below a certain threshold because of a biter attack, all miners were switched off so all power would go to the laser turrets and roboports (for repair work). That seemed to make sense, but after reading Rseding91's post I wonder whether it really is the proper thing to do …

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 06, 2019 6:28 pm
by quyxkh
Turns out the best way is to shut off the supplies, wait for everything to go inactive, then shut off the power. I don't remember the figures but cutting the power saves like half the overhead in beaconed layouts.

For miners you can't do that, and anyway direct-insertion into buffer chests (or even better, smelters then chests, that works _awesome_ if you're willing to build enough outposts) works well with beacons, which also help a lot.

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 06, 2019 8:15 pm
by Serenity
Pi-C wrote:
Sun Jan 06, 2019 3:56 pm
That makes me wonder what legitimate (in the sense of having no negative effects like UPS penalties) use there is for the power switch
Start by not thinking of everything in terms of UPS. With more entities being connectable to the circuit network now there is a bit less need for a power switch (for example for steam engines you can just switch off the water pump), but there is still situations where you may want to just save power

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sun Jan 20, 2019 11:10 am
by Pi-C
Sorry for the delay!
Serenity wrote:
Sun Jan 06, 2019 8:15 pm
Pi-C wrote:
Sun Jan 06, 2019 3:56 pm
That makes me wonder what legitimate (in the sense of having no negative effects like UPS penalties) use there is for the power switch
Start by not thinking of everything in terms of UPS. With more entities being connectable to the circuit network now there is a bit less need for a power switch (for example for steam engines you can just switch off the water pump), but there is still situations where you may want to just save power
Well, UPS unfortunately matters. My first games (unmodded) went alright UPS wise. It was a fluid game -- kind of. :-) Then I started playing with mods: On the first game, both FPS and UPS started to drop considerably whenever I came close to my wind park (that could be an effect of wind generators using fluid consumption internally); on the last game I started, UPS dropped in to the 20s/30s whenever I zoomed out, even though I hadn't built much yet apart from a few miners and stone furnaces.

Admittedly, my computer is what I've seen people in the forum call a "potato": six or seven years old, 8GB of RAM, graphics card with 512MB, i5-2500 CPU @ 3.30GHz. I'm not much of a gamer, and the games I have played last year were rather dated (5 years or older), so my old "potato" was/is still enough for my needs. Nevertheless, playing Factorio on it has been a PITA lately because of low UPS, so if I can avoid things that are known to have a negative effect on UPS it could improve my game experience tremendously. :-)

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Tue Mar 05, 2019 1:25 pm
by BlueTemplar
"Lower UPS when coming closer" sounds like a radically different (graphics, not game-logic related) issue than the one in the OP ?
(It hopefully got/will get better for you with 0.17 ?)

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Wed Mar 06, 2019 1:50 pm
by billbo99
Would using some "Accumulators" on the miner side of the power switch allow the miners power down gracefully into an inactive state ?

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Wed Mar 06, 2019 8:24 pm
by knightelite
billbo99 wrote:
Wed Mar 06, 2019 1:50 pm
Would using some "Accumulators" on the miner side of the power switch allow the miners power down gracefully into an inactive state ?
Seems unlikely, given that as shown in the screenshot the miners don't go into inactive state when there is no train present, and there isn't any way to force them to do so. Having an accumulator would just give them power for a bit longer, shouldn't make any difference regarding their final state.

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Fri Mar 08, 2019 10:34 am
by Pi-C
BlueTemplar wrote:
Tue Mar 05, 2019 1:25 pm
"Lower UPS when coming closer" sounds like a radically different (graphics, not game-logic related) issue than the one in the OP ?
(It hopefully got/will get better for you with 0.17 ?)
Well, I first noticed such delays when I installed Texugo Wind Generator and built a wind park with 160 or so wind generators. That mod internally uses wind power as a fluid, so it was UPS heavy. However, given my setup I've been quite eager to avoid anything that would impact UPS. The information that using the power switch to turn off a part of the factory was, hence, relevant.

Fortunately, I could get a new graphics card
(Well, most gamers would consider it weak and old. It's a Geforce GTX 1050, which is just perfect because I can use it with my 200W or 250W -- not quite sure -- power supply.)
and a memory update from 8GB to 16GB in February, so currently I can run the game at 60FPS/60UPS without any problems! :-)

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Fri Mar 08, 2019 12:53 pm
by BlueTemplar
Eh, its performance is fine
(come on, that's mid-range, not "weak" ! You might even be able to do VR on it...),
I'd be more worried about not having at least 4GB of VRAM these days,
at least if you want to not have to upgrade again in a few years...
not sure what is available considering your power ?

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sat May 11, 2019 12:41 am
by DaveMcW
I tested in Factorio 0.17.38 and it seems to be fixed. :)

Re: Miners that are direct-mining into trains don't go inactive when there is no train present

Posted: Sat May 11, 2019 1:33 am
by knightelite
Yeah, I think the change was stealth merged in 4 or 5 releases ago :).