Yeah, cooking automation can be a pain... cancellations triggered by stack/item differences, bags used up for flour and leaves which causes other cancellations, etc.
Four concepts for consideration...
- You can look at work orders as existing in two groups, "make product because reagent supply is too high" or "make product because product supply is too low".
- You can look at cooking reagents as existing in three groups, those that require bags, those that can only be eaten if cooked, and those that can be eaten raw.
- Dwarfs with food preferences cannot seek their preferred food if it has been cooked, so not cooking that food allows them to find it
- Dwarfs that cannot find their preferred foods will seek the nearest food item, and you want them to find the cooked meals
Combining the first two considerations, you could have:
- stockpile A containing quarry-bush-leaves and cookable-milled-foods (gives to kitchen A)
- kitchen A with orders:
- cook 10 meals if quarry bush leaves > 200
- cook 10 meals if cookable powder > 100
- stockpile B containing all foods not in stockpile B and that are only edible if cooked (gives to kitchen B)
- kitchen B with one order:
- cook 10 meals if cooked meals < 100
- due to the way auto-orders for fat rendering happen, one kitchen will receive those orders, so once you determine which kitchen does, set that stockpile to allow fat/tallow.
*** This will ensure bagged foods are cooked sooner and non-bagged foods are cooked whenever.
Combining the last two considerations, you could have:
- smaller cooked meals stockpiles in the meeting places and a huge cooked meal stockpile feeding them
- edible-if-raw stockpiles some distance from the meeting areas, where vast mounds of crundle meat will sit in storage
*** This will ensure dwarfs that have a preference can walk to find their favored food and other dwarfs can find a cooked meal.