Is it possible to use one station for more than one fluid

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
neolithos
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Oct 25, 2016 3:42 pm
Contact:

Is it possible to use one station for more than one fluid

Post by neolithos »

Hi,
I tried to build a station, that can unload lubricant, light oil and acid.

But on my first test I noticed, that if you unload the light oil after you unloaded lubricant the light oil turns into lubricant :(

See picture:
20170503224200_1.jpg
20170503224200_1.jpg (878.68 KiB) Viewed 13108 times
After this, I destroyed the storage and rebuild it. And the tanks have the light oil symbol?
20170504000339_1.jpg
20170504000339_1.jpg (929.02 KiB) Viewed 13108 times
Is it possible to combine the fluid unload (with pumps)?
Or do I need to switch to barrel the liquids?
Last edited by neolithos on Thu May 04, 2017 2:35 pm, edited 1 time in total.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: It not possible to use one station for more than one fluid

Post by orzelek »

You can have 3 fluids per tanker wagon if you separate tanks (in wagon options) and then pump them out each to different pipes.
Your layout just needs 3 separate pipe lines to tanks not one. There is no way to have 3 fluids separately in one pipe.
neolithos
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Oct 25, 2016 3:42 pm
Contact:

Re: It not possible to use one station for more than one fluid

Post by neolithos »

Thanks for the hint with the 3 pipelines. I will test, if I can have a full (75k x2) waggon and unload it via a 3 different pipes in my 3 storage systems.
Normally, the tank waggon unloads until it is empty. So, it should work. And I can carry 3 fluids with one train over 2 stations.

Btw. this is ^^ a new way to produced fluids without any factory :? May be, I should open a bug report? Or is this not a bug?
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: It not possible to use one station for more than one fluid

Post by imajor »

I'm not sure I understand your setup correctly. On the top of the first picture those three pumps, are those filters for liquids? So one of them only pumps a certain type of liquid? (I thought that is not possible in factorio, but maybe that is something new in 0.15?)

EDIT: after taking a second look I think I get it, you used circuit network to enable/disable the pumps based on the fluid type in the train, correct? Good idea, I'm not sure why it wasn't working tho.
SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: It not possible to use one station for more than one fluid

Post by SyncViews »

You would need to be careful not to let even a single unit of fluid get pumped wrong by a conditional pump, which would mean ensuring the pumps for one fluid run until the input pipe is completely dry before allowing for a different fluid.

For example in your first picture when your unloading light oil, I guess intended for the middle set of tanks? But those tanks now got contaminated with lubricant, and there is some lubricant in the transfer pipe. If there was any lubricant in the transfer pipe when you turned on the light oil pump, if the light oil tank was empty and the lubricant was in the pipe section next to the pump (even if just 0.1 units) it would have pumped that in, then with your tanks having 0.1 lubricant you cant pump in any light oil at all (since fluids cant mix).

EDIT:
Im not sure its practical to control the pumps that precisely, but since Factorio doesn't allow fluids to mix at all you could maybe take advantage of that lack of physics by ensuring the tanks are never empty. If the tank/etc. is never empty. You could ensure this by having a pump on the outtakes with a condition that prevents it pumping the last of the fluid.
Last edited by SyncViews on Thu May 04, 2017 10:02 am, edited 4 times in total.
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: It not possible to use one station for more than one fluid

Post by imajor »

That is true, but the pumps supposed to suck all the liquids from the pipes, so when a new train arrives all the pipes supposed to be empty. Unless the previous train left too early, and the pump didn't finish removing all the liquids from the pipes.
SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: It not possible to use one station for more than one fluid

Post by SyncViews »

I guess the other problem is if the tank is full it will prevent the pipe being cleared, so you also need a condition to stop the station pump trying to empty the fluid wagon in that case.
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: It not possible to use one station for more than one fluid

Post by imajor »

Good point. Is it possible to connect a pipe to the circuit network and check the content? If so then it could give a warning sound to the user when the pipes are not empty, and there is no train at the station. If not, then a tank could be placed next to the pipe, only to be able to test if the pipes are empty. Moreover the whole station should be disabled until the pipers are perfectly empty.
neolithos
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Oct 25, 2016 3:42 pm
Contact:

Re: It not possible to use one station for more than one fluid

Post by neolithos »

Hui,

the planed setup/dream was:

I send a signal to the raffenerie, if in one tank fits a whole train of fluids (with the encoded type, bitmask). This is the task of combinator setup in the bottom.
Then the train will fill up with the correct fluid. And runs to the storage.
The storage reads the content of the train and activates the correct pump. Until the train is empty.

The problem of the setup is:

If even ~0.0 of fluid A is left in the pipe, the pipe will only transport fluid A, not the pumped fluid B. And it seems that the fluid B is converted to fluid A. May be a bug?
I need also to test to run the pumps a little bit longer, because the train will be emptied to null.

An other solutions will be that I transport the fluids with barrels. So, there is no problem with not emptied waggons or pipes.

Hopefully, I get time soon. Currently, the biters start to attack me and chew on my steel works :D . So, I need to invest more in my defense.
SpeedDaemon
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri May 22, 2015 3:31 pm
Contact:

Re: Is it possible to use one station for more than one fluid

Post by SpeedDaemon »

I haven't got to play with the new 0.15 pumps yet... do they still connect to the rail tanker even if shut down by the circuit network?

If not, I think your problem is that you have all of the pipes at the rail stop connected. Instead, put 3 pumps along each side of the rail tankers, like this:
HLP
TTT
LPH

T is the rail car, and H/L/P are pumps connected ONLY to the respective heavy/light/PG storage tanks. Read the contents of the train (can only have ONE type of fluid per train!), and enable the appropriate pumps. You'll only be able to pump with two pumps per car instead of three, though.

I would actually approach the problem completely differently: Now that we can hold trains at a stop until they're full/empty, I would do away with the storage tanks entirely, and just use the train itself as the storage, with one stop per fluid type. Arrange things so that there's always a full train waiting to pull in when one empties, with maybe a single storage tank to buffer the time it takes the new train to pull in. This same method can be used since .13 for lots of things where you'd previously have had a buffer for train unloading.
neolithos
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Oct 25, 2016 3:42 pm
Contact:

Re: Is it possible to use one station for more than one fluid

Post by neolithos »

Yes, the only way is to have 3 seperated pumps :( .
The reason is, that the conditions work with int's and the fluids with float's. So, you will never build a condition, to empty the whole system to zero. Hopefully the dev's will change/fix this sometimes.

This is a picture and the blueprint of the last notworking setup:
spoiler
@SpeedDaemon: I decided not to use the trains as storage in this 1 minute experiment. I let them wait on the loading point. The pro for this seems to be less waiting areas, less trains and less space for the rails. I have no idea how effective this will be and if I will get the rockets build fast enough.
The second target is to use less belts, I have a lot rainbow belts. That is funny to watch and surprisingly effective. I will try to do this also with the train system soon (btw. no mod use). But it will not be adaptable to the fluid system :(.
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by Engimage »

I will say it this way

No you should not even try to use same pipes for different types of liquids. Like never. No matter how you try you will still sometimes meet deadlocks cause of liquids mixing.

And if you try no matter what, you should never rely on pipes when it comes to fluid mixing. You should always attach pump input directly to a tank and circuit trigger respective pumps depending on type of liquid inside this tank.

so the best theoretical setup would be:

wagon - pumps - some pipes to the separator tank - pump (which will dry pipes out) - separator tank - several output pumps (max 3 obviously) - pipes to storage areas.
Output pumps should be wired to the separator tank with on state upon certain liquid >0

The difference with your build is obviously NO PIPES connected to separator tank as natural liquid flow mechanics will mess with all your logic. Remember that pipes do contain liquids as well as tanks.

And the longer is the pipe (one for example from wagon pumps to the drying pump before the separator tank) the longer it will take to dry them out so you got to have a delay between trains to ensure they do dry out.

And the worst case scenario comes when you just can't dry out separator tank cause output tanks are full. To prevent this you gotta make a pre-unload stacker station where trains can wait before they get to the unloading station. The wait condition should be the amount of liquid in storage tank < certain value letting you empty your wagons completely.

Another method can work if you know that your trains always contain a single type of liquid in all wagons.
You can attach 3 pumps to a wagon and instead of interconnecting their outputs they should separately lead to 3 respective storage tanks. These pumps should be wired to station and turn on only when train load contains their selected liquid. In this scenario the unloading speed will be limited to 1 pump but will cause no liquid deadlocks unless your train will brign two different liquids in wagons where this will fail completely.

Looking at your design I see you are not bothered by unload speed whatsoever so this might be the best way for you.
neolithos
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Oct 25, 2016 3:42 pm
Contact:

Re: Is it possible to use one station for more than one fluid

Post by neolithos »

PacifyerGrey wrote: ...
Looking at your design I see you are not bothered by unload speed whatsoever so this might be the best way for you.
A good summary. The last part is true, and I already changed the setup to 3 seperated trains and pipes. I decided, that I only want one train per fluid, they deliver all stations.
I got it working in "creative mode" ( did not know that it exist :mrgreen:), but how you explained it is pure luck (it work for ~20min).

It will work if the devs decide to supplent values under 1 and not push them forward.

But, I have no Idea how to form the idea/request for the devs. Or for the correct search term, to find an existing.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by aaargha »

PacifyerGrey wrote:so the best theoretical setup would be:

wagon - pumps - some pipes to the separator tank - pump (which will dry pipes out) - separator tank - several output pumps (max 3 obviously) - pipes to storage areas.
Output pumps should be wired to the separator tank with on state upon certain liquid >0
This break when there is 0.0 left of a liquid in the tank (not empty) and all the output pumps shut down. What you can do is use this as a starting setup and once the storage tanks contain the correct fluid you remove the circuitry from the separator pumps. Now you just have to make sure that there is always some fluid left in the storage tanks so that the pumps cannot begin filling them with the wrong fluid.

When doing it this way you don't get the 0.0 deadlock as the pumps are always running but the fluid logic keeps the fluids from getting in the wrong pipes. The setup below allows for full 3-pump speed from a single wagon, hence the 3 separator tanks. You could even have multiple liquids in the same rail tanker, just be aware that the system is limited to 3 different liquids (at least I think it is). So far it has survived 1.5+ h of constant usage.
Proof of concept
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by Engimage »

aaargha wrote:
PacifyerGrey wrote:so the best theoretical setup would be:

wagon - pumps - some pipes to the separator tank - pump (which will dry pipes out) - separator tank - several output pumps (max 3 obviously) - pipes to storage areas.
Output pumps should be wired to the separator tank with on state upon certain liquid >0
This break when there is 0.0 left of a liquid in the tank (not empty) and all the output pumps shut down. What you can do is use this as a starting setup and once the storage tanks contain the correct fluid you remove the circuitry from the separator pumps. Now you just have to make sure that there is always some fluid left in the storage tanks so that the pumps cannot begin filling them with the wrong fluid.

When doing it this way you don't get the 0.0 deadlock as the pumps are always running but the fluid logic keeps the fluids from getting in the wrong pipes. The setup below allows for full 3-pump speed from a single wagon, hence the 3 separator tanks. You could even have multiple liquids in the same rail tanker, just be aware that the system is limited to 3 different liquids (at least I think it is). So far it has survived 1.5+ h of constant usage.
Proof of concept
Awesome as always aaargha. Nice experiment.
This extends my own knowledge by a one thing. The pump won't work if there are different liquids on its ends. Makes sense.
I did actually think that liquid amount less than 1 is considered empty. If not I think we should push devs to do so. There is definitely a minimal value for that but it seams it is inconsistent causing those deadlocks.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by aaargha »

Got the idea from this awesome post by Yoyobuae.

My first thought was basically your setup but then it got stuck with 0.0 petroleum gas in the separator tank but no output to the circuit network. I'd guess that amounts less than 0.5 get rounded down to 0 when converting to circuit signals, but I'm not sure where the boundary lies.
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by Deadly-Bagel »

I'm not exactly an expert on fluid mechanics but a pump drains fluid from the container before it and puts it into the container after it - so if you have at most 1 pipe between pumps it theoretically shouldn't be an issue.

With that logic you could pump from the wagon to a pipe, another pump then a storage tank? You can have three pumps from that storage tank, each connected to it so the pumps ONLY work when it contains their fluid.

There are some fringe cases that might allow a drop to get through, but with buffers and clever logic I'm sure a reliable system could be achieved.
Money might be the root of all evil, but ignorance is the heart.
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by Engimage »

aaargha wrote:Got the idea from this awesome post by Yoyobuae.

My first thought was basically your setup but then it got stuck with 0.0 petroleum gas in the separator tank but no output to the circuit network. I'd guess that amounts less than 0.5 get rounded down to 0 when converting to circuit signals, but I'm not sure where the boundary lies.
Well while this was actually true for 0.14 there you could get decimals for liquids, this might be changed for 0.15 and has to be tested yet. The whole x10 multiplication was done specificly to address these issues so in theory the described issue might not exist now.
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by Engimage »

Deadly-Bagel wrote:I'm not exactly an expert on fluid mechanics but a pump drains fluid from the container before it and puts it into the container after it - so if you have at most 1 pipe between pumps it theoretically shouldn't be an issue.

With that logic you could pump from the wagon to a pipe, another pump then a storage tank? You can have three pumps from that storage tank, each connected to it so the pumps ONLY work when it contains their fluid.

There are some fringe cases that might allow a drop to get through, but with buffers and clever logic I'm sure a reliable system could be achieved.
The issue aaargha mentioned arised when a circuit network reported 0 liquid in a tank preventing pumps from activating but the game still thought the liquid is there effectively locking down the system.
So the game at that point was fine with decimals of liquid volumes but circuit network does not support decimals.
I hope 0.15 did fix this issue as it was specifically addressing it by multiplying liquid amounts by 10.
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Is it possible to use one station for more than one fluid

Post by Deadly-Bagel »

I think you can still have 0.1 units of fluid.

Buffers and timers, as long as you ensure there is room in the buffer tanks and leave the pump running for even 1/10 of a second after circuit reports 0 fluid there should be no way the tank still has anything left in it. Not saying it's easy or even tidy but it should be possible.
Money might be the root of all evil, but ignorance is the heart.
Post Reply

Return to “Gameplay Help”