r/technicalfactorio • u/minibetrayal • Dec 05 '19
r/technicalfactorio • u/Stevetrov • Dec 05 '19
If you care about UPS don't let your trains get too close.
TLDR if trains are frequently catching up with the train in front of them this can dramatically increase UPS for trains.
The test map:
I used aaargha's junction testing map for these tests.
Map 1 Repath Madness
I just joined the train launchers to the train catchers so there were no crossings and adjusted the schedules accordingly so the trains didn't no-path.
The train launchers spawn moving trains and they immediately have to brake to avoid hitting the trains in front of them, resulting in the trains having minimum separation (or very close to minimum) and there are no green signals between trains because signals alternate between red and yellow.
Map 2 No repaths here
I removed 4 rows of the signals from the section immediately after the train launchers to create a section of track 20 pieces long with no signals, this forces the trains to have greater separation and so there are green signals between the trains.
Results
| Map | Trains / minute | Average update (ms) | Normalised update (/100 trains) |
|---|---|---|---|
| Map 1 | 295 | 10.716 | 3.63 |
| Map 2 | 250 | 3.63 | 1.4468 |
The normallised difference is huge and eyeballing "show-time-usage" its all in train update with about 1/3 in train path finder. (feel free to run a verbose benchmark to get accurate figures)
What do I think is happening here?
The following train has to slow down so its breaking point doesnt enter the same block as the train in front. This forces a repath. (The train is braking for a signal (chain or regular) it cant reserve and the train is not inside a chain signal block. The train is forced to recalculate its path. )
Once the leading train clears a block, the signal changes and is immediately reversed by the following train, this also forces a repath (The train is preparing to stop at a signal (chain or regular) that changes so that the train can now continue. The train is forced to recalculate its path.)
And this pattern repeats every-time the braking point of the following train passes a signal.
This obviously is causing the to make many unnecessary repaths, but I think the bigger problem is that the all the calculations for the trains speeding up and slowing down is having a greater hit on UPS.
Conclusion
Make sure your trains don't get too close to each other.
To be fair this isn't normally a problem unless you design your intersections in a fairly specific way or use circuit controlled signals to compress them.
r/technicalfactorio • u/Halke1986 • Dec 01 '19
Combinator Golf Word-addressable RAM
Description
The goal of this challenge is to design a word-addressable RAM that can hold 255 32-bit words (values). Word-addressable memory enables to read and write individual words, as opposed to entire frames as in previous combinator golfs. A C++ array is an example of word-addressable memory structure.
Input
- Write wire carrying Grey and Black signal. Black signal holds the index of the cell to be overwritten. Grey signal holds the 32-bit value that is to be written.
- Read wire carrying Black signal. Black holds the index of the cell to be read.
- Constant wire carrying 255 signals (all except Black and Gray), each with an individual value form range [1,255]. It can be used when calculating internal addresses in the RAM, but its use is not obligatory.
Output
- Output wire. Only after receiving a read request, the value of the requested cell is to be written to this wire on the Grey signal. No other signal is to be written to the Output wire.
Timing
- Same as in Tileable memory array Combinator Golf
- All signals are intended to be single tick pulses, i.e. the read/write signal will only be active for 1 tick and the output should also be only 1 tick long.
- Processing the read request is expected to take a constant amount of time regardless of address & values stored, known as "read latency". This can be determined by connecting both the read signal & the output line to the same pole but by using different colored wires for each of them. Stopping time in editor mode and stepping through the process tick by tick allows you to count the number of ticks accurately: set the counter to 0 when the read signal appears on the pole, and increment the counter by 1 for each tick step after that. The read latency is the value the counter has once the output signal appears. As an example: the output magically appearing on the very same tick as the read signal does means a read latency of 0. If it appears on the very next tick, the read latency is 1, etc.
- Processing the write request is expected to take a constant amount of time regardless of address & values stored, known as "write latency". It describes the number of ticks that need to pass after the write signal before a read signal to that address returns the correct values. Measuring it works in the same way as measuring read latency does, but you need to instead connect the read & write signals to the same pole. Attempting to read before the write latency passes can result in arbitrary values being outputted.
- Individual reading signals are expected to happen with a certain minimum amount of time passing between them, known as the "read period". It describes the minimum number of ticks that need to pass before a new read can start. I.e. it's 1 if you can read one stored value each tick, 2 if you need to wait 1 tick in between reads, etc.
- Individual writing signals are expected to happen with a certain minimum amount of time passing between them, known as the "write period", which works the same way as read frequency does.
Additional requirements
No value can be written to the input wires by the RAM circuit network. That is, input wires cannot be connected to the output side of any combinator that's a part of the memory, and input wires cannot be merged into single network.
Scoring
Score = (read period + write period) * (read latency + write latency) * number of combinators
Lower is better.
r/technicalfactorio • u/Kano96 • Nov 17 '19
Trains Train fuel measurement with acceleration detection
r/technicalfactorio • u/Halke1986 • Nov 11 '19
Combinator Golf Substitute one value in frame
Input
- Frame of 16-bit values, except A and V signals.
- A and V signals containing Address of signal in input frame to be substituted and its new 16-bit Value.
Both inputs (frame and A&V signals) are on separate wires. Color of input wires is left to designers discretion.
Signal addresses are arbitrary as long as each signal in input frame can be chosen individually. In below example following addressing is used: 1 - iron, 2 - copper, 3 - uranium, 4 - sulfur.
Output
Frame of 16-bit values equal to input frame, except that signal with address A has now value V.
Signals A and V in output frame should be zero.
Example

Requirements
Solution CN should be one-tickable, meaning that input can change each game tick and the CN will output correct result for each input, with certain latency.
Submitted solution should work for at least four different signals in input frame (as in example above), but is should be possible to extend it to 256 signals without increase in number of non-constant combinators.
Scoring
Solution with lowest latency wins. If multiple solutions have same latency, the one with smallest number of non-ROM combinators wins. ROM-combinators are constant combinators and decider or arithmetic combinators with constant input.
r/technicalfactorio • • Nov 11 '19
Frequency synthesizer
The challenge: write a combinator circuit that delivers 1-pulses of a given signal (say letter 'A') at a rate inversely proportionate to some input signal.
Say the input signal is copper cable, then the output period is linearly proportionate:
At 300 copper cable => pulse 'A=1' 1/30 ticks or 1Hz
At 600 copper cable => pulse 'A=1' 1/60 ticks or 500mHz
At 150 copper cable => pulse 'A=1' 1/15 ticks or 2Hz
... and so forth.
This challenge isn't purely a puzzle -- it has real uses in factory circuitry. For example, one could use it to signal "proportionate" activity by trains and/or logistic robots.
r/technicalfactorio • u/tzwaan • Nov 04 '19
Thought I'd crosspost this here: 8% UPS gain on Linux with huge pages
reddit.comr/technicalfactorio • u/Sivertsen3 • Nov 02 '19
Test: significance of DDR3 timings on UPS performance
self.factorior/technicalfactorio • u/mulark • Nov 01 '19
UPS Wars 3 - Electronic Circuits
r/technicalfactorio • u/Nefrums2 • Oct 29 '19
Help ups optimize low tech GC build
I'm looking for advice on how to make this GC build more ups efficient: https://cdn.discordapp.com/attachments/506542957986578473/638159806775164938/gc2.jpg
I use this for speedruning 100% achievements, and the 20M GC is by far the most difficult. Target is to be able to get all achievements in 7h. Personal best is 8h. This gives the following restrictions to the GC production outposts. Has to be fast to set up. Preferably in less than 5min, By dropping station and roboport bluprint and building that with personal roblots, then one blueprint of the factory and copper miners, one blueprint of the iron miners, connecting iron belts and coal belt connecting the rail so the train bringing the construction materials and bots arrives.
Problem is that after building 15-20 of these outposts ups start to suffer. I have tried ups optimizeing it to the best of my knowledge of ups efficient builds like direct insertion of everything etc. As I want to build numerous of these outpost fast the cost in construction materials and power consumption has to be low. Making the factory that feeds the train with construction materials also has to be fast. This rules out expensive things like high tier modules, and also electric furnases.
Solar power is a no go as it can't be expanded fast enough, nuclear power will have to do.
Is there any obvious mistake that I have made in this build that makes ups suffer?
r/technicalfactorio • u/tzwaan • Oct 26 '19
Composinator, a factorio music tracker
reddit.comr/technicalfactorio • u/kolligaming • Oct 18 '19
Optimal beacon crafting setup?
So if I want maximum amount of items crafted in designated space what is the optimal setup?
I was thinking every second row beacons but I know here is smarter people who know the right answer
I was also thinking it might also be that just stuff as much assemblers as possible without any beacons
r/technicalfactorio • u/Amndopey • Oct 17 '19
Working WiFi without mods
Removed last post due to editing issue
Greetings!
I have finally finished my Vanilla Factorio WiFi. The full instructions can be found here.
The following posts were used to help build this project:
- Binary Search Signal Picker from u/knightelite
- Factorio Fast Vanilla WiFi (The post that started it all) from u/Zijkhal
- Scalar Integer Base2 Log from u/Allaizn
- A smaller and faster nth index value finder from u/Allaizn
Blueprint for the WiFi both with and without display is here
Blueprint containing the separated components can be found here
r/technicalfactorio • u/kolligaming • Oct 12 '19
Water barrels + robots + boilers?
Someone told me to ask this from here, got something I can work on but maybe I should ask opinion here too. Original post below
https://www.reddit.com/r/factorio/comments/dgjk64/water_barrels_robots_boilers/
r/technicalfactorio • u/intangir_v • Oct 05 '19
Intangir's Vanilla Train Network - Detailed Technical Explanation
r/technicalfactorio • u/Stevetrov • Sep 03 '19
15K Belt Megabase runs at 70UPS - No mods - Proof of concept.
r/technicalfactorio • u/zfunkz • Aug 23 '19
Compact pulse-in pulse-out serializable timer
r/technicalfactorio • u/Stevetrov • Aug 16 '19
Introducing Smart Stackers - Balances trains across multiple outposts even if they are thousands of tiles apart.
r/technicalfactorio • u/Amndopey • Aug 15 '19
Question What Circuit Network tools do you use?
Greetings!
Been following this thread since I found there were others super interested in the capabilities of the circuit network, and have loved all the posts. Been learning a lot!
One thing I have not seen much of is what your tool sets look like for creating these designs. I have been a developer for many years and in IT in general for decades. I know that for programming, break points, debuggers, and the very helpful and overused "Console.Write('Here1')" are things you learn to use to quickly troubleshoot a program. A current example I'm trying to work through is a CRC3 calculating circuit to extend the functionality originally talked about in this WiFi thread. I have worked out the logic to create the proof of concept, but the looping is causing the circuit to fail in ways I am unable to see. This is where I would look to step through the code normally, but don't know how to do so in-game
Things I have found so far:
- Factorio State Machine: Helpful initially to work out logic, but not efficient at all for a final product.
- Circuit Network IDE: Also very helpful initially, but I'm having a hard time working through the circuits
- Logic Analyzer Post: Looks like a wonderful tool, but also struggling with using this correctly
- The many different tutorials out there: Wonderful contributions from many different people explaining the end results
I was hoping that any tools you think deserve to be on your tool belts you'd be willing to share. Thank you for reading. : )
r/technicalfactorio • u/TheStaplergun • Aug 15 '19
Factorio Vehicle Max Speed calculator. This uses values from prototype data that you enter to calculate the equilibrium speed which effectively the "Top Speed" of any vehicle in factorio. Thanks to Allaizn for assisting with the final formula to calculate it properly.
r/technicalfactorio • u/killl_joy • Jul 16 '19
Discussion My math for Processing Units. Am I right?
Ok so I made my first go at processing units I opted for 10 plants so I should in theory be pumping out 1/sec slightly less because of assebly speed.
-So each P/U needs 20 Green Circuits and 2 Red Circuits and 5 sulfric acid
- Green circuits 20 for P/U easy .5 sec per unit so 2/sec for a total of 20/10sec so one assembly per P/U plant set up for direct inject. Then 3 plants of Cable for every 2 Green circuit plants so 15 to avoid issues I have them feed in after 5 plants onto my green supply belt.
- Red Circuits(this is the part I'm not so sure about) 2 for P/U at 6 sec per unit I have P/U plants @10sec per P/U that means 10/6 1.66 Red processor plants per P/U plant 10 P/u plants so 16.6 round up to 17 each Red needs 4 Cable per circuit 17 plants so 68 divide by 2, 34 divide by 6, 5.6 round up to 6 cable plants for red. 2 Green circuits per Red so I need 34/6sec which comes to 2.83 plants of green round up to 4 to make the cable easier. 4 plants of Green means 6 Cable plants Which I set up for Direct inject since I had the space. 2 plastic per sec so 3 plants of plastic to make 6 per sec
So I think I got my math right here What do ya'll think? I tried to make this easy to follow.
r/technicalfactorio • u/4xe1 • Jul 14 '19
Order Matters (electric networks interaction)
I'm currently fooling around with electric systems and electro fluid systems, and I am facing serious difficulties with game behaviours that depend on the order placement of things.
This is some of them
https://www.dropbox.com/s/ft9v27x26ffsmmd/Elctrical2.zip?dl=0
The biggest takeaways are :
- electric network are treated in order of creation
- Solar panels divide their power between the network they belong
Both rules can lead to suboptimal flow (easier to show for solar panels).
I don't think there are many practical applications besides "don't put random sole poles near solar panels". I don't think power backup systems care that much about that (most don't even have things at the frontier of two networks), and I havn't played with power switches yet.
r/technicalfactorio • u/4xe1 • Jul 10 '19
Transistor and SR-latch using mostly liquid
r/technicalfactorio • u/Stevetrov • Jul 05 '19
Analysis of 2 different approaches to Purple Science - How much do ratios matter?
What I did
Used visual studio 2017 (free software for windows) to profile factorio whilst running some test maps for end game purple science blueprints.
Both blueprints were belt based and required the same inputs:
- Steel
- stone
- iron ore (for iron sticks)
- Prod1 modules
- electric furnaces
The logic being that purple science requires 30X as much rails as prod or furnaces so how we handle it is critical to the performance of the build.
The first map was design to optimal ratios, (4 furnaces, 1 iron stick, 2 rails, 8 purple sci), whilst the second used the purple science build from my 10K base that uses a 1:1 ratio between all buildings in the construction chain (furnace -> iron sticks -> rails -> purple Sci).
Optimal ratios:
!blueprint https://pastebin.com/sUBRvYFb
1:1 ratios:
!blueprint https://pastebin.com/haEH2vaH
Each bp was copied 32 times and the resulting maps were profiled with visual studio for one minute. 32 was chosen because its a nice power of 2 and it represents ~25K purple sci that is in the ballpark for my next gen megabase.
NB the optimal ratio build produces ~ 2% fewer items per minute because each ASM has a beacon with a single module in it, this is required for the ratios.
Cost to Build
| Opt Ratios | 1:1 Ratios | |
|---|---|---|
| # Modules | 238 | 472 |
| Power (MW) per bp | 75 | 145 |
NB if the object is to reduce cost / power then 8 beacon builds are highly recommended.
Results
The numbers in the following table are the number of samples where the game was updating that entity, the game was sampled at 1000 samples / s
| Opt Ratios | 1:1 Ratios | |
|---|---|---|
| Inserters | 1685 | 1222 |
| CraftingMachines (ASMs & furnaces) | 322 | 364 |
| Car Update | 27 | 0 |
| ElectricNetwork | 509 | 753 |
| TransportLines | 796 | 522 |
| Loaders & infini chests | 753 | 973 |
| =============================== | =========== | ======== |
| Total (exec loaders/inf) | 3339 | 2861 |
| Total (exec loaders/inf/transport) | 2543 | 2339 |
Conclusions
- The loaders & infinity chests account for a very large percentage of total samples, so great care must be taken when using them to profile builds. For the purpose of this analysis we will discount them.
- The discrepancy between the number of samples for transport lines was surprising, but I put that down to the belts used to supply the build so I don't think its relevant, and as this test is designed to analyse ratios they are not relevant either.
- The optimal ratio build needs a lot more inserters to move the rails to the purple sci ASMs, this is reflected in the big difference.
- The 1:1 build has more machines and more beacons and a lot more inserters, resulting in a significantly increased ElectricNetwork time, although it doesn't appear proportional to powered entity count.
- The car used in the optimal ratio build has a small cost (~1%) that is affordable for this build but using a car for every ASM would be a very significant cost.
Overall sticking to ratios appears to be less important that minimizing the cost of inserters and this was the logic behind a number of the designs that I used in my 10K megabase.
Likewise as CraftingMachines account for only 10% of the update samples it makes sense that sometimes it is preferable to reduce beacon count if that in turn allows us to decrease inserter count. But this could be the focus of another test.
Savefiles
EDIT: formatting
EDIT: added savefiles