Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How to keep fish from clogging water fluid logic doors?  (Read 1263 times)

Gag Halfrunt

  • Bay Watcher
    • View Profile
How to keep fish from clogging water fluid logic doors?
« on: November 07, 2017, 01:27:21 pm »

Is there any way to keep vermin fish (e.g. salmon) and their remains out of a water system supplied from a brook or river?

Playing 0.43.05 again after some hiatus, trying to implement some logic to automate a minecart system to load and lift deep magma up to shallow workshops.  Because that's the problem I want to solve.  Never mind whether it's a problem worth solving.

My minecart system uses a loading pit of 2 tiles above a larger drain sink and a single-tile sensor well.  One tile of the pit, with a grate and route stop to receive a dropped minecart, lies over the raised drawbridge that serves as drain valve and magma destructor.  The other tile, unfloored with hanging pressure switch to detect high fill level, lies above the sensor well, behind the drawbridge, with pressure switch to detect low level in the drain (implying no magma remains in the loading pit above).  The loading pit is isolated between a floodgate controlling magma supply and a door to allow egress (when dry) by pushing the minecart toward the next route stop, from which it can be guided back up to deliver its magma load. Track switches signal when the minecart rolls to drop into the pit and when it comes out of the loading trench.

After some FUN learning nuances of fluid logic SR latches (Water:Door:Switch:Door as described in wiki) I devised a robust 3-latch system to fill the pit when the minecart leaves (close egress door and raise drain drawbridge, open magma floodgate magma high), drain when the minecart has arrived and filled (lower drain drawbridge), and let a dwarf in to push the minecart out when drained (open egress door when magma level low).

Turns out "robust" may be a good adjective for the logic, it doesn't fit the physical implementation.  It worked a couple times... until some salmon remains settled at one of the latch doors to keep it from closing.  My water supply comes from a brook, plumbed downward to flow up through grates to keep big critters out... but not fishable vermin.  I built facility to drain for maintenance, but this vulnerability does spoil the desired "fire and forget" operation.

I can't see how a water fluid logic system can be made reliable against such vermin and their remains.  Don't some vermin (e.g. turtles) spawn spontaneously in any pool of water?

Drawbridges in place of doors for the latches would operate against such obstruction, but they're too slow to operate by the brief pulse from a minecart crossing a pressure switch (The magma level switch signals are longer; I suppose I could redesign for longer signals from arrival/departure switches under route stops).

The salmon remains that crippled my system might be an artifact of my supply system.  That may be preventable (how?), but live vermin can still get in the way.  Can a live salmon delay a door's operation too long for a momentary pressure switch signal to close?

DLS




Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: How to keep fish from clogging water fluid logic doors?
« Reply #1 on: November 07, 2017, 03:17:18 pm »

Vermin "fish" such as pond turtles are supposed to spawn only within 16*16 tiles (aligned to the border, so they're fixed, i.e. not relative to the location of the vermin source) containing a fish producing water source (river/murky pool/ocean...). Thus, placing the device further away from the source should stop spawning. Since vermin fish don't actually move, but rather blinks in and out of existence in a quantum fluctuation like manner that should be sufficient.
Logged

Charizard

  • Bay Watcher
    • View Profile
Re: How to keep fish from clogging water fluid logic doors?
« Reply #2 on: November 07, 2017, 03:25:53 pm »

Pressure plates stay triggered for 100 ticks after they're released, but the bridge won't raise again if it's pressed right after that.
Doors will kill vermin when they close, leaving remains, so they will get stuck.
Logged

Loci

  • Bay Watcher
    • View Profile
Re: How to keep fish from clogging water fluid logic doors?
« Reply #3 on: November 07, 2017, 04:23:19 pm »

A vertical design using hatch covers instead of doors should prove resistant to jamming. You'll need to float your pressure plates, though.
Logged

Gag Halfrunt

  • Bay Watcher
    • View Profile
Re: How to keep fish from clogging water fluid logic doors?
« Reply #4 on: November 07, 2017, 06:47:29 pm »

Pressure plates stay triggered for 100 ticks after they're released, but the bridge won't raise again if it's pressed right after that.
Doors will kill vermin when they close, leaving remains, so they will get stuck.
Huh.  Guess I FUBAR'd my prior test of bridge and floodgate operation by minecart pushed across pressure switch.  Tore it down and built it all again; now the bridges and floodgate wink out after the minecart passes.  Haven't tested whether they stay open long enough to operate my latches, but should do.

Thanks for setting me straight.
Logged

Charizard

  • Bay Watcher
    • View Profile
Re: How to keep fish from clogging water fluid logic doors?
« Reply #5 on: November 08, 2017, 03:55:09 am »

Pressure plates stay triggered for 100 ticks after they're released, but the bridge won't raise again if it's pressed right after that.
Doors will kill vermin when they close, leaving remains, so they will get stuck.
Huh.  Guess I FUBAR'd my prior test of bridge and floodgate operation by minecart pushed across pressure switch.  Tore it down and built it all again; now the bridges and floodgate wink out after the minecart passes.  Haven't tested whether they stay open long enough to operate my latches, but should do.

Thanks for setting me straight.
You're welcome!
You can see how long they take to open/close on the wiki: http://dwarffortresswiki.org/index.php/DF2014:Pressure_plate#Operation
Logged

Skorpion

  • Bay Watcher
    • View Profile
Re: How to keep fish from clogging water fluid logic doors?
« Reply #6 on: November 11, 2017, 03:17:52 pm »

Is there any way to keep vermin fish (e.g. salmon) and their remains out of a water system supplied from a brook or river?

Yes. Intensive fishing will exterminate the lot of them eventually. Otherwise, supply your water system from the brook/river via pumps and not natural flow. Powered off a water wheel, your only worry is winter ice. And that can be solved with some digging.
Logged
The *large serrated steel disk* strikes the Raven in the head, tearing apart the muscle, shattering the skull, and tearing apart the brain!
A tendon in the skull has been torn!
The Raven has been knocked unconcious!

Elves do it in trees. Humans do it in wooden structures. Dwarves? Dwarves do it underground. With magma.

Gag Halfrunt

  • Bay Watcher
    • View Profile
Re: How to keep fish from clogging water fluid logic doors?
« Reply #7 on: November 17, 2017, 11:54:34 am »

Yes. Intensive fishing will exterminate the lot of them eventually. Otherwise, supply your water system from the brook/river via pumps and not natural flow. Powered off a water wheel, your only worry is winter ice. And that can be solved with some digging.
"Eventually" is a longer time than I'm willing to wait, at least without letting more dwarves than I'd like spend their days fishing.  I still see salmon and shad blinking in and out, long after I got my system to work with bridge-gated "flood/drain latches" and fueled a couple dozen shallow magma workshops.  The necessary 40+ round trips Z+139 to Z+6 took some time, but no overseer intervention once started (OK, I did have to help out with one manual load because magma evaporated from a double pit for adjacent magma forges, but that was error in execution not design [should have filled first tile 4/7 before channeling second])

Is fish extermination still a thing in 0.43.05?  My reading of the wiki suggests fishable vermin spawn forever in wet places (in some areas, per PatrikLundell).  Maybe those are just pond turtles and mussels that won't clog doors?  Still, it seems sorta exploity or at least less than reliably short time.

Using bridges for "input" gates to flood/drain latches works fine with transient minecart-passage switch signals.  Appropriately mixing retracting bridges and drawbridges also adds flexibility.  Doors and floodgates only open and clear drainage volume on rising signal (Foff->Ton) and close without flow effect on falling (Ton->Foff) signals, respectively.  Drawbridges add flexibility to open or close on either signal; they destroy water to clear drainage volume on a falling signal.

Code: [Select]
Elevation view
w=water, x=floor/wall,
S=Switch, R=Retracting bridge (no floor),
D=Drawbridge (raised side), d=drawbridge (lowered extent)

  T:T     
               
  w R x x
  x S R x
  x D d x
  x x x x

  F:F

  x w x x x
  x D S D x
  x x x x x
Bridge left or above switch is the flood input gate. Bridge(s) right or below switch is drain input gate.  Combine desired form of input gates to build F:T or T:F latch

Lacking zero weight in their range settings, on arrival creature/cart switches can only trip OFF->ON not ON->OFF, so they're really only useful for active-T latch input gates.  The latch flood input is simple enough active-T or active-F, but active-T drain input needs two bridges and invades another Zlevel.

Fluid level switches (water or magma) can be inverted by appropriate choice of range, e.g. 0-4 vs 5-7, which is why I call the latches "flood/drain" rather than "set/reset".  A remote sensor that switches OFF at the desired level allows the simpler drawbridge F latch drain gate.  The latch flood input overrides the drain input; choose high or low level for the latch switch accordingly.

Timing effects aside, it seems to me that switch *transitions* (ON<>OFF), not *levels* (ON or OFF), are all that really matters.  A switch or lever steadily ON or OFF does nothing to hold an item state (e.g. open or closed); the item will respond when any other linked trigger *changes* to the other state (after the item's inherent delay from its last action).  This wasn't clear to me from reading the wiki, but I'm demonstrably none too bright.

My magma lift proof of concept works.  It takes a while to run using a single minecart, but still faster (for the dwarves) and much less tedious (for the overseer) than ordering load by load or powering a massive pump stack.  Another minecart route can be overlaid, but the control system risks failure (actually intolerable delay and single dwarven death; c'est la vie) if unfortunate (but likely) timing brings a cart to the loading pit at the wrong time in the other cart's sequence.  If I can work out a way to sequence carts on overlapping routes, it can be made much faster.  Film at eleven.
Logged