Pyramid city block train world
Posted: Mon Mar 30, 2020 6:35 pm
After becoming more and more frustrated with train spaghetti, I came to the forums for ideas on how to do it better. Back in September of 2018, I found this post viewtopic.php?f=5&t=62437&p=379267&hili ... id#p379077 from Malandark with an interesting premise: a pyramid transforming input resources into every more complex products, culminating in science packs delivered to research labs at the peak of the pyramid.
I am now on my fifth version of a pyramid-inspired city block train world. I call my city-blocks sectors, as to me a city block contains a variety of buildings offering different goods and services, where my sectors have a single purpose. The bottom row of the pyramid contains forges to turn ore into plate, and refineries to turn crude oil into oil products. All the raw resources are brought up from below this line, so none of my resource trains use any of the tracks in the main part of the base.
Following the pyramid concept, all sector inputs are delivered to the bottom of the sector; the middle area does the processing; outputs are made available to clients at the top. I call my input unloading design a ladder, where each rung of the ladder supports a different input. The number of rungs on the ladder is determined by the sector input needs. I use the same design for outputs; usually there is only a single output rung, but as needed, I add more rungs to support more customer trains.
After much trial and error, I have settled on single purpose trains. At first I tried having trains serve multiple customers, for example the iron plate train would take iron to everyone who needed it. That didn't work, I ended up delivering iron to customers who already had plenty, but had room for more and sucked it all up, starving everyone else. Then I tried sector trains, where one train tried to pick up everything needed by the sector. And that didn't work: the train ended up full of iron, which the sector couldn't use, because it was waiting on copper, which the train couldn't pick up, because it was waiting to unload the iron. Then I tried having replicated sectors all using the same depot name. That didn't work, the customers all went to the closest sector, which was out of product, and ignored the other sectors that were idle. I tried using the circuit network to make the trains smarter. That didn't work (my limitation here not so much the circuit network!)
So now, with a very few exceptions, my trains have trivially simple schedules: go to source depot A, pick up product A, return to destination sector B and deliver the product. Every train stop has a unique name, and every train has designated source and destination stops. I use a consistent naming system: every sector is named for what it produces; each input stop is named for the sector, followed by the name of the input, followed by the word "in" (to help reduce my human error rate when I am assigning stops to the train schedule), for example "Circuits iron in". I use iron for iron plates, iron ore is written out in full. The output stop is named for the product followed by the word depot, for example "Circuit depot". When I need more of any given product, I simply replicate the sector, and add an identifying serial number, for example "Red circuits 3 plastic in" and "Steel 3 depot".
How to fuel the trains: at first I had designated fuel stops, and each train picked up, delivered, and went for fuel. That really didn't work! It was very wasteful, because the train didn't need fuel 90% of the times it went to the fuel stop. And the fuel stops caused endless congestion and deadlock. So now the bottom rung on every input ladder is for the fuel train. All the trains are refueled each time they deliver (with the exception of acid trains for uranium mining, which need to be refueled when they pick up acid). The fuel stops are one exception to the every stop unique rule: the fuel stops are all named "Fuel stop", and are disabled until the sector is low on fuel. There is one fuel train, that delivers fuel to up to three fuel stops before returning to the fuel depot to reload.
When I ramped up my world to aim for 1KSPM, I found that there was a lot of competition for resources, and my trains were having to go farther and farther to pick up and deliver. So I redid everything using what I call zones. Each science pack has its own zone, and every sector in the zone is dedicated to supporting production of that one type of science pack. Each zone is its own mini-pyramid, starting from raw resources up to finished products. Now the green circuits for inserters for green science are not being drawn off to make red circuits for electric furnaces! And nearly all my trains are intra-zone, so they never have to travel more than 8 or so blocks. This helps reduce congestion, and because the paths are so short, I do not see a lot of UPS issues from path-finding.
I am now working on 2KSPM by replicating my zones! I now have quadrants: a group of seven zones (6 science packs and a rocket silo zone). Each quadrant has its own research park to minimize the distance the science pack trains have to go to deliver.
As my world got bigger and bigger, I needed a personal transport train to get around, and I ran out of room to carry all the stuff I needed to expand, so I added a helper train, and then several more helper trains... these are described more in this post: viewtopic.php?f=194&t=82899
I am now on my fifth version of a pyramid-inspired city block train world. I call my city-blocks sectors, as to me a city block contains a variety of buildings offering different goods and services, where my sectors have a single purpose. The bottom row of the pyramid contains forges to turn ore into plate, and refineries to turn crude oil into oil products. All the raw resources are brought up from below this line, so none of my resource trains use any of the tracks in the main part of the base.
Following the pyramid concept, all sector inputs are delivered to the bottom of the sector; the middle area does the processing; outputs are made available to clients at the top. I call my input unloading design a ladder, where each rung of the ladder supports a different input. The number of rungs on the ladder is determined by the sector input needs. I use the same design for outputs; usually there is only a single output rung, but as needed, I add more rungs to support more customer trains.
After much trial and error, I have settled on single purpose trains. At first I tried having trains serve multiple customers, for example the iron plate train would take iron to everyone who needed it. That didn't work, I ended up delivering iron to customers who already had plenty, but had room for more and sucked it all up, starving everyone else. Then I tried sector trains, where one train tried to pick up everything needed by the sector. And that didn't work: the train ended up full of iron, which the sector couldn't use, because it was waiting on copper, which the train couldn't pick up, because it was waiting to unload the iron. Then I tried having replicated sectors all using the same depot name. That didn't work, the customers all went to the closest sector, which was out of product, and ignored the other sectors that were idle. I tried using the circuit network to make the trains smarter. That didn't work (my limitation here not so much the circuit network!)
So now, with a very few exceptions, my trains have trivially simple schedules: go to source depot A, pick up product A, return to destination sector B and deliver the product. Every train stop has a unique name, and every train has designated source and destination stops. I use a consistent naming system: every sector is named for what it produces; each input stop is named for the sector, followed by the name of the input, followed by the word "in" (to help reduce my human error rate when I am assigning stops to the train schedule), for example "Circuits iron in". I use iron for iron plates, iron ore is written out in full. The output stop is named for the product followed by the word depot, for example "Circuit depot". When I need more of any given product, I simply replicate the sector, and add an identifying serial number, for example "Red circuits 3 plastic in" and "Steel 3 depot".
How to fuel the trains: at first I had designated fuel stops, and each train picked up, delivered, and went for fuel. That really didn't work! It was very wasteful, because the train didn't need fuel 90% of the times it went to the fuel stop. And the fuel stops caused endless congestion and deadlock. So now the bottom rung on every input ladder is for the fuel train. All the trains are refueled each time they deliver (with the exception of acid trains for uranium mining, which need to be refueled when they pick up acid). The fuel stops are one exception to the every stop unique rule: the fuel stops are all named "Fuel stop", and are disabled until the sector is low on fuel. There is one fuel train, that delivers fuel to up to three fuel stops before returning to the fuel depot to reload.
When I ramped up my world to aim for 1KSPM, I found that there was a lot of competition for resources, and my trains were having to go farther and farther to pick up and deliver. So I redid everything using what I call zones. Each science pack has its own zone, and every sector in the zone is dedicated to supporting production of that one type of science pack. Each zone is its own mini-pyramid, starting from raw resources up to finished products. Now the green circuits for inserters for green science are not being drawn off to make red circuits for electric furnaces! And nearly all my trains are intra-zone, so they never have to travel more than 8 or so blocks. This helps reduce congestion, and because the paths are so short, I do not see a lot of UPS issues from path-finding.
I am now working on 2KSPM by replicating my zones! I now have quadrants: a group of seven zones (6 science packs and a rocket silo zone). Each quadrant has its own research park to minimize the distance the science pack trains have to go to deliver.
As my world got bigger and bigger, I needed a personal transport train to get around, and I ran out of room to carry all the stuff I needed to expand, so I added a helper train, and then several more helper trains... these are described more in this post: viewtopic.php?f=194&t=82899