Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Megaproject hydromechanical component question  (Read 593 times)

Brian

  • Bay Watcher
    • View Profile
Megaproject hydromechanical component question
« on: October 03, 2010, 09:17:52 am »

Good day ladies, gentlemen, and what have you!

I have a working apparatus that is overly complicated and would like suggestions on how to simplify it. I have 8 inputs that are either active or inactive, and the output tells me how many are active. In my case I get a bit of a simplification because I just need to know if 1, 2-4, or 5+ are active. The design I have is 11x11x7 contained with water supplied on top and drainage on the bottom, and looks like this:

Code: [Select]
  --X--
  |~~~|
|-|-X-|-|
|~|-B-|~|
X~XB.BX~X
|~|-B-|~|
|-|-X-|-|
  |~~~|
  --X--

-| Walls
~ Water
X Flood Gates
B Bridges
. Hole

This shows 4 inputs-- The bridges and outside floodgates are controlled by a clock to load water. The inside floodgates are the 4 inputs (they go down when active). In each stretch of 3 water tiles there is a central hatch (also controlled by the load water clock) that leads to another floor of the same design (making 8 inputs total). Below the hole are 4 levels with pressure plates and a drain. With those pressure plates right now I can determine reliably the number of inputs whether it is 1, 2 to 4, or more than 4.

The problem is that for my project I need to make a LOT of these. Each one of these (two levels) has 12 floodgates, 8 bridges, and 4 hatches. I am looking for ways to reduce. Now I erred on the side of caution by making each input supply 4 full 7/7 tiles of water--I figured that would reduce the likelihood of evaporate or leftover 1/7 puddles from messing with calculations and indeed it is solid, but it's just too friggen complex! Halp!


For the curious here are some drawings of it in action:

Code: [Select]
Inputs North and West active, East and South inactive.

Clock at filling stage,
  --W--
  |WWW|      W is water
|-|-W-|-|    ~ is empty
|W|-B-|~|
WWWB.BX~X
|W|-B-|~|
|-|-X-|-|
  |~~~|
  --X--

Clock at calculation stage,
  --X--
  |WWW|      W is water
|-|-W-|-|    ~ is empty
|W|-W-|~|
XWWW.~X~X
|W|-~-|~|
|-|-X-|-|
  |~~~|
  --X--

Water flows down the hoooole
« Last Edit: October 03, 2010, 11:10:28 am by Brian »
Logged

Brian

  • Bay Watcher
    • View Profile
Re: Megaproject hydromechanical component question
« Reply #1 on: October 03, 2010, 10:47:21 am »

Small amount of progress:

Code: [Select]
--- ---
|~|-|~|
|~~X~~|
--X-X--
 |<B>|
 |-.-|
 |<B>|
--X-X--
|~~X~~|
|~|-|~|
--- ---


-| Walls
~ Water
X Flood Gates
<B> Bridges
. Hole

Old was 9x9, required 4 sides of water, 8 flood gates a level, and 4 bridges. New is 7x11, requires only water above, only 2 bridges and 6 flood gates per level. Still 4 hatches in each case. Total for two levels: 12 flood gates, 8 bridges, 4 hatches.

Edit: Oops it's just a simple arrangement to get the second design to be 9x9 as well.
« Last Edit: October 03, 2010, 11:09:52 am by Brian »
Logged

Brian

  • Bay Watcher
    • View Profile
Re: Megaproject hydromechanical component question
« Reply #2 on: October 03, 2010, 11:06:17 am »

I hope someone finds what I'm doing here somewhat useful someday  ::)

Code: [Select]
   --- ---
   |~|-|~|
---|~~X~~|---
|~~--X#X--~~|
--~X<<B><X~--
 |X#B-.-B#X|
--~X><B>>X~--
|~~--X#X--~~|
---|~~X~~|---
   |~|-|~|
   --- ---

-|# Walls
~ Water
X Flood Gates
B Bridges
. Hole

All on one level. No hatches. 12 floodgates total, 4 bridges total. 13x11, or 11x9 if I take out one square per input (currently 4).

Edit: The smaller size
Code: [Select]
  --- ---
--|~~X~~|--
|~--X#X--~|
|~X<<B><X~|
|X#B-.-B#X|
|~X><B>>X~|
|~--X#X--~|
--|~~X~~|--
  -------

Edit: Smaller Still
Code: [Select]
  --- ---
  |~~X~~|
----X#X----
|~~X<B>X~~|
 |X#B.B#X|
|~~X<B>X~~|
----X#X---|
  |~~X~~|
  -------
« Last Edit: October 03, 2010, 11:19:39 am by Brian »
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Megaproject hydromechanical component question
« Reply #3 on: October 03, 2010, 11:18:59 am »

I have a mechanism designed, built, and tested that does what you're trying to do in a 5X5X5 area, including the power source and maintenance access paths.  It uses a massive numbers of mechanisms and performs the calculation in gear logic.  I will publish the plans when the device is finished and ready to show.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Brian

  • Bay Watcher
    • View Profile
Re: Megaproject hydromechanical component question
« Reply #4 on: October 03, 2010, 11:22:02 am »

Hey thanks I'd like to see that. I realize I could turn my flood gates into doors for maintenance purposes, but when showing them on the forum I call them floodgates because that's showing their purpose.

I'm planning on needing 64 of whatever beast I pick  :-\


My mission, if I choose to accept it:
Code: [Select]
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
 |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X| |X#B.B#X|
|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|~~X<B>X~~|
----X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X-------X#X----
  |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~|   |~~X~~| 
  -------   -------   -------   -------   -------   -------   -------   ------- 

768 flood gates, 256 bridges, and 0 hatches :)
« Last Edit: October 03, 2010, 11:48:46 am by Brian »
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Megaproject hydromechanical component question
« Reply #5 on: October 03, 2010, 11:58:04 am »

Don't forget all the mechanisms needed to link every cell to an input on every adjacent cell.

I have been working on a Game of Life engine in Dwarf Fortress for some time now.  I had originally planned on a 16X16 array, but I may scale that back somewhat.  My design uses mechanical power overloading to perform the number of adjacent cells calculating, where a windmill provides a fixed amount of power and then one gear attached for each adjacent cell switches on when the adjacent cell is alive.  With careful management of the load I can use this method to halt a pump if more than a certain number of adjacent cells is on.

This design is extremely mechanism-intensive, the 16X16 array design will require over 12,000 mechanism alone, 1024 units of wood for the windmills, as well as parts for 512 pumps and I'm not even sure how many floodgates, doors, hatches, and other parts.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Brian

  • Bay Watcher
    • View Profile
Re: Megaproject hydromechanical component question
« Reply #6 on: October 03, 2010, 12:00:12 pm »

Hey I have the same goal :) Only going for 8x8 though. I do like your idea but isn't that a ton of loading to halt the screw pump?
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Megaproject hydromechanical component question
« Reply #7 on: October 03, 2010, 12:08:53 pm »

Hey I have the same goal :) Only going for 8x8 though. I do like your idea but isn't that a ton of loading to halt the screw pump?
A windmill in a high-wind area provides 40 power.  Each gear draws 5 power when engaged, and each pump draws 10.  If I have one windmill providing power for each cell, and on each cell one gear for each neighbor, and then one additional gear and two pumps, I have a mechanism where the pumps will halt if four neighbors are alive.  (40 power, minus 20 for the pumps, 5 for the always on gear, and 20 additional load for the four neighbors).  The mechanism is actually a bit more complex than that since I'm using the same pumps to do both the overpopulation and underpopulation checks for each cell, and then there's the sequencer logic and the system for keeping just enough water in the supply channels and drain system I'm still designing.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.