Building a clock-signal with Productivity Modules...

Post all other topics which do not belong to any other category.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Building a clock-signal with Productivity Modules...

Post by MeduSalem »

Hey there fellow factorians... ^^



I wonder if someone ever tried to build something like a clock-signal using the extra item from Productivity Modules?



I normally enter ALL Speed Modules and Productivity Modules before I start the facility so normally at some point the purple progress bar catches up with the green progress bar resulting in 2 items at once... rather than 1 extra item somewhere in between the cycle of the green progress bar.

This effect can be used to trigger inserters only when there are exactly 2 items in an output chest rather than the regular 1, thereby creating a clock signal.



So basically using 2 Productivity Modules 3 you should get 2 items rather than 1 once every 5 regular items because of a stacked total bonus of 20%.

With other modules there are other frequencies possible as well... from the possible combinations of 4%, 6% and 10% modules there are following possible frequencies:

A signal once every 5th item, once every 10th item, once every 25th and once every 50th.



But now the BAD thing about that... sometimes due to inserting/removing modules from the setup on-the fly while the assembler/furnace is already in progress the purple progress bar begins to desynchronize from the green progress bar and never ever catching up with it again. That's when the clock is ultimatively broken.

Somehow I think it would be better if the second one fiddles around with the productivity modules in an assembler/furnace that the purple progress bar gets reset and that the new module configuration should start to work with the beginning of the next green progress bar cycle rather than in the middle of the current cycle, so that it is guranteed to run synchronized with the green progress bar whatever you do.



Another thing that may or may not eventually interfere with the clock is the speed of the inserters. If they are too fast or too slow, especially depending on how fast the assembler/furnace works it might also result in awkward behavior, but at least it doesn't desynchronize the purple progress bar - which is the worst case.



While testing around with various setups for quite some time I noticed something else I can't really explain myself... Sometimes the purple progress-bar gets desynchonized from the green progress-bar over time even if you perfectly set up the assembler/furnace with all modules and you never ever fiddle with it again afterwards. At that point the purple progress-bar never ever catches up with the green progress-bar again even if it started out synchronized. Sometimes it returns being syncrhonized after waiting some more time (mostly a few hours xD) but most of the time it doesn't return and actually gets worse.

I don't know exactly where this desynchronization comes from but it might actually have something to do with rounding problems within the game, since the game is tick-based it will probably shift some productivity excess over to the next cycle or maybe cutting something off so it is not exactly running at the specified productivity value as it should.



It's surely something that needs more testing... Feel free to discuss. ^^



Update:

Yeah I know how to build a clock with a chest and 2 inserters, I'm using several of them already. ^^

This topic is about an alternative way using the extra item gained through productivity modules and if there's any possibility to use it to your advantage at all.
Last edited by MeduSalem on Mon Oct 13, 2014 12:46 pm, edited 2 times in total.
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by n9103 »

Seems more reliable/easier if you just used the timer circuit instead.
Are you just looking to make this a thing just because?

The desync issue is actually the purple bar getting a very tiny tiny boost (something like .01%) for each cycle, so that an expected 25% boost always gives a free item every 4th crafting.
The reason is the floating point inaccuracies in various places ended up rounding down the bonuses from modules, so that you always had to craft one extra item to actually get your first bonus item.
So, you're looking at slightly faster/better than expected, or slightly worse than expected plus requiring an extra initial cycle to start.
At least, from your description of what you're looking at, this is the background on the desync. Could be you're describing something else entirely.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by MeduSalem »

Yeah the timer circuit is more reliable as it proved itself countless times... but the trade off is it takes extra space somewhere nearby. xD


And nope I'm not forcing it on anybody... I'm just curious if someone else ever tried to get some control over that behavior or if it is impossible due to the way the game internally works. ^^



But well didn't know about that +0.01% thing each turn... but explains the desync issue... if it always gets 0.01% more to make sure it overcomes the shortcomings from the floatingpoint inaccuracies then it will eventually lead to desync no matter a perfect setup, which basically renders the overproduction a pretty unreliable source to play around with for a logic circuit.

So I guess that behavior won't be changed because it is quite a minor issue that most people won't ever notice anyways... which eventually halts my experiments on that issue because I can't think of a way to get some control over that and/or to use it to my advantage.
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by n9103 »

Could have your timer remove an item every 10000 cycles, to account for the boost. (also note that the .01% is just a guess)
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
User avatar
-root
Filter Inserter
Filter Inserter
Posts: 651
Joined: Tue Jul 01, 2014 11:24 pm
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by -root »

So you don't need anything quite that complicated.

Here's how to build a clock in factorio :)

Clock Tutorial on YouTube
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by n9103 »

... aaand someone failed reading comprehension :p
Didn't even read the 1st reply, did ya root?
He's trying this route because it hasn't been done, not because he just needs a way to track iterations.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
Cilya
Inserter
Inserter
Posts: 26
Joined: Mon Mar 24, 2014 4:07 pm
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by Cilya »

A chest with a loop belt and two inserters (one in, and one out) is already a clock. What do you want a clock for ?
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by n9103 »

If you want to automate things to be triggered at certain times.
If you want to be able to know how many clock cycles you need to set up for your task, without multiplying it all out after the initial setup.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by ssilk »

Seriously it is quite funny to find those tricks. I made myself also many stuff like that. For example I used the train as something like a clock signal (cause the train is quite reliable in timing). The problem is with the inserters: They slightly differ in the timing, depending on their positions and in which direction they turn for the first time and if they take from a near or far side of the belt. In the moment, when you include an inserter into anything and rely on that timing, it begins to be not longer reliable/predictable.
So, the construction of such stuff, so that it will get reliable, is so big and unuseable, that it kills currently all the fun with it. My opinion.

Other things can be made, but timing stuff is currently not really working.

<waitin for better automation>
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Building a clock-signal with Productivity Modules...

Post by MeduSalem »

ssilk wrote:Seriously it is quite funny to find those tricks. I made myself also many stuff like that.
Yupp that's why I'm doing it as well... I only came to fiddle around with that excess item stuff because I was trying to do something else not related to the productivity modules at all BUT the extra item of the productivity modules were interfering somehow... so I looked into that as a byproduct. xD
ssilk wrote:The problem is with the inserters: They slightly differ in the timing, depending on their positions and in which direction they turn for the first time and if they take from a near or far side of the belt. In the moment, when you include an inserter into anything and rely on that timing, it begins to be not longer reliable/predictable.
So, the construction of such stuff, so that it will get reliable, is so big and unuseable, that it kills currently all the fun with it. My opinion.
Yupp noticed the inserters sometimes breaking stuff as well... To some extend it can be countered when moving items directly between assemblers... this way the movement will always be the same length and they are triggered in a more predictable way compared to taking from a belt.

Another way to get more control over inserter behavior is also by using Chests. If you are buffer-filling a chest by logistic robots then you also get a more constant inserter movement, at least if the inserter is never able to completely empty the chest before the robots are able to refill them. Then the limiting factor will be the assembler itself and not the awkward movement behaviors of the inserter.

Stuff gets really troublesome if the inserters can't keep up with the pace of the assembler. Somehow it would be nice if it was possible to insert at least 1 module into inserters. Speed Modules increasing speed... Efficiency reducing idle and workload energy draw... Productivity taking an extra item every once in a while for stack based transfer or something like that. xD
ssilk wrote:Other things can be made, but timing stuff is currently not really working.

<waitin for better automation>
Yupp I'm also waiting for some enhancements... for the most part I'm pretty curious about the logic systems upgrade and the new possibilities coming with them. ^^
Post Reply

Return to “General discussion”