Smart Train Deliveries with Combinator Magick [0.13/0.14]

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
crazy142857
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Nov 10, 2016 8:17 am
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by crazy142857 »

siggboy wrote:You need to also upload your "mods" folder so I can easily recreate your environment.
My MODS are:
Aircraft_1.1.4
blueprint-string_4.0.0
creative-mode_0.2.1
EvoGUI_0.4.108
FARL_0.7.0
moweather_0.3.91
Orbital Ion Cannon_1.4.5
PowerAndArmor_1.0.11
RailTanker_1.4.0
Satellite Uplink Station_1.0.4
SmartTrains_1.1.6
tankwerks_2.0.1
TheFatController_1.0.0

Or do you prefer me to upload all the mod's zip files?
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by HiddenWolf »

I had it working, so I started expanding the system, and now things aren't working.

I had trains dispatching to the outposts, but then they'd go to the next station in the line rather than to the requester. Eventually they'd end up back in the yard.
Can someone take a look?
Attachments
RSO2_TEST.zip
(44.64 MiB) Downloaded 255 times
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by siggboy »

crazy142857 wrote:Or do you prefer me to upload all the mod's zip files?
Compress your "mods" folder into a ZIP file and upload it.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by siggboy »

HiddenWolf wrote:I had trains dispatching to the outposts, but then they'd go to the next station in the line rather than to the requester. Eventually they'd end up back in the yard.
Can someone take a look?
Update the game to the latest version. That fixed somebody else's problem of the same nature.

If that does not help, check the lamp conditions at the providers and monitor one of the problematic providers and see if it receives an "R" signal.

What you describe is a provider not receiving the "R" signal or it being cleared prematurely, and then the train will use the linear schedule.

You can also connect the lamp to the train station and then add a "leave condition" of "R > 0" to the station. That way the trains will merely get stuck at the providers instead of doing an erratic tour, which will help you to isolate the problem.

I'm not going to download any more saves to solve "simple" problems like these, especially not if they have been solved by others or described in this thread already. It is too time consuming, and I'm not really playing Factorio anymore.

If you make absolutely no progress I can have a look, or maybe somebody else will have a look at your save.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by HiddenWolf »

siggboy wrote:
HiddenWolf wrote:I had trains dispatching to the outposts, but then they'd go to the next station in the line rather than to the requester. Eventually they'd end up back in the yard.
Can someone take a look?
Update the game to the latest version. That fixed somebody else's problem of the same nature.

If that does not help, check the lamp conditions at the providers and monitor one of the problematic providers and see if it receives an "R" signal.

What you describe is a provider not receiving the "R" signal or it being cleared prematurely, and then the train will use the linear schedule.

You can also connect the lamp to the train station and then add a "leave condition" of "R > 0" to the station. That way the trains will merely get stuck at the providers instead of doing an erratic tour, which will help you to isolate the problem.

I'm not going to download any more saves to solve "simple" problems like these, especially not if they have been solved by others or described in this thread already. It is too time consuming, and I'm not really playing Factorio anymore.

If you make absolutely no progress I can have a look, or maybe somebody else will have a look at your save.
That is exactly the help I was looking for. Helps me understand a complex system.
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by HiddenWolf »

Siggy, I just noticed that there are differences between the older (v3) provider stations and the newer design with the multi-provider circuit.

Should it be possible to use the older design with the newest depot/logic, or do I need to adapt to the new provider designs as well?
If so, is that as simple as removing the logic that is 'on top of' the provider?

The designs I'm using are from the demo save.
The demo save won't load anymore on my setup. Some mod conflict.
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by siggboy »

HiddenWolf wrote:Should it be possible to use the older design with the newest depot/logic, or do I need to adapt to the new provider designs as well?
If so, is that as simple as removing the logic that is 'on top of' the provider?
If you remove the part of the circuit "on top" (at the provider), then it will just be a regular provider for a single resource. Should be sufficient for most cases -- multi-providers are not really that important (you can always build multiple single providers after all).

A few posts higher up I've given some instructions for how to adapt the provider.

If you're unsure you can simply use regular inserters instead of filter inserters and not change anything else.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by HiddenWolf »

siggboy wrote:
HiddenWolf wrote:Should it be possible to use the older design with the newest depot/logic, or do I need to adapt to the new provider designs as well?
If so, is that as simple as removing the logic that is 'on top of' the provider?
If you remove the part of the circuit "on top" (at the provider), then it will just be a regular provider for a single resource. Should be sufficient for most cases -- multi-providers are not really that important (you can always build multiple single providers after all).

A few posts higher up I've given some instructions for how to adapt the provider.

If you're unsure you can simply use regular inserters instead of filter inserters and not change anything else.
I did try to adapt the provider, to adapt it to my station layout and to add a balancer.
I've set up a little test track to debug things, and I'm seeing the resource on the red bus, but the train is not dispatching.
Which signal should the provider send to the depot to request a train?

I have on the red bus:
D=1
S+1
Green=21
Coal= 8.4m (requester requests 4k, provider is offering 11k)
R=2 (station number)

Alternating with
Q - counting
D=1

I'm not seeing a P, so I assume I missed a wire?
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by siggboy »

You should disconnect the requester, so the provider will be the only station on the network (that's only so you can see the isolated signal from the provider on your test network).

Then, while the "S=1" signal is on the bus, the provider should output the amount that it can deliver.

If the provider does not output a resource signal, then it's either because it does not have enough of the resource, or because it's not wired up correctly.

The resource information comes from the buffer chests, they have to be connected to the combinator that checks for the resource amount (for example: "Coal > 4,000"). That signal then goes through the circuit and ends up on the red wire if the correct conditions are met (either S=1 or Q=<station number of provider>).
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by HiddenWolf »

siggboy wrote:You should disconnect the requester, so the provider will be the only station on the network (that's only so you can see the isolated signal from the provider on your test network).

Then, while the "S=1" signal is on the bus, the provider should output the amount that it can deliver.

If the provider does not output a resource signal, then it's either because it does not have enough of the resource, or because it's not wired up correctly.

The resource information comes from the buffer chests, they have to be connected to the combinator that checks for the resource amount (for example: "Coal > 4,000"). That signal then goes through the circuit and ends up on the red wire if the correct conditions are met (either S=1 or Q=<station number of provider>).
If I decouple the requester, I get
coal=11K
Green=11
D=1
S=1

I can see the 11k-signal being processed through the circuit.

EDIT: Found one error. Had the bottom-left combinator hooked up to the lamp while it should be hooked up to the station combinator.
That triggered a train to come and load, but it was sent back to the lane, and not to the requester.
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by HiddenWolf »

So I guess I am back at the provider not giving the R= signal to the train.

The combinators that provide the R-signal to the lamp are to the top-right of the provider circuit? correct?
These are currently reading P=7.
If I evaluate the combinator correctly, P should be 0 at some poin to provide R to the train?

Image
Update.
Found another missing wire. The smart station, the lamp and the combinator are too close together.
Had it working, not sure if it will keep working. Will continue whenever I find the time.
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by siggboy »

HiddenWolf wrote:Found another missing wire. The smart station, the lamp and the combinator are too close together.
Had it working, not sure if it will keep working. Will continue whenever I find the time.
Yes, you need to be careful, because the lamp, combinator and train station itself are three separate entities. However, if you notice the yellow frame that is lighting up when you mouse over the entities, then it is always clear which entity you're connecting to.

You should keep an unmodified blueprint as a reference, maybe make a screenshot and keep that around.

Also, when you say "bottom left" and "top right", then you should also mention which way you're orienting the station, otherwise that doesn't make sense.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
azakir nalda
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Aug 10, 2015 4:18 pm
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by azakir nalda »

in my current modded playthrough i need to put some extra work into trains and combinators. Even though most of that stuff is new i sort of need this system.

Currently i have setup the depot but when my trains get to the depot for the first time only 1 light for the lane selector actually lights up. What am i doing wrong?

see attached screenshot
Attachments
screenshot.jpg
screenshot.jpg (2.32 MiB) Viewed 11148 times
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by siggboy »

azakir nalda wrote:Currently i have setup the depot but when my trains get to the depot for the first time only 1 light for the lane selector actually lights up. What am i doing wrong?
Nothing. The lane with the active light is the lane that will be used for the next delivery.

There always is exactly one of the lanes active at a time, and it will always be a lane with a waiting train.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
azakir nalda
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Aug 10, 2015 4:18 pm
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by azakir nalda »

ahh okay now i feel dump...

Thanks for the info siggboy :)
HiddenWolf
Inserter
Inserter
Posts: 48
Joined: Thu Sep 24, 2015 1:37 pm

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by HiddenWolf »

Once more into the breach.

After getting a working test track, I wanted to modify the blueprints to:
- Distribute items evenly across wagons.
- Add dixie tubes to keep an eye on what's in the station.
- Add some lights.
- Expand to 4 wagons.

I've updated the tamplates, but I broke something again. There is 12k in the provider. The requester is set up to ask for a delivery once there's 8k available, but the request isn't sent.
I'm not sure if the problem is in the requester or the provider at this point.

Image

Blueprints attached, if anyone would like to take a look.

P.S. If I'd like to go to 6 or 8 wagons, which combinator in the Depot should I change?
Attachments
Magic Train Provider.txt
(2.96 KiB) Downloaded 161 times
Magic Train Requester.txt
(2.88 KiB) Downloaded 167 times
Magic Train Test Track.txt
(11.21 KiB) Downloaded 156 times
turkish25
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Sep 17, 2016 2:00 pm
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by turkish25 »

Hey guys,

Thought i would break Factorio out for another blast. Is this still working on the current build?

Running my old blueprints and getting some issues.

If it is dont suppose someone could put up the most up to date blueprints for provider, requester and depot?

Cheers
User avatar
EricCoon
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Feb 17, 2017 6:20 pm
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by EricCoon »

Hi,

I'm trying to setup the depot and are following your documentation in viewtopic.php?f=8&t=25311&start=140#p191133

1. Set the total number of lanes (plus 1) in the counter at the lane selector
Where is that? In the example save I found no arithmetic or decider who has the value 4

2. Set the number of wagons per train in the appropriate combinator (arithmetic combinator in the top row of the depot circuit)
Which arithmetic excatly? I marked in the screenshot one, who I suspect to be the right one.
Depot.png
Depot.png (1.49 MiB) Viewed 10641 times
4. Set the number of expected total outposts in the constant combinator at the bottom left side of the depot
I am not sure which one that should be. I found one in the upper left with 30 Train Stop Signals. Is that the one I should change?

Thanks in Advance :D
"This is a mess! Lets rebuild and make it bigger!" .... "I said BIGGER!!!"
KudoBear
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Sep 27, 2016 6:19 pm
Contact:

Re: Smart Train Deliveries with Combinator Magick [0.13/0.14]

Post by KudoBear »

EricCoon wrote:Hi,

I'm trying to setup the depot and are following your documentation in viewtopic.php?f=8&t=25311&start=140#p191133

1. Set the total number of lanes (plus 1) in the counter at the lane selector
Where is that? In the example save I found no arithmetic or decider who has the value 4

2. Set the number of wagons per train in the appropriate combinator (arithmetic combinator in the top row of the depot circuit)
Which arithmetic excatly? I marked in the screenshot one, who I suspect to be the right one.
Depot.png
4. Set the number of expected total outposts in the constant combinator at the bottom left side of the depot
I am not sure which one that should be. I found one in the upper left with 30 Train Stop Signals. Is that the one I should change?

Thanks in Advance :D
1. You want the constant combinator with normal train signal # signal and L=1. Change the train signal to # of lanes +1.
2 You want the multiplier combinator next to the two constant boxes on the right. Look for the one that has IN: each * -2, OUT: each. Change the number to -(number of wagons).
4. Yes, the constant combinator with train stop signals on the left is the correct one. Change that to be more than your train stops.

turkish25 wrote:Hey guys,

Thought i would break Factorio out for another blast. Is this still working on the current build?

Running my old blueprints and getting some issues.

If it is dont suppose someone could put up the most up to date blueprints for provider, requester and depot?

Cheers
The contraption is almost entirely base factorio functionality with combinator logic (only really need smart trains besides that) and it still works fine. I just whipped it out myself and it works fine in testing, same as before. Refer to Sigg's last exposition post:
siggboy wrote:
Acarin wrote:Place the Depot (and maybe disable D=1 while I build), setting train size to 4
The value "D=1" is in a constant combinator and you can have that enabled while you build things. It makes no sense to ever disable it, because it holds the station number of the Depot, which is usually "1" and never changes.

Because "D=1" is always on the red wire bus, it's a good way to check if a point is connected to the red wire bus or not (if it doesn't have the "D=1" value it's not connected).
Add the stacker stations (non-smart?) and create a train line that simply runs Stacker - Depot
The "stacker stations" are the depot stations (= outgoing lanes). They are all named "Depot", and there is no line from stacker to depot. The depot lanes need to be smart stations and they have to be connected to the depot circuit. Refer to the demo map for this.

The "stacker" is what is in front of the outgoing lanes and keeps more trains than you have lanes. It has no stations. Do not confuse the stacker with the depot lanes.
Add the Requester stations (all at the furnaces, all multi-item receipt, so no need to differentiate), wire them into my ore buffer and set appropriate requirement level(s). Add to the start of the train line (Requester - stacker - Depot)
You do NOT add stations to the start of the train line. You always add them to the END of the train line. The first station in the train line is "Depot", and it is ALWAYS the first station in the sequence. There is no reason to ever change this, but you could.
Add the Provider stations, wiring them into the outpost buffer chests and making sure that "load size" is set to 8k, then adding each P staton in turn to the end of the SmartTrain line route
Adjust the rules on the line so that trains leave P when full, leave R when empty, and leave Depot on Signal #
The "use signal #" checkbox must be active for ALL stations (depot, provider and requester). On the depot the condition needs to be "D>0", on your providers/requesters you can make your own conditions, but "full/empty" is usually correct as you've pointed out.
Enable D=1 and cross my fingers
You do not "enable D=1", it is always there. In order to suspend/resume the depot (main circuit), you can disable the combinator that emits "S=1", then the light will turn red and the depot will not send any trains. It is a good idea to do this (and wait for your trains to return) if you make major changes to the setup. Just adding a station (to the END of the line) does not require this, but it always helps to not have any trains leave when you make changes.
Each Smart station should be connected to the red bus with a wire from the Stop itself (not the combinator) to the power pole and out to the circuit network. The red wire already connected to the power pole in the blueprint is separate to this, isn't it?
The train station itself does not need to be connected to the red wire bus. The red wire bus connects all the providers, requesters and the depot. The stacker stations are NOT connected to the red wire bus, they are connected with red and green wire to the depot itself but it is separate from the red wire bus.
Does that sound about right? And do I need to cross-wire the Smart Station combinator and lamp for your system (so that the light comes on when the station is actively broadcasting for pickup or delivery)?
No you do not need to cross-wire lamp and combinator. Wire it up as it is done in the demo map and blueprints.

Try to follow the instructions in viewtopic.php?f=8&t=25311&start=140#p191133
They are very detailed.

If in doubt, look at the demo map and do it as it's done there.

The depot you should use is this: viewtopic.php?f=193&t=25311&start=260#p201443

The provider you should use is this: viewtopic.php?f=193&t=25311&start=280#p205102
(It's a multiprovider which you might not need, but it also does fix a few other things so it's recommended.)

You should start with a simple setup (one provider, one requester), and then go from there. Don't install a lot of stations at once before you have figured things out.

Here's a blueprint book with all the recent versions:
Blueprints
Use these as they are in the book, of course you can make them larger for more wagons, and you can change the multiprovider to a simple provider just by changing the inserter type (and removing the part of the circuit that is connected to the inserter array).
Those blueprints and instructions are the latest. I used Foreman to import the blueprints.
Post Reply

Return to “Combinator Creations”