Core objects for comparing a recipe and its actual output¶

In the context of mass balance, these entities represent the actuals, i.e. the "as executed" production data. While the Core Objects entities describe the theoretical structure (the "shopping list"), these entities capture the physical movement of material during production.
Below is an explanation of how these entities interact to track what was actually consumed and produced.
The execution core: OperationResponse¶
OperationResponse is the central record of a completed or ongoing production step. In a mass balance calculation, it functions as the transaction header, providing the contextual frame for all material movements associated with that execution.
Tracking the flow: Inbound vs. Outbound¶
To compute an accurate mass balance, the system must track the exact physical units of material that enter and exit the process. This is achieved through two key specification entities:
-
OperationResponseMaterialLotSpecificationIn Represents the total input. It records the specific
MaterialLotId(e.g., a particular batch of flour) and the quantity consumed during the operation. -
OperationResponseMaterialLotSpecificationOut Represents the total output. It records the resulting
MaterialLotId(e.g., the batch of dough or cakes produced) and the quantity generated.
The physical unit: MaterialLot¶
The MaterialLot represents the physical carrier of mass. Where MaterialDefinition describes a concept (e.g., “Flour”), MaterialLot identifies a specific, tangible quantity, such as a pallet, batch, tank fill, or container, with its own unique ID.
- Relationship: Both In and Out specifications reference
MaterialLot, enabling the system to verify how the mass of Lot A (input) transforms into the mass of Lot B (output).
Mass balance component summary¶
| Mass Balance Component | Entity / Field | Logic |
|---|---|---|
| Input | SpecificationIn.Quantity | The sum of all lots consumed in the operation. |
| Output (Product) | SpecificationOut.Quantity | The sum of all lots produced (finished or semi‑finished). |