Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Job Manager & Stockpiles  (Read 829 times)

Eater of Vermin

  • Bay Watcher
  • [VERMIN_EATER]
    • View Profile
Job Manager & Stockpiles
« on: May 27, 2017, 11:52:05 pm »

In my current world there's 170 z levels beetween my Trade Depot and the Magma Forges.

To smooth workflow I've built Depots around the main stairwell at level 60 & 120...  comprising of a food/drink stockpile, a small 10 bed dorm, a small 8 table dining hall and two large custom transient stockpiles.

I've set up stockpile give/take & hauling routes so food, drink, changes of clothes, raw materials and some 'urgent' furniture items constantly trickle downwards from pile to depot to depot to pile while finished goods, etc. trickle back up.

So far it seems to work well.

Now I'd like to automate it, but I'm having trouble working out the best way to set up job manager to keep the system fed without swamping the source stockpiles.

Ideally I'd like to have a condition that assesses "when no. of <items> in <stockpile> is <condition>/<quantity>" but the best I've come up with is just guesstimating the total stock I need in circulation and setting that qty as a cap.  Which ain't as efficient as I'd like by a long shot.

Any ideas on other approaches?

 
Logged
Dances with Kobolds

(Mamba in the Magma...  one, two, char-char-char!)

Insert_Gnome_Here

  • Bay Watcher
  • Dosen't really care about anything anymore.
    • View Profile
Re: Job Manager & Stockpiles
« Reply #1 on: May 28, 2017, 08:36:18 am »

Some kind of insane minecart system would be pretty dwarfy?.
Logged
Quote from: Max™ on December 06, 2015, 04:09:21 am
Also, if you ever figure out why poets/bards/dancers just randomly start butchering people/getting butchered, please don't fix it, I love never knowing when a dance party will turn into a slaughter.

triskaideka

  • Bay Watcher
    • View Profile
Re: Job Manager & Stockpiles
« Reply #2 on: May 28, 2017, 06:51:26 pm »

If you link the end-stage stockpile to the workshop that will be using it so that the workshop only takes from that stockpile, I think that should cause the manager to only count the number of raw materials available in that stockpile.
Logged

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: Job Manager & Stockpiles
« Reply #3 on: May 28, 2017, 08:24:50 pm »

If you link the end-stage stockpile to the workshop that will be using it so that the workshop only takes from that stockpile, I think that should cause the manager to only count the number of raw materials available in that stockpile.
It does.

Now I'd like to automate it, but I'm having trouble working out the best way to set up job manager to keep the system fed without swamping the source stockpiles.
As far as I could tell, there is no way to set up a workshop order to limit output based on a stockpile's contents rather than the fort's contents. And with booze, you cannot tell if the barrel has 5 or 25 drinks in it, so a stockpile might have much fewer drinks than you want on reserve.

If overflowing your source stockpiles is a problem because you never want to recreate all the links to the little stockpiles, then create a reservoir stockpile, that feeds to the central stockpile.

My setup for cooked food and booze is like this. I have one 20 tile stockpile that feeds all of the little stockpiles, and I have one large reservoir that feeds the central stockpile. That 20 tile stockpile is created in the first year and is never replaced. The job manager has one order each for "cooked food", "brew plant", and "brew fruit". Each order has a "quantity < n" condition, and as the fort grows, n is increased (from about 100 to 500 then 1000 and 3000, then it stays there) and the number of workshops are increased, but the job orders are not recreated.

Check out this thread if you need haven't already.
Logged
Quote from: dragdeler
There is something to be said about, if the stakes are as high, maybe reconsider your certitudes. One has to be aggressively allistic to feel entitled to be able to trust. But it won't happen to me, my bit doesn't count etc etc... Just saying, after my recent experiences I couldn't trust the public if I wanted to. People got their risk assessment neurons rotten and replaced with game theory. Folks walk around like fat turkeys taunting the world to slaughter them.

Immortal-D

  • Bay Watcher
  • [Not_A_Tree]
    • View Profile
Re: Job Manager & Stockpiles
« Reply #4 on: May 28, 2017, 08:33:18 pm »

Alternatively, you could consolidate your Fortress somewhere in the middle.  Carve out a few large spaces in the vertical-middle of the map, bringing all your supplies down and your magma up.  I often end up with several abandoned sections of Fortress as I progress.

Eater of Vermin

  • Bay Watcher
  • [VERMIN_EATER]
    • View Profile
Re: Job Manager & Stockpiles
« Reply #5 on: May 30, 2017, 04:20:08 am »

If you link the end-stage stockpile to the workshop that will be using it so that the workshop only takes from that stockpile, I think that should cause the manager to only count the number of raw materials available in that stockpile.
It does.

Is that so?  Hmmm...  I can't see any way to incorporate that into my current system, but it's certainly good to know.  Thanks!

As far as I could tell, there is no way to set up a workshop order to limit output based on a stockpile's contents rather than the fort's contents. And with booze, you cannot tell if the barrel has 5 or 25 drinks in it, so a stockpile might have much fewer drinks than you want on reserve.

Yeah.  You put your finger on both the major problems.

I already have buffer stockpiles that 'take' from the appropriate w/shops 'give' to secondary stockpiles, which pass the goods down the line.  Ideally I'd like to set a workshops production so that it stops/starts to simply keep the buffer stockpile topped up.  But no can do, not in vanilla.   :'(


« Last Edit: May 30, 2017, 04:31:58 am by Eater of Vermin »
Logged
Dances with Kobolds

(Mamba in the Magma...  one, two, char-char-char!)

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: Job Manager & Stockpiles
« Reply #6 on: May 30, 2017, 06:57:17 am »

If you link the end-stage stockpile to the workshop that will be using it so that the workshop only takes from that stockpile, I think that should cause the manager to only count the number of raw materials available in that stockpile.
It does.
Is that so?  Hmmm...  I can't see any way to incorporate that into my current system, but it's certainly good to know.  Thanks!
It is useful for efficiency with heavy items. If the automated job does not trigger unless there are resources available in the linked stockpile, it will reduce job cancellation spam and also prevent your mason/furnace-operator from hauling stone 100+ tiles without a wheelbarrow. Instead, he will make better use of his time, getting a drink while the haulers do their job, or using the wheelbarrow to get that rock instead because the haulers are busy.

Going back to this link, you will see almost all of the examples limit the order by available source materials.
Logged
Quote from: dragdeler
There is something to be said about, if the stakes are as high, maybe reconsider your certitudes. One has to be aggressively allistic to feel entitled to be able to trust. But it won't happen to me, my bit doesn't count etc etc... Just saying, after my recent experiences I couldn't trust the public if I wanted to. People got their risk assessment neurons rotten and replaced with game theory. Folks walk around like fat turkeys taunting the world to slaughter them.

mikekchar

  • Bay Watcher
    • View Profile
Re: Job Manager & Stockpiles
« Reply #7 on: May 31, 2017, 02:08:24 am »

Not sure if this helps, but always try to "pull" production from the end to the beginning.  Let's say I want trousers with an image sewn on them.  I'll start with the "sew cloth image" job of size N.  At first I don't add conditions for this job.  Make it a one off.  Around the clothier's workshop I make a stockpile that can hold M trousers and M cloth.  Do yourself a favour and don't use bins.  M should be some factor of N.  So if N is 100, the M could be 10 (1/10 the size of N).  It depends on how fast you can fill the stockpiles.  You goal is to make M as small as you can so that the stockpile is never empty during production.

Next, I make a job for "create pigtail cloth trousers" of size O.  The 'r'eagent condition is O dyed pigtail cloth.  You want a clothier's shop with a stockpile that contains more than O cloth.  Normally O should be the number of trousers you can make in a day.  Often I set it to 1 because I don't care if my shops are idle -- it gives my dwarfs time to multitask.  The 'p'roduct condition should be M undecorated pigtail cloth trousers.  The "undecorated" is important here.  At first, don't try to automate the last step -- only the intermediate steps.

What's going to happen here is that when you start up, the trouser shop will realise that there aren't enough undecorated trousers and start making them.  As soon as one gets hauled the to image sewing shop stockpile, it will have an image sewn on it.  Eventually all the decorated trousers will be finished and you will be left with a stockpile with M undecorated trousers (which is why you want to keep M small).  But this will stop the trouser factory from making more undecorated trousers.  Later, when you decide to decorate more trousers, it will automatically start up again.

Do the same thing with you dye shop.  You need M dyed pigtail cloth for the decorating and O dyed pigtail cloth for the trousers.  So this means that you need a "dye pigtail cloth" job.  For simplicity, let's make the job size O as well (in practice I tend to always use O=1).  The 'r'eagent condition is O dyeable pigtail cloth (or whatever it is) and O unrotten dye containing powder (or whatever it is).  Your 'p'roduct condition is O+M dyed pigtail cloth.  Make stockpile near your dye shop just like the stockpile for the trouser shop.

Just keep going backwards for the loom, farmers workshop for the thread, mill for the dye, bags for the dye, cloth for the bags, thread for the cloth for the bags.

So in the end, you can make a "sew cloth image" job on the trouser decorating clothier for 100 trousers and it will automate everything you need for those 100 decorated trousers.  At *that* point you can guestimate how many decorated trousers you need to stockpile in your fortress to get your masterpiece trousers with masterpiece images and set up an automation job for it.   However, the more I play with this, the more I realise that I really only need this for mundane things like doors, beds, barrels, etc.  If I'm going to make swords, armour, etc it's going to be a one off job.  Setting up all of the intermediate stuff is great, though, because I can say "Make 10 steel swords" and it makes charcoal, smelts the ores, makes steel and then finally makes the swords -- all without having to keep large stockpiles of the intermediate goods.
Logged