Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5 6 ... 10

Author Topic: Stacking and Hauling Improvements (optimization)  (Read 29527 times)

Granite26

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #45 on: February 27, 2011, 05:50:48 pm »

I don't like the idea of institutionalizing the quantum dumps.

I'm not talking about institutionalizing quantum dumps, I was just talking about dump zones (which forbid items that go into them) that you unforbid.  There are reasons to use dump zones other than creating quantum stockpiles.  For example, dumping wood from the surface down a long pit to the magma forges, then unforbidding them at the bottom from time to time to save transit time on woodcutting.  (Besides, it's not a quantum stockpile if you're taking it to a real stockpile.)

More generally, any sort of mass-unforbid action will probably cause a big push to stockpile a huge number of items.

good points.

Just add 'stockpile to stockpile' to the list

blizzerd

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #46 on: February 27, 2011, 06:29:44 pm »

what about making wheelbarrows something a bucket is to a water pond or a soap is to a hospital?

only if an item is coming or going from a certain stockpile and to another certain stockpile the dwarf will pick up the wheelbarrow at the stockpile that he needs to pick up the item from to pick up the items and transport it to the second stockpile, then he does the next transport task until he becomes hungry or the end stockpile is full

so wheelbarrows only work for stockpiles, and using them intensively would increase speeds tremendously with moving stuff about
would that work?
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #47 on: February 27, 2011, 06:36:36 pm »

what about making wheelbarrows something a bucket is to a water pond or a soap is to a hospital?

only if an item is coming or going from a certain stockpile and to another certain stockpile the dwarf will pick up the wheelbarrow at the stockpile that he needs to pick up the item from to pick up the items and transport it to the second stockpile, then he does the next transport task until he becomes hungry or the end stockpile is full

The problem with that is that you'd have the dwarves dropping the wheelbarrow after every job, then needing to go pick it up again each time they need to use it again. 

If a dwarf is going to be a dedicated hauler, it makes sense for them to use the wheelbarrow any time they aren't going on break to eat or whatever.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Granite26

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #48 on: February 27, 2011, 06:43:00 pm »

Or, have it an equip setting for dwarves under the hauling screen.  HAUL (Odds, Ends, Wheelbarrow)

Silverionmox

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #49 on: February 27, 2011, 06:55:13 pm »

We could also let wheelbarrows (and minecarts) be associated with stockpiles like bins and barrels are. They would then only be used for jobs relevant to that stockpile (or possibly workshop). Useful for furnaces, that need a lot of coal, carpenters that need wood etc.

If that's too limited assigning them to burrows might work.

Assigning them to either places, persons or jobs will be necessary in order not too complicate the decision when and whether to use them too much.

In any case wheelbarrows need to be used only for many items, because they automatically generate an extra hauling job: bringing the wheelbarrow to where it is needed.

IRL, wheelbarrows are typically used for repeating, predictable large amounts of stuff. Like minecarts, but those require industrial amounts of stuff to be useful. I know a case of 16th-17th century quarrymen that quarried blocks of stone in underground tunnels. They used horses and carts to get the stone out, driving along the same route all the time. (The tunnels were later used to grow mushrooms...)
Logged
Dwarf Fortress cured my savescumming.

Granite26

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #50 on: February 27, 2011, 07:03:35 pm »

We could also let wheelbarrows (and minecarts) be associated with stockpiles like bins and barrels are. They would then only be used for jobs relevant to that stockpile (or possibly workshop). Useful for furnaces, that need a lot of coal, carpenters that need wood etc.
How do they get back to the stockpile?

Silverionmox

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #51 on: February 27, 2011, 07:28:04 pm »

We could also let wheelbarrows (and minecarts) be associated with stockpiles like bins and barrels are. They would then only be used for jobs relevant to that stockpile (or possibly workshop). Useful for furnaces, that need a lot of coal, carpenters that need wood etc.
How do they get back to the stockpile?
Finishing the hauling job would include bringing back the wheelbarrow. Or rather, the wheelbarrows would be at the furnace, and the haulers would got there to get instructions and equipment, do their jobs and when they're done a wheelbarrow full of coal is at the furnace, and the hauler free to take another job.
Logged
Dwarf Fortress cured my savescumming.

Maklak

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #52 on: February 27, 2011, 07:35:48 pm »

Even consolidating multiple jobs "haul goblinite armor from square A to stockpile B" would be a big improvement, and is simpler than checking proximity. This would also give us a workaround: Make a quantum dump in the middle of goblinite, dump everything, and then reclaim, so it gets hauled to stockpiles efficiently. There wouldn't be a need to create "haul many items" type jobs in job list, as long as Dwarf could TSK many jobs at once (but this approach is probably suboptimal). 

I'd also like to see an improvement to stockpiles: one pointer for taking items from another stockpile and one for giving to another stockpile. While not a true n:m relationship, it would still be more versatile than the current system, where a stockpile can be given items by many stockpiles, but one stockpile can give items to only one stockpile. With my suggestion giving and taking are functionally similar, but distinct. Any stockpile could give items to one stockpile and take items from one stockpile. That way you could have 1:n and n:1 in various combinations, and m:n would require a "relay" stockpile in the middle (m:n could be formed by m:1 and 1:n). It would ofc require coding various borderline cases (Can stockpile A take from B, while B gives to A? etc)

On Floodfill: you can do it only once for point A, and list enough items to fill wheelbarrow, and even do it as a breadth-first search, but ONLY PROVIDED you have information on items stored in tiles. AFAIK, tile doesn't know, what items are there, it it items, that know where they are. A pretty good way to quickly access information about nearby items would be to use Z-addresses. A Z-address is in short an integer generated from coordinates in such a way, that nearby Z-addresses usually mean that items are close, and for any given distance from initial point you can calculate minimum and maximum Z-addresses worth looking at. This property plus indexing points in space by their Z-addresses greatly speeds up dbscan clustering algorithm (from O(n^2) to O(eps*n^2 + n*log(n))).
http://en.wikipedia.org/wiki/Z-order_%28curve%29
http://en.wikipedia.org/wiki/UB-tree
http://en.wikipedia.org/wiki/Quadtree

NW Kohaku, please clarify, weather you want to optimize FPS time or Dwarf walking time.

As for wheelbarrows, I see them as backpacks / bins on wheels, and anything in them weights less for the purpose of carrying speed.
If Dwarf could store items in wheelbarrow driven by another dwarf, it could lead to rather amusing spam of "hauler cancels store item in wheelbarrow, wheelbarrow misplaced", and other bugs  :D

I remember another suggestion about improved hauling: workshops having miniature input stockpiles, that generate hauling jobs for materials for queued items, so crafters don't need to go themselves to nearby quantum dumps. Do the same for building walls.

I have another suggestion about improving proximity(A) to B type hauling: Mass melting. Melting would be more efficient if multiple items made of the same material were hauled to smelter before actual smelting. It seems more realistic to collect a whole batch of scrap metal before smelting, than burn all that coal to melt 1 bolt or cup or something, and get almost nothing from it.
« Last Edit: March 01, 2011, 03:29:06 pm by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #53 on: February 27, 2011, 08:17:01 pm »

I'd also like to see an improvement to stockpiles: one pointer for taking items from another stockpile and one for giving to another stockpile. While not a true n:m relationship, it would still be more versatile than the current system, where a stockpile can be given items by many stockpiles, but one stockpile can give items to only one stockpile. With my suggestion giving and taking are functionally similar, but distinct. Any stockpile could give items to one stockpile and take items from one stockpile. That way you could have 1:n and n:1 in various combinations, and m:n would require a "relay" stockpile in the middle (m:n could be formed by m:1 and 1:n). It would ofc require coding various borderline cases (Can stockpile A take from B, while B gives to A? etc)

I'm not sure I follow you on this one...

NW Kohaku, please clarify, weather you want to optimize FPS time or Dwarf walking time.

Either both or one or the other at different times. 

The entire purpose of stacking and hauling is to make dwarf times better to a certain extent, but at the same time, you can't completely ignore FPS time.  It's something that you have to balance.  I'm fine with slightly slower FPS in return for slightly saner dwarf behavior, especially if it makes many of the other things I really want to see from dwarven AI advances possible.

I remember another suggestion about improved hauling: workshops having miniature input stockpiles, that generate hauling jobs for materials for queued items, so crafters don't need to go themselves to nearby quantum dumps. Do the same for building walls.

Actually, I remember making an Improved Mechanisms suggestion where conveyor belts could be built that take items from an "output" tile directly to the stockpiles or "input" tiles of another workshop.  If it's something like the loom and dyer and clothier's shops, then threads can go from one shop to the next without requiring a hauling task at all on their way down the assembly line.

I have another suggestion about improving proximity(A) to B type hauling: Mass melting. Melting would be more efficient if multiple items made of the same material were hauled to smelter before actual smelting. It seems more realistic to collect a whole batch of scrap metal before smelting, than burn all that coal to melt 1 bolt or cup or something, and get almost nothing from it.

I'd like this, too.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Granite26

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #54 on: February 27, 2011, 08:44:10 pm »

We could also let wheelbarrows (and minecarts) be associated with stockpiles like bins and barrels are. They would then only be used for jobs relevant to that stockpile (or possibly workshop). Useful for furnaces, that need a lot of coal, carpenters that need wood etc.
How do they get back to the stockpile?
Finishing the hauling job would include bringing back the wheelbarrow. Or rather, the wheelbarrows would be at the furnace, and the haulers would got there to get instructions and equipment, do their jobs and when they're done a wheelbarrow full of coal is at the furnace, and the hauler free to take another job.
So an extra trip...  (not that that's horrible, it just needs to be explicit.  You don't start saving time until you're bringing three things at a time.

Bonus for wheelbarrow as a Labour setting:  Jobs pick dwarves, so if wheelbarrow is a labour, the job to haul stuff in a wheelbarrow can be created ahead of time.  The job knows it's a group job, the dwarf doesn't have to check.  That means they are bundled from the get go.

ikkonoishi

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #55 on: February 27, 2011, 09:51:42 pm »

Another thought on wheelbarrows.

Wheelbarrows are buildings. You place them, make a room out of them, and then choose a destination. You then choose whether this is a one time run or a continuing order. You can choose how many items will make a trip worthwhile, and what items the wheelbarrow should grab using the stockpile interface. If the destination is a stockpile then the wheelbarrow picks up what it takes automatically.

Dwarves run up, and fill the wheelbarrow with all loose items in that room. Then the dwarves take the wheelbarrow to the destination, and either dump it all on the floor or transfer it into the stockpile. If the building is set to a one time haul the building is deconstructed, or if it is set to repeat the dwarves rebuild it by taking the wheelbarrow back to it.

Wheelbarrow wrangling could be a skill with low skill dwarves moving slower or spilling items out along the way, and having to stop to put them back in. You could have multipliers for stair tiles making this more likely.
Logged
Our Dwarven instincts compel us to run blindly towards disaster in case there may be a ☼<☼giant cave spider silk sock☼>☼ lying around.

Uristocrat

  • Bay Watcher
  • Dwarven Railgunner
    • View Profile
    • DF Wiki User Page
Re: Stacking and Hauling Improvements (optimization)
« Reply #56 on: February 27, 2011, 09:55:36 pm »

It butchered your link.  You wanted to link to http://en.wikipedia.org/wiki/Z-order_%28curve%29
Logged
You could have berries on the rocks and the dwarves would say it was "berry gneiss."
You should die horribly for this. And I mean that in the nicest possible way.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #57 on: February 27, 2011, 10:00:25 pm »

Another thought on wheelbarrows.

Wheelbarrows are buildings. You place them, make a room out of them, and then choose a destination. You then choose whether this is a one time run or a continuing order. You can choose how many items will make a trip worthwhile, and what items the wheelbarrow should grab using the stockpile interface. If the destination is a stockpile then the wheelbarrow picks up what it takes automatically.

Dwarves run up, and fill the wheelbarrow with all loose items in that room. Then the dwarves take the wheelbarrow to the destination, and either dump it all on the floor or transfer it into the stockpile. If the building is set to a one time haul the building is deconstructed, or if it is set to repeat the dwarves rebuild it by taking the wheelbarrow back to it.

Wheelbarrow wrangling could be a skill with low skill dwarves moving slower or spilling items out along the way, and having to stop to put them back in. You could have multipliers for stair tiles making this more likely.

This sounds like way more micromanagement than it needs to be.  This sounds like more micromanagement than even the minecarts need to have.  You should be able to allow minecarts, which work as stockpiles, to run automatically.

I rather prefer wheelbarrows as just backpacks with bigger carrying capacities and which heavily reduce the penalties for carrying and reduce fatigue.  You don't have to do anything special besides allocate the wheelbarrow to a single dwarf, who carries it with him everywhere he goes when he is picking up multiple items.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Granite26

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #58 on: February 27, 2011, 10:23:28 pm »

Dunno, I could see some merit to that...  dwarfs treat the wheelbarrow as part of the stockpile?


It's micro, but not horrid micro, esp for mining...

I don't think it could.work for a repeat...

More like...  build it in the shaft, say 'fill' as a stockpile, then when you are done, say 'dump here' which sgould be close to where you want it...  i.e. your dump, or where you plan to build a stockpile....  makes a good addition to other options.

New stockpile setting:  max distance stockpile will pull an item from.

ikkonoishi

  • Bay Watcher
    • View Profile
Re: Stacking and Hauling Improvements (optimization)
« Reply #59 on: February 28, 2011, 01:31:00 am »

No micro unless you set it up for a one time haul.
You build the wheelbarrow up next to a craft shop, and increase the room size to include the craft shop.
Set the destination for the craft stockpile next to the depot.
Dwarves fill the wheelbarrow up with crafts till it is full, and then dump it at the destination. If it is set to repeat they then take it back to where it was before.

It basically acts as a one tile stockpile, but when it gets full it is emptied at another place.
Logged
Our Dwarven instincts compel us to run blindly towards disaster in case there may be a ☼<☼giant cave spider silk sock☼>☼ lying around.
Pages: 1 2 3 [4] 5 6 ... 10