Jump to content

Advanced (at least for me) automation problem


Recommended Posts

Hello!

Lately, I feel like I've been spamming the forums with overcomplicated problems, such as the one I'm about to explain. It's just that creating absurd problems for myself is so enjoyable (I guess I have a talent for that) and I'm having a blast trying to find solutions.
In this case, I'm a bit stuck. I don't have a background in informatics so, after a while when using logic circuits, my head starts to fume and my brain hurts.
I hope you can enjoy this as a challange, as it is for me.

So here is the problem! I want to build 4 decor fish tanks with the following requirements:

1) They need to be fully self sufficient automation wise
2) The population needs to be stable in each different tank
3) The pacus need to be of the Tropical variant (decor and aestetic reasons)
4) The water in the tank has to be around 20-30 degrees (part of living quarters, need to keep buddy buds alive)
5) The tanks need to be open to the world (so i can avoid cramped debuff, though this means no critter sensors)

My solution for the problem involves a 5th hot external birthing tank:
20200429133047_1.thumb.jpg.5dd7634eede063bdf2dc22a104feb5ec.jpg

 

This is a setup I built in debug, it just needs to simulate the automation part so it is simplified.

Pacus are kept wild. The idea is that every non tropical egg will be conveyed to the hot birthing tank in the bottom. Since the temperature in the 4 decor tanks is about 25C the vast majority of the eggs will be birthed as normal pacu, but if I move all the eggs to a hot room the next generation will mostly be tropical.
So eggs are automatically loaded into the converyors you might have a hard times seeing, but you can see their rails going out from the bottom. Each decor tank conveyor loader has 2 solid element sensors in their rail, to detect if a normal pacu/gulp fry egg is passing by before going into the main line that brings eggs to the birthing tank. The signal counter connected to the 2 element sensors is set to send a positive signal if the counter is zero. If an egg goes out of a tank, the system "will know", the signal counter gets set to 1, so after the not gate, the signal will become green. This will mean 2 things: ONE, the corrisponding conveyor shutoff will be active, accepting eggs, and TWO the bottom signal will become green, even if only one of the tanks detects an "egg loss". The or gates are there simply to break the signal so different tanks don't interact with a non corresponding coveyor shutoff.

At this point, the final signal leading to the bottom sweeper in the birth tank will become green only at set intervals decided by a signal pulser. This is to avoid overloading the line before an egg reaches its destination. So, once the pulser says yes (say around every 60 seconds) the loader will load just ONE tropical pacu egg into the depot (because the depot is set to accept only 1 egg) and then deactivate for 60 seconds due to the pulser. At this point, the other sweeper, on the top right, loads the single tropical pacu egg into the conveyor loader that only it can see. The egg will travel upwards and will enter in a shutoff that was set to green by detecting that its tank had lost an egg. Before being unloaded, but after a shutoff, it passes through another element sensor that detects tropic fry eggs and is connected to the original signal counter refresh port. When this happens, the counter is refreshed, it sends out a green signal that becomes red after the not gate and that tank section basically says "i'm ok now". This usege of the signal counter is basically the same as a memory toggle (...right?).

It works. There is only one problem that I can see: if more then one egg is taken away from a tank, the counter will read 2 or more, but when the first tropical egg arrives, around 40-90 seconds later, the counter sensor will be reset the counter to 0, forgetting about the extra eggs needed. I think the solution might not be hard with another counter sensor attached to the tropical egg sensor, but as I said my brain explodes when i try. Of course, if it was possible to DECREMENT the counter by 1 instead of refreshing it to zero, this would be immediately solved, but there is no trivial option to do that as far as I am aware.

So, how do I allow the system to sense when a tank needs more then 1 egg?
Alternatively, is there any easier solution that I'm not seing that still satisfies the 5 conditions?

I'll attach the test map, which is a mess btw, just ignore the rest. Also let me know if you want more pictures, may be of the conveyor rails.


Thank you for your attention!!

PetBoilerEndTube.sav

Link to comment
Share on other sites

50 minutes ago, suxkar said:

It works. There is only one problem that I can see: if more then one egg is taken away from a tank, the counter will read 2 or more,

How would that ever happen though?  If you start with a fish in the tank, it will lay exactly one egg before it dies.  That egg goes out, and exactly one egg is put back in.  You never end up with more than one egg in the tank.

Link to comment
Share on other sites

16 minutes ago, psusi said:

How would that ever happen though?  If you start with a fish in the tank, it will lay exactly one egg before it dies.  That egg goes out, and exactly one egg is put back in.  You never end up with more than one egg in the tank.

My apologies, I didn't specify it because I gave it from granted, but I intend to put multiple (around 10) pacus inside every tank. This is why the tanks are open (condition 5), so i can put many of them in a small amount of water, while still not cramping them, so they still reproduce.
This means that the likelyhood of removing and then needing more than one egg per tank is pretty high, considering an egg takes around 1 minute to be delivered.

EDIT: unless I made any mistake, since there are no critter sensor involved, the system should only work on variations. The base number of fish in the decor tanks is simply decided by how many eggs I put inside before turning on the system, the system just keeps such number the same.

Link to comment
Share on other sites

2 minutes ago, suxkar said:

My apologies, I didn't specify it because I gave it from granted, but I intend to put multiple (around 10) pacus inside every tank. This is why the tanks are open (condition 5), so i can put many of them in a small amount of water, while still not cramping them, so they still reproduce.
This means that the likelyhood of removing and then needing more than one egg per tank is pretty high, considering an egg takes around 1 minute to be delivered.

I see.  Could you disable the sweeper then while the counter is requesting another egg?  Or maybe not the sweeper, but open a rail shutoff so the additional egg can't pass until the replacement has been delivered.

Link to comment
Share on other sites

24 minutes ago, psusi said:

I see.  Could you disable the sweeper then while the counter is requesting another egg?  Or maybe not the sweeper, but open a rail shutoff so the additional egg can't pass until the replacement has been delivered.

Lol.. That is a very simple and obvious solution. Brilliant! I feel a bit ashamed for not having realized it, I guess I got too fixated on the counter sensor mechanics. Thank you very much @psusi, this is super helpful!!
Just to be clear, you are suggesting something like including the sweeper into the shutoff logic circuit, with a not gate, so that as long as the tank is in wait for an egg the sweeper is disabled, right? In this case, the only problem would be if a second egg is laid before the first egg reaches the egg sensors on the way out. To better the situation I could put the shutoff very close to the loader. In this case, the only, very unlikely, problem would basically be if 2 eggs are layed simultaneously. Am I correct?

EDIT: even simpler, put the 2 egg sensors directly after the conveyor loader

Link to comment
Share on other sites

2 hours ago, suxkar said:

Just to be clear, you are suggesting something like including the sweeper into the shutoff logic circuit, with a not gate, so that as long as the tank is in wait for an egg the sweeper is disabled, right? In this case, the only problem would be if a second egg is laid before the first egg reaches the egg sensors on the way out. To better the situation I could put the shutoff very close to the loader. In this case, the only, very unlikely, problem would basically be if 2 eggs are layed simultaneously. Am I correct?

Yep.  And you should be able to deal with that by using a conveyor shutoff instead so that if two eggs get loaded onto the rail the shutoff will close as soon as the first one passes and makes the second one hold.

Link to comment
Share on other sites

1 hour ago, psusi said:

Yep.  And you should be able to deal with that by using a conveyor shutoff instead so that if two eggs get loaded onto the rail the shutoff will close as soon as the first one passes and makes the second one hold.

Works like a charm. Thank you very much for helping me!! You have saved a big part of my base that I would have had to dismantle in case it didn't work! It would have been depressing!

As a side note, since I might need it in the future, can someone tell me how I would build a circuit that can decrement a counter sensor or at least to count onwards AND backwards?

Link to comment
Share on other sites

1 hour ago, suxkar said:

As a side note, since I might need it in the future, can someone tell me how I would build a circuit that can decrement a counter sensor or at least to count onwards AND backwards?

No amount of circuitry can change the fundamental way the counter itself works.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...