Page 1 of 1

Train sheduling

Posted: Fri Sep 21, 2018 1:40 pm
by nosports
hello,

i have a problem - nai to big a word but i want to solve it.....

i don't use roboports for my base, but i want play around with automatic bordersecuring and expansion and so on, later maybe to use the experience for a megabase


So there is not a roboport net available and i want to prevent the powerusage coming from that.
My factory as such works like a charm for me without any roboports.

My plan is such :
I have supplierstations around my base from which a supplier train will load the needed things.
After fully loaded it will sit at a waiting position.

For the expansion i will build a feed-station to wich the train will be called unload bots and all needed things into a network.
then i will place the blue print and the network will carry along and build, hopfully extensible without being personally at site.

after the train is empty or all is filled to satisfaction, it should travel back and reload all und then again to the waiting station.

So the problem is, how to prevent the train to circle the supplier-station in my base endlessy with out need ?

The only way i can thing of is to have the condition at the waitingstation for 'empty cargo' which will be true, but how to kick the train alive to travel to a needy feeder-station automatically????

I can think of of adding a circuit condition with 'or' looking for a needy feeder-station - but for this i need to sting a singal-wire the whole way back to the waiting-station of the train. I want to prevent this for obvious reasons ;)

On secound thoughs while writing this .....
is it possble to make circuit-condition beside the waiting-station grabing a station (true/false) without a signal wire to the station ??

Re: Train sheduling

Posted: Fri Sep 21, 2018 2:24 pm
by DaveMcW
Use the circuit network to turn off the expansion train stop when it has enough supplies.

Details:
1. Make a constant combinator listing all the supplies you want, but with negative numbers.
2. Connect this combinator to your chests and train stop with red wire.
3. Set the train stop, Mode of operation: Enable/disable, Enabled condition: Anything < 0

Re: Train sheduling

Posted: Fri Sep 21, 2018 3:36 pm
by nosports
DaveMcW wrote:
Fri Sep 21, 2018 2:24 pm
Use the circuit network to turn off the expansion train stop when it has enough supplies.

Details:
1. Make a constant combinator listing all the supplies you want, but with negative numbers.
2. Connect this combinator to your chests and train stop with red wire.
3. Set the train stop, Mode of operation: Enable/disable, Enabled condition: Anything < 0
Hello,

I will try - but i think the train will then circle through all supplierstations endlessy even if the cargo is full then...

Re: Train sheduling

Posted: Fri Sep 21, 2018 5:06 pm
by Zavian
If the supplier station is the only enabled station on it's route it will wait there.

Re: Train sheduling

Posted: Sat Sep 22, 2018 6:58 am
by nosports
Zavian wrote:
Fri Sep 21, 2018 5:06 pm
If the supplier station is the only enabled station on it's route it will wait there.
i have some stations not only one supplier station.

Re: Train sheduling

Posted: Sat Sep 22, 2018 8:00 am
by Zavian
What matters is how many enabled stations are on a train's route. If there is only one enabled station on a train's route, the train will go to that station and wait until another station becomes enabled.

Re: Train sheduling

Posted: Sat Sep 22, 2018 8:11 am
by nosports
Zavian wrote:
Sat Sep 22, 2018 8:00 am
What matters is how many enabled stations are on a train's route. If there is only one enabled station on a train's route, the train will go to that station and wait until another station becomes enabled.
Yes but i can't close my supplier stations, because other trains will need also some supplys

Re: Train sheduling

Posted: Mon Sep 24, 2018 12:02 am
by evopwr
I typically do one (or more) trains per supplier station.
Don't have a train going to multiple supplier stations.
Then you can disable the destination stations when they don't need anything,
This will cause the train to stay at the supplier station.

But yes youre right, if you have a single train going to several supplier stations, then disabling the destination station will still cause the train to cycle around all the supplier stations. Hence only option is 1 train per supplier station.

Re: Train sheduling

Posted: Mon Sep 24, 2018 5:50 am
by zOldBulldog
What I like to do:

- Create two trains per mine of a given ore.
- A large stacker at the base unload stop for that ore.
- All mine stops of that ore use the same name.
- Each mine stop has a queue position right behind the stop, where a train may wait if the mine is running out and the other train takes long to load.
- If the load and queue mine positions are occupied, the mine's station is disabled and accepts no more traffic.

This way the closest mines are fully used first, the base is kept supplied with as much ore and as fast as the available trains can deliver it, and you just need to check every so often to see if a mine is tapped out.

You can find blueprints and instructions for this here: https://factorioprints.com/view/-LCyNqfc04vWxjS8v8DG

Re: Train sheduling

Posted: Mon Sep 24, 2018 7:47 am
by nosports
I come up with an solution which adds an intermediate storage.

An additional supplier train will feed this intermediate storage, thouse only make a cycle if the intermediate storage will run low (empty train).

The actual to be supplytrain will take the thinks from the intermediate storage and deliver it out.

leading to :
* adding a additonal train & storage
* space useage

what the heck - its good to use all the produced thingies :D

Re: Train sheduling

Posted: Mon Oct 08, 2018 8:23 am
by nosports
So i may found the correct solution for this problem.......

I place a rail-signal just behind the delivery station and link that with the chests.
Set a decider-combinator which check if any of the chests drop below 1 and then give out a signal to open the railsignal.
2018-10-08 10_15_57-Factorio 0.16.jpg
2018-10-08 10_15_57-Factorio 0.16.jpg (85.06 KiB) Viewed 4292 times
So the train will get a free way and travel around, gather the supply and deliver it.

If all chests are above '1' then the rail signal will be closed due to the decider-combinator.

I don't know if the train will burn fuel at waiting, thats to look at for now.....

If this will work then the train will only ride on low supply :D

Re: Train sheduling

Posted: Mon Oct 08, 2018 10:15 am
by nosports
i found a little loop hole in it.

If a chest is totally empty there is no signal so the rail signal will not open due to waiting for a signal :oops:

so i added some deciders which will thow a signal if a chest is empty....
2018-10-08 12_10_08-Factorio 0.16.jpg
2018-10-08 12_10_08-Factorio 0.16.jpg (138.86 KiB) Viewed 4287 times
seems to work now....

Re: Train sheduling

Posted: Mon Oct 08, 2018 12:56 pm
by quyxkh
I use a negative-means-want convention, so I'd have a constant combinator with how much of each item I want as a minimum buffer, -100 green wires and so on, wire that up to all the chests and a single Anything < 0 decider to call for a refill train.

Re: Train sheduling

Posted: Mon Oct 08, 2018 1:44 pm
by nosports
quyxkh wrote:
Mon Oct 08, 2018 12:56 pm
I use a negative-means-want convention, so I'd have a constant combinator with how much of each item I want as a minimum buffer, -100 green wires and so on, wire that up to all the chests and a single Anything < 0 decider to call for a refill train.
Thats a nice idea - but you have to adjust every single buffer for the number ?

Re: Train sheduling

Posted: Mon Oct 08, 2018 2:07 pm
by quyxkh
For minimum fuss you could wire all the chests to two deciders, one's a feedback-wired Each>1⇒1 Each item latch, the other a Anything<100⇒Green call-for-refill.

Re: Train sheduling

Posted: Mon Oct 08, 2018 3:09 pm
by mrvn
You can use a little trick of having a station with no path.

For example you have a schedule like this:

Belts: belts < 200
Poles: electric poles < 50
Rails: straight rails < 300
Stacker: inactivity 5s
Expansion: circuit condition: green > 0

So the train will load up on belts, poles, rails and wait at the stacker for 5s. In your current setup with no Expansion station existing or being enabled it would then circle around.

But if you simply create a dummy Expansion station that isn't connected to your rail network then the train will remain in the Stacker station flashing "No path". When you build a new Expansion station that is connected to the rail network it will find a path and drive off. Destroy the station again and it will get stuck at the Stacker again.

Re: Train sheduling

Posted: Mon Oct 08, 2018 3:56 pm
by steinio
Why connect a rail signal and not send to train and wait until circuit signal?

Re: Train sheduling

Posted: Mon Oct 08, 2018 4:21 pm
by nosports
steinio wrote:
Mon Oct 08, 2018 3:56 pm
Why connect a rail signal and not send to train and wait until circuit signal?
Hell yeah that also works - did not know that :P :lol: