Skip to content

Planner: spoil-buffer sizing (chest space to hold an item until it rots) #19

Description

@ApocDev

Some Pyanodons chains require a product to spoil before it can be used (the uranium chain, nagesium, and similar), so the item has to sit in storage until it converts. The planner should show how much storage that requires.

Storage needed is throughput (items/s) × spoil_time (s), converted to stacks with ceil(buffer / stack_size) and optionally to a chest count for a chosen chest type.

The data is already present: items carry spoilTicks and spoilResult (db/schema.ts:24-25, loaded at import-factorio.ts:298-299), and synthesize.ts:372-390 builds synthetic spoiling recipes (energy = spoil_ticks / 60, one item in, one spoil_result out, kind="spoiling"), so the spoil step is already a recipe the solver handles.

Surface the spoil time and required buffer wherever a spoiling step appears in a block, and let the user pick a chest type for the chest-count figure or just report stacks.

Related: #10 (low-throughput stock goals, of which a spoil buffer is one case), #20 (spoilage from items not being consumed in time).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: plannerProduction block / planning model

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions