DecCF./ˈdɛk.ɛf/

Declare allocations and fund needs

An object-array input describes user-editable records once. repeat() instantiates a component for each row, and its stable ID follows that person's entities, salary, and other outputs. This same input schema can power a UI with dynamic add/remove cards.

The family role and the Consumer Agency budget belong to the Household pack. Repeating the rows, calculating proportional shares, moving funds, and exposing component outputs are engine capabilities. Add a member by adding one row or by creating a new card in the Calculator; the engine binds the same template again for that stable ID.

allocation() can calculate shares without posting them. transfer() moves money between owners under a posting policy. funding() combines allocation and transfers when a declared need must actually be funded. These declarations share one allocation solver, so limits, priority, proportional weights, and shortfall behavior are consistent.

The Calculator App Editor's example picker includes Household budget · fixed contributions and Household budget · proportional funding. Open Calculator App Editor, choose Start from an example, then select either model to explore its contribution rules with Swedish tax and annual closings.

Weights can also come from numeric calculations exposed by a declared repeat: deccf.proportional({weights: weights.outputs.weight}). Include that repeat among the model components. The same stable-ID map form works for proportional overrides, priority requests and allocation limits; these monetary amounts use the model currency. Recipient IDs must match the method's weights or priority order. See the complete API reference for callable examples and validation.

Next: Read and value results.