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.
doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:
doxsroxs wrote:Just want to check with you, are these supposed to show R # for requesters, P # for providers and the last figure how much a train load is?
Image
What are the conditions that could cause them all to be zero?
Yes, it's the requester-provider-train load for the currently selected schedule. It will get erased as soon as the train is sent, so you usually do not see it if there's already a train at the depot (it will pick up the schedule very quickly).

If the numbers are zero, then there currently is no schedule in the registers. The numbers should either all be zero, or all be set, anything else would be a grave bug in the circuit (I've never had that, though).
Thanks, now I understand! :geek:
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:These are too many detailed questions that depend on your setup to be really answered accurately.

I currently have one issue on my current game: sometimes the scheduling fails and the cargo gets sent to the wrong requester station. This is something caused by the scheduler, because the requested resources appear in the combinator of a station that is not even requesting them.

So there is a bug, and I currently do not know what causes it. I will try to fix it.

I have not seen any of the other erratic behaviour that you are describing, so I have to assume that it is a setup problem.

When you extend the network (add a new outpost or new unload/requester), you should always take the following steps in order:
  1. Install the train station with the blueprint.
  2. Set the limits in the respective combinators.
  3. Make sure that everything is connected, except the connection to the main bus.
  4. Add the new station to the main train line, in Smart Trains. Set the rule "signal #" in smart trains. Add it to a train that is not about to leave the depot, because if you do not save the schedule and the train leaves the depot then SmartTrains will reset it to the old schedule. The mod updates the line when a train leaves the station.
  5. Check the combinator at the new outpost, it should output the station number.
  6. Supply power to the outpost.
  7. Connect the outpost to the main bus.
So the connection to the main bus should always happen last, and it's important to make the schedule change on a train that is not occupied (you can stop the train so it won't leave the station while you're changing the train line).
Thats some really good info there. I have definitely seen the wrong information in combinators.
One such case is when placing the blueprint for a requester, if it has access to power it will start enumerating the material in the constant combinator and sometimes completely unrelated materials even though it is not yet connected to the bus. (I suspect this is tied to the blueprint used to copy the station, but Im not sure)
This was actually a huge problem for me for a long time, almost all my stations had bogus numbers/materials in the combinators causing me all sorts of issues.
I never understood from your instructions in the post earlier in this thread that I was supposed to keep the station powerless until connecting it to the bus!

After understanding the system better I now know what to look for and clear out the information prior to attaching the station on the red bus.
I have found that this only happens when the station and combinators are powered, but prior to assigning the station to a route in Smart trains.
During this condition the station does not output a station number and the combinators go wild!
Once assigned as part of a route in Smart trains the station will output a station ID and the combinators will stop looping, however, they still need to be cleared prior to connecting the station or it might malfunction. (IE, requesters never requesting material etc.)
Ill post pictures of this and how to correct it later so you can see what I do. Can probably be solved with instructions, don’t think it will need any changes.
I’d say 80% of my problems where connected to this issue!

As I wrote above, one point of possible contamination is blueprinting an active station, I did this before and had lots of issues where bogus values would appear in the new station and I did not clear them before putting the station on the bus.

After this and upgrading to the newest release of Smart trains (0.4.7) most of my issues have gone away except the one where a train will continue on its pre set schedule instead of delivering to the correct station after a pickup of material. This does not happen all the time, I think it mostly happen when I connect several stations to the bus at the same time, like when I set up two stations close to each other.

As you wrote above Ill be very careful when assigning new stations, I have in general always done it to trains that are in the depot, but Im worried that is not the entire story. Ill continue to monitor it and let you know exactly how I do it.

Also, now that I have figured out how to reset the stations things are sooo much easier!
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

Another note, I have not yet let go of the idea with a central storage for bulk materials.
Have thought about it some more and my idea is as follows.
I have the station act as a normal provider while at the same time monitoring the red bus.
If the red bus output is = to the own stations it will know that its the sole provider and continue in provider mode.
If it detects another provider with the same resources it will turn off the providing signal and only listen.
After a set time without anyone else requesting from the new provider it will activate requester mode and be matched with the new provider for a delivery.
Once delivered, go back in provider mode again until more resources are available.

This will in fact be two complete stations on the same location with some logic in between
I hope to avoid any loops this way since they should never be active at the same time.
Also since I prioritize providing and only pick up overflow I hope to only store excess material and encourage delivery straight to the factories.
This way I should be able to build up a healthy 20million + buffer so I dont run into panic mode looking for new coal/iron patches when the old run out unexpectedly due to new demands (like when someone else smacks down a new smelting expansion consuming 2k metal/min without warning) :p . We have literally run out of both iron and coal within 15 minutes in the past despite 200k buffers.

I assume this will need some testing, but Im going to try now that most of my issues with normal stations are resolved :)
Please let me know if there are any nasty pitfalls in my logic!
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doxsroxs wrote:I have definitely seen the wrong information in combinators.
One such case is when placing the blueprint for a requester, if it has access to power it will start enumerating the material in the constant combinator and sometimes completely unrelated materials even though it is not yet connected to the bus.
You should disable the constant combinator before taking the blueprint. Then, after you place the blueprint, the combinator will again be in the disabled state and it won't do funny things like that.

The reason why this happens is because in a new station the station number is not set. It only gets set when you add the station to the line. If the station number is not set, then the receiver at the outpost is confused.

I did have a second constant combinator at the station that would set an artificial station number, so it won't be "0" after blueprinting. That's not good however because if you forget to remove that constant combinator then you're causing issues again.
I never understood from your instructions in the post earlier in this thread that I was supposed to keep the station powerless until connecting it to the bus!
If you disable the constant combinator as described above then the station can be powered up. It will still count the "green" signal but that's not a problem. Keeping the station unpowered is the easiest way to control all of this, but sometimes when you place the station close to the mainline it will "catch power" from a big electric pole, and then you might get trash inside the registers which you have to clear out manually.
I have found that this only happens when the station and combinators are powered, but prior to assigning the station to a route in Smart trains. During this condition the station does not output a station number and the combinators go wild!
Yes, exactly, see above.
Ill post pictures of this and how to correct it later so you can see what I do. Can probably be solved with instructions, don’t think it will need any changes.
I'm aware that this is making things harder than necessary, but initializing combinators correctly can be tricky. It always requires additional circuitry to make it really foolproof.

In the current version I wanted to make the outpost circuits as small as possible (9 combinators is really small!), so I've cut a few corners here and there.

Maybe I'll rework the entire thing again at some point, and then I might make concessions and make the outposts a little bigger again to have a more stable system.

I will have to have a look at everything anyway, because right now the system does not work 100% error free -- which is simply unacceptable. In my current game I get the occasional misdirected train. I do not know what is causing the issue.

I'm concerned because it only happens sometimes, and I couldn't really pinpoint what's causing it. So it might be a subtle bug in SmartTrains, or some timing issue that only happens with specific schedules. In any case it will probably not be easy to find.

Which is all a bit sad because my 0.12 version did work absolutely perfectly with a lot of trains and outposts. (In 0.12 a lot of things were different, though, SmartTrains especially.)
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 dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doxsroxs wrote:Another note, I have not yet let go of the idea with a central storage for bulk materials.
We have literally run out of both iron and coal within 15 minutes in the past despite 200k buffers.
You probably do not use RSO and/or you've set the richness of the ore patches too low.

I'm playing with RSO (and I've turned up the richness by 1 notch), and I get ore patches about 1,500 tiles away from the starting area with almost 2,000,000 ore in them. You cannot exhaust these in under 12 hours unless you use speed modules in the mining drills.

If you want to play a train heavy game then you really need to set the ore frequency to low (and maybe "rich" or "very rich" even), or you need to use RSO.

Because it's simply not a lot of fun to have all these tiny ore patches and connect them with trains.

Maybe on your map you should make a few "mini hubs" were you pull ore together with a very simple train network, and then turn the hubs into real provider stations. Then you'll have a bunch of ore buffers distributed over the map and you use them as the actual ore providers.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:
doxsroxs wrote:I have definitely seen the wrong information in combinators.
One such case is when placing the blueprint for a requester, if it has access to power it will start enumerating the material in the constant combinator and sometimes completely unrelated materials even though it is not yet connected to the bus.
You should disable the constant combinator before taking the blueprint. Then, after you place the blueprint, the combinator will again be in the disabled state and it won't do funny things like that.

The reason why this happens is because in a new station the station number is not set. It only gets set when you add the station to the line. If the station number is not set, then the receiver at the outpost is confused.

I did have a second constant combinator at the station that would set an artificial station number, so it won't be "0" after blueprinting. That's not good however because if you forget to remove that constant combinator then you're causing issues again.
I never understood from your instructions in the post earlier in this thread that I was supposed to keep the station powerless until connecting it to the bus!
If you disable the constant combinator as described above then the station can be powered up. It will still count the "green" signal but that's not a problem. Keeping the station unpowered is the easiest way to control all of this, but sometimes when you place the station close to the mainline it will "catch power" from a big electric pole, and then you might get trash inside the registers which you have to clear out manually.
I have found that this only happens when the station and combinators are powered, but prior to assigning the station to a route in Smart trains. During this condition the station does not output a station number and the combinators go wild!
Yes, exactly, see above.
I think the current system is ok, but I also think the instructions need a small update so people dont make the same mistakes I did. And also with a small note on what to look for prior to connecting it to the bus.

siggboy wrote: I will have to have a look at everything anyway, because right now the system does not work 100% error free -- which is simply unacceptable. In my current game I get the occasional misdirected train. I do not know what is causing the issue.

I'm concerned because it only happens sometimes, and I couldn't really pinpoint what's causing it. So it might be a subtle bug in SmartTrains, or some timing issue that only happens with specific schedules. In any case it will probably not be easy to find.

Which is all a bit sad because my 0.12 version did work absolutely perfectly with a lot of trains and outposts. (In 0.12 a lot of things were different, though, SmartTrains especially.)
Just keep looking and you will surely find it! :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:
doxsroxs wrote:Another note, I have not yet let go of the idea with a central storage for bulk materials.
We have literally run out of both iron and coal within 15 minutes in the past despite 200k buffers.
You probably do not use RSO and/or you've set the richness of the ore patches too low.

I'm playing with RSO (and I've turned up the richness by 1 notch), and I get ore patches about 1,500 tiles away from the starting area with almost 2,000,000 ore in them. You cannot exhaust these in under 12 hours unless you use speed modules in the mining drills.

If you want to play a train heavy game then you really need to set the ore frequency to low (and maybe "rich" or "very rich" even), or you need to use RSO.

Because it's simply not a lot of fun to have all these tiny ore patches and connect them with trains.

Maybe on your map you should make a few "mini hubs" were you pull ore together with a very simple train network, and then turn the hubs into real provider stations. Then you'll have a bunch of ore buffers distributed over the map and you use them as the actual ore providers.
I think you misunderstood me, we do run RSO so the patches are growing as we spread, largest we have found so far is about 5 million, but it is really far away, still, should be no problem with trains.
The problem is that we all know our iron patch is running low, but think its ok since it should be fine for an hour or two before we need to set up a new one.
Then my friend upgrades a bunch of smelters and miners, creating a huge demand for metal. Thus it empties really quick and our 200k buffer just as quickly right after that.
We need much, muuuch larger buffers so there is no stress when a patch is emptied :lol:

My current plans are for robot based buffers with 10-20 millions capacity so as to handle many hours without supply. (with fully upgraded Tungsten chests we can fit 16 million ore in a 20x20 patch of chests)
This is with bob's mods so capacities are a bit higher than normal. Currently we only have normal chests so we are capped at about a quarter of that, then again, I might just make it 100x100 to compensate :D
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

Where is all that ore going? Are you mass-producing rockets already?

With 40k plates/minute you can launch 1 rocket/minute. I doubt your base is that big already. So why do you need a buffer of 20 MILLION ore? That's 500 rockets worth of ore.

I recommend you keep your buffers as small as possible, and that's where a train system such as this one truly shines, because it allows your base to react to demand in a flexible way.

Making those huge buffers does not really solve an actual problem for you.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:Where is all that ore going? Are you mass-producing rockets already?

With 40k plates/minute you can launch 1 rocket/minute. I doubt your base is that big already. So why do you need a buffer of 20 MILLION ore? That's 500 rockets worth of ore.

I recommend you keep your buffers as small as possible, and that's where a train system such as this one truly shines, because it allows your base to react to demand in a flexible way.

Making those huge buffers does not really solve an actual problem for you.
Reasons?! This is Factorio!
  • We build because… reasons!
  • The ore patches are dirty and need to be cleaned from the map (don’t get me started on trees)
  • I like hoarding and ordering my items in neat rows
  • Also, we do it because we can
:lol:

Jokes aside, remember that we run Bob’s mods. The mod has up to tier 6 assembly machines and much more powerful miners than you can find in vanilla.
Not to mention modules that increase that output even further.

Even though I would say we are in early mid game we are probably using way more material for research and production than a vanilla game ever would do at a similar stage of development.
Recipes are just not comparable to vanilla, usually requiring way more ingredients and a huge number of production steps for the more advanced items.
I estimate 20+ steps even for common things like mid tier circuits to go from raw ore to finished product. I think this is doubled or tripled for the more high tech items where multiple advanced components each built from sub components and high tier materials are included.

The last research we finished took 1250 beakers of each type, admittedly, this one is a bit down the tree, most are around 4-500 by now.

Perhaps the easiest comparison is the trains. The tech two wagons load 12k ore each. One train with 4 cars load 48k ore. And on top of this we have a couple of tech levels more that will increase that load capacity even further.

I don’t want to have to run off in panic and start up a new ore patch on the other side of the map because the current one just ran out. Basically I want a couple of hours worth of material to keep the factories going while we finish the current project.

To give you some perspective, lets look at aluminium plates from ore, note that this is not a complicated recepie from bob's mods perspective:
18 T2 electric chemical furnaces feeding 36 T2 electrolyser plants. These are in turn feeding 10 other T2 electric chemical furnaces. Combine that with Carbon from another 5 T2 electric chemical furnaces and shove it into 20 T2 electrolysers and you get just over 500 aluminium plates per minute. A very modest figure.
This does not include the additional facilities handling excess Chlorine and Hydrogen.
It all adds up to a rather large demand for raw materials just to expand your base with a basic low volume production capacity for a new material.
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

Lets get this thread back on track, we are still having issues with trains going along the normal schedule instead of the goto # station.

This is what we do:
Copy in new powerless station provider/requester
Setup configuration of combinators if its a requester etc.
Open free train in depot, review schedule, if it has not gone on an assignment since you added last station, it might be missing stations in its schedule, causing you to mess up station numbers and remove newly added stations by accident.
If not up to date, remove checkbox for active next to Smart train schedule in smart train gui. Close and open again, check box. Close and open window. Train should have newest schedule.
Now add new station. Save as Smart trains schedule. Open rules and add goto station checkbox. Check Smart trains schedule. Verify ok and save again.
Back to station and apply power. Verify no bogus information in combinators.
Connect red bus.
Should be done.

All trains at depot when this was done. We did sometimes add several stations at once, but assume that should not matter.

Issues include:
Train go to correct station # to load, then continues along its schedule instead of going to the correct station #.
Trains going to station to load, correctly go and unload. Then continues along its schedule instead of going to Depot.

This does not happen all the time, and I have been unable to determine any patterns for when it happens.
As far as I can tell it seems the trains simply miss the goto station # command sometimes.

Can this be related to us having much stronger and faster trains managing to leave the station to fast to secure the right information from the station prior to departure?
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doxsroxs wrote:This is what we do:
[...]
Should be done.
That looks fine to me, and good point about re-adding a train to the line to update its schedule, it's a good way to avoid problems. SmartTrains can not keep the schedules constantly updated, so this is a basic limitation but probably the best that we can get right now.
Issues include:
Train go to correct station # to load, then continues along its schedule instead of going to the correct station #.
Trains going to station to load, correctly go and unload. Then continues along its schedule instead of going to Depot.
I don't think this happens on my map. IIRC the only times that happened was when I misconfigured something. So I do not think it's a problem with the circuit.

If the register at the provider contains the values for "resources" and "requester" (signal "R"), then it did receive that information from the depot correctly. It will also make the lamp at the provider station light up. In that case, if the train still goes to the next station (instead of the station "R"), then it has nothing to do with the circuit. One problem might be that the lamp condition is not set correctly, you need to check that. It needs to be "R>0".

Currently I have no other idea what might cause this problem, and I'm not seeing it.

However, the scheduler definitely has a bug where it actually broadcasts the wrong information, and this is a big problem that I'm currently trying to solve. I will probably rework major parts of the depot circuit to make it more stable and at least a little easier to understand. I'll try to not touch the provider/requester, that will upgrading an existing map very easy (just replace the depot).
This does not happen all the time, and I have been unable to determine any patterns for when it happens.
As far as I can tell it seems the trains simply miss the goto station # command sometimes.
If the correct information has been received in the registers at the outposts, and the lamp condition is correct, and the train does NOT follow this order, then it must be a bug in SmartTrains or some other issue unrelated to the combinator circuit. The circuit has no direct control over the train -- all we can do is output the desired target station to the lamp and then SmartTrains should direct the train there when it leaves.
Can this be related to us having much stronger and faster trains managing to leave the station to fast to secure the right information from the station prior to departure?
I doubt it, but everything is possible. It's unlikely, however.

I will have to fix the depot circuit and make sure that the communication with the outposts is 100% correct. Then I'll have to play my own map for a while and verify that it actually works.

If we still have issues after that, then they'll be unrelated to the combinators and we can go looking for solutions.

(On a positive note, I have found a good way for filtered providers, a.k.a. multi-product provider, which is even compatible with unfiltered providers; especially for Bob's Mods these kinds of providers are very useful.)
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:
doxsroxs wrote:This is what we do:
[...]
Should be done.
That looks fine to me, and good point about re-adding a train to the line to update its schedule, it's a good way to avoid problems. SmartTrains can not keep the schedules constantly updated, so this is a basic limitation but probably the best that we can get right now.
Issues include:
Train go to correct station # to load, then continues along its schedule instead of going to the correct station #.
Trains going to station to load, correctly go and unload. Then continues along its schedule instead of going to Depot.
I don't think this happens on my map. IIRC the only times that happened was when I misconfigured something. So I do not think it's a problem with the circuit.

If the register at the provider contains the values for "resources" and "requester" (signal "R"), then it did receive that information from the depot correctly. It will also make the lamp at the provider station light up. In that case, if the train still goes to the next station (instead of the station "R"), then it has nothing to do with the circuit. One problem might be that the lamp condition is not set correctly, you need to check that. It needs to be "R>0".

Currently I have no other idea what might cause this problem, and I'm not seeing it.

However, the scheduler definitely has a bug where it actually broadcasts the wrong information, and this is a big problem that I'm currently trying to solve. I will probably rework major parts of the depot circuit to make it more stable and at least a little easier to understand. I'll try to not touch the provider/requester, that will upgrading an existing map very easy (just replace the depot).
This does not happen all the time, and I have been unable to determine any patterns for when it happens.
As far as I can tell it seems the trains simply miss the goto station # command sometimes.
If the correct information has been received in the registers at the outposts, and the lamp condition is correct, and the train does NOT follow this order, then it must be a bug in SmartTrains or some other issue unrelated to the combinator circuit. The circuit has no direct control over the train -- all we can do is output the desired target station to the lamp and then SmartTrains should direct the train there when it leaves.
Can this be related to us having much stronger and faster trains managing to leave the station to fast to secure the right information from the station prior to departure?
I doubt it, but everything is possible. It's unlikely, however.

I will have to fix the depot circuit and make sure that the communication with the outposts is 100% correct. Then I'll have to play my own map for a while and verify that it actually works.

If we still have issues after that, then they'll be unrelated to the combinators and we can go looking for solutions.

(On a positive note, I have found a good way for filtered providers, a.k.a. multi-product provider, which is even compatible with unfiltered providers; especially for Bob's Mods these kinds of providers are very useful.)
Thanks, this is really interesting and some good info! Ill try and capture/check the signals to verify they are indeed correct!
Ill get back with any findings :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

If you want to be able to see the green wires more easily, here's a better version of the green wire sprite that I've been using for a few days now:
green-wire.png
green-wire.png (1.23 KiB) Viewed 6808 times
You need to put this file where your Factorio game is installed, into Factorio/data/core/graphics

If you don't like the colors you can adjust them with a software such a Gimp or another image editing tool.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:If you want to be able to see the green wires more easily, here's a better version of the green wire sprite that I've been using for a few days now:
green-wire.png
You need to put this file where your Factorio game is installed, into Factorio/data/core/graphics

If you don't like the colors you can adjust them with a software such a Gimp or another image editing tool.
Thanks! Ill try that out, seems to be better. They really need an extra view where connections are super visible.

You where also right regarding the failures we have experienced, found the R>0 missing in two places.
Must be my fault. Now that I know what to look for it was an easy fix. All stations have status signs for that now so we can spot any errors in the future. Im also contemplating filters to reduce chances of loading/unloading the wrong cargo.

With any luck we should now be in a stable state. Time to mess it up again :p
If I have the time Ill start work on my combined input/output station for storage tonight.
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

I have reworked the depot circuit a lot. It's still 100% compatible with the outposts, but I have changed parts of the implementation and also cleaned up the wiring.

Currently I am testing it in a real game. If it works well I will post it.

There's another potential problem that I have found during my testing:

If there is ANY negative value on the red bus, then the provider stations will not receive the correct routing information. I'm quite sure that the depot itself does not output negative signals which would cause problems, but if you do anything else on the red bus that involves negative values you will surely interrupt the protocol.

The fix is easy (this is the provider circuit): Image

I recommend to apply this fix in any case.
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 dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doxsroxs wrote:Im also contemplating filters to reduce chances of loading/unloading the wrong cargo.
I strongly recommend filters, at least at the requester stations. If you request multiple resources it is not possible to use all inserters for the unloading, because the stack filter inserter only has one filter slot.

It's simply unrealistic to assume that you're not going to make mistakes, or that the circuit is error free. Untangling the mess from unloading the wrong cargo into a requester is very annoying. Be defensive and set filters on your requesters, even if you know that nothing can go wrong (because that's never the case :).

At the provider the filters do not really help, of course for multi-product providers they are mandatory (I will post a detailed guide about this very soon).
With any luck we should now be in a stable state. Time to mess it up again :p
You should make sure that you have a solid set of blueprints for these stations, including loading and unloading facilities. Don't start messing around with individual stations, it's the road to hell. In Factorio in general it's important to stay consistent, and in this case that's particularly true. The system is complex and you simply go crazy if you don't have it under control.

It becomes really amazing as soon as everything is up and running and when you have blueprints for all the cases that you want to cover on your map.

Make sure you apply the little fix to the provider as shown above, it might be important (it certainly is if you ever put a negative signal on the red wire bus.

In general I do not recommend to touch the red wire bus at all (i.e. not write any signals to it), unless you're really sure it's OK.
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:

Release version

Post by siggboy »

I've tested the new depot and it works really well. Actually like clockwork. :mrgreen:

I've tested it for quite a few hours now in a real game, and the new depot circuit appears to fix all the remaining problems. I've also made a new demo map, much simpler and easier to understand. Please check the link at the top of the OP.

Here's a blueprint string for the entire blueprint book (depot, provider, requester, lane). Won't be really usable if you do not know the setup yet.
blueprint book
To upgrade from an old depot I'd recommend to make copies of the constant combinators, if you have changed any settings (very likely). Then remove the old depot and replace it with the new one. Restore your settings from the constant combinators.

Also don't forget to set the wagon count (as a negative number, like before, in the arithmetic combinator where the wagon loads are defined), and also adjust the outpost count at the polling circuit. Just go through all the constant combinators in the depot and think if you need to adjust anything.

The resource enumerator now needs to output "i=1" and the last value needs to be "g" (e.g. "g=25" if your last resource has the number 24). Check the blueprint how it's supposed to look before copying your settings.

The provider fix mentioned a few posts earlier should also be applied (it might even be essential, I'm not entirely sure). There's 100% compatibility with the old requesters and providers, though. Only the depot needs to be replaced.

I'll write a bit more about the changes another day.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

Thats awesome! Ill start testing :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

Seems I got everything working except where to change the number of wagons, seem to be set to one rail wagon at the moment.

Also cannot load the demo map, says its incompatible with my version of Factorio?

Image
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

The number of wagons is set in the arithmetic combinator that does the multiplication, right next to the constant combinators that store all the amounts "per wagon". There's another arithmetic combinator that subtracts "zero", you do not need this at the moment, but it will become clear what it's for when I describe the setup for multi-providers. (Leave that combinator alone, let it subtract "zero", it's basically doing nothing at the moment in your setup.)

The demo was created in the latest Factorio release 0.13.17, update your game and it will work.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

Post Reply

Return to “Combinator Creations”