Formulate

Automatically calculate the optimal ingredient combinations using advanced optimization algorithms.

Overview

Labii Formulate is a powerful widget designed to streamline and optimize formulation analysis across industries such as feed, food, pharmaceuticals, and chemicals. It allows users to define ingredients, set nutritional or functional constraints, and automatically calculate the optimal ingredient combinations using advanced optimization algorithms. By supporting flexible units (g/kg, %, mg/kg), multiple optimization objectives (minimize cost, maximize key nutrients, or balance quality and performance), and real-time feasibility checks, Labii Formulate empowers scientists and production teams to quickly develop cost-effective, compliant, and high-quality formulations.

Use Cases

  • Animal Feed Formulation: Optimize ingredient inclusion to meet nutritional requirements for livestock while minimizing cost.

  • Food Product Development: Balance flavor, nutrition, and cost when designing recipes for packaged foods, supplements, or meal replacements.

  • Pharmaceutical Drug Formulation: Calculate exact excipient and API proportions to meet dosage, stability, and regulatory constraints.

  • Custom Blend Optimization: Design nutrient premixes, vitamin packs, or chemical blends with target specifications and ingredient constraints.

Settings

For the widget to function properly, configure the following settings first:

  • Ingredient Table Settings: Choose the ingredient table and columns to use for the formulate widget.

    • Ingredient table

    • Ingredient column (Cost)

  • Ingredient Component Table Settings: Choose the ingredient component table and columns to use for the formulate widget.

    • Ingredient Component table

    • Ingredient Component column (Ingredient)

    • Ingredient Component column (Component)

    • Ingredient Component column (Amount per kg)

  • Constraint Table Settings: Choose the constraint table and columns to use for the formulate widget.

    • Constraint table

    • Constraint Column (Formulation)

    • Constraint Column (Component)

    • Constraint Column (Min Value)

    • Constraint Column (Max Value)

  • Formulation Table Settings: Choose the formulation columns to use for the formulate widget.

    • Formulation Column (Ingredients)

    • Formulation Column (Total Inclusion)

    • Formulation Column (Batch Size)

  • Formulate Settings: Configure how the formulation should be optimized.

    • Optimization Target

    • Optimization Type

  • Consumption Table Settings: Choose the consumption table and columns to use for the formulate widget. This is used to track the consumption of ingredients in experiments.

    • Consumption table

    • Consumption Column (Source)

    • Consumption Column (Experiment)

    • Consumption Column (Amount)

    • Consumption Column (Unit)

Interface

The interface of the widget presents the formulated results comprehensively within a table. This table comprises several key aspects:

  • Optimization Target: Specifies the primary goal intended for the optimization process.

  • Optimization Type: Denotes the type or category of optimization being executed, providing clarity on the applied method.

  • Feasibility Status: Indicates whether the solution is feasible. If the solution is deemed feasible, additional informative details are displayed.

Detailed Feasibility Results

For feasible solutions, the interface extends to display:

  • Resultant Data: The effective results obtained from the optimization process.

  • Ingredient Composition: Shows the percentage breakdown of each ingredient involved in the formulation.

  • Batch Size Details: If batch size information is available, the interface further elucidates the actual size allocated for each ingredient, enhancing understanding of the formulation scale.

By offering a detailed breakdown of feasible results and additional batch size data, the widget interface ensures improved decision-making and optimization analysis.

Formulate

To execute the formulate process, simply click on the "Formulate" button provided in the interface. Once clicked, the system will begin processing the necessary data and computations. The results of this operation will be displayed immediately on your screen, allowing you to view and analyze the outcomes without any delay. The rapid response ensures that you can quickly make data-driven decisions based on the most current and accurate information available.

Corrections

In the event that the formulated problem is infeasible, consider modifying the constraints to achieve feasibility. Possible adjustments include altering the minimum and maximum limits of the constraints. Additionally, you can set aside or archive certain constraints temporarily. This process can be helpful in pinpointing which specific constraints are leading to the infeasibility issue. By systematically identifying and adjusting these constraints, you can work towards a solution that satisfies the requirements of the problem.

Create consumption in bulk

If the formulation is feasible and you wish to proceed with mixing the ingredients to fashion the desired product, you can enhance the documentation of the process by generating bulk consumptions. This approach ensures the system meticulously records the quantity of each ingredient utilized. Consequently, this information is seamlessly integrated with the inventory management system, facilitating real-time tracking and updates of stock levels. By employing this method, you can maintain a comprehensive overview of material usage and inventory status, helping streamline the overall production process and improve resource management efficiency.

Algorithm

The Labii Formulate widget utilizes linear programming (LP) as the core analytical method to optimize formulation design under defined nutritional, functional, and economic constraints. In this approach, each ingredient is treated as a decision variable xi, representing its inclusion rate (typically in percentage or kg per batch), and each component (e.g., protein, calcium) is a linear function of these variables.

The objective function is defined according to the formulation goal. For example, to minimize cost, the model seeks to minimize:

Minimize Z=i=1ncixi\text{Minimize } Z = \sum_{i=1}^{n} c_i x_i

where:

  • x_i is the inclusion of ingredient i,

  • c_i is the cost per unit of ingredient i,

  • n is the total number of ingredients.

Each component constraint is modeled as a linear inequality. For a given component j, the constraint is:

bjmini=1naijxibjmaxb_j^{\text{min}} \leq \sum_{i=1}^{n} a_{ij} x_i \leq b_j^{\text{max}}

where:

  • a_{ij} is the amount of component j in ingredient i,

  • b_j^{\text{min}}, b_j^{\text{max}} are the specified bounds for component j.

The total inclusion constraint ensures that all ingredient proportions sum to a defined total (e.g., 100%):

i=1nxi=T\sum_{i=1}^{n} x_i = T

where T is the target total inclusion (usually 100 or batch size in kg).

Additional bounds can be placed on each variable to restrict usage:

ximinxiximaxx_i^{\text{min}} \leq x_i \leq x_i^{\text{max}}

The solution to this LP model is found by identifying the values of x_i that optimize the objective function while satisfying all constraints. The feasibility of a formulation depends on whether such a solution exists within the defined bounds. This mathematical framework enables Labii Formulate to support diverse optimization goals—such as least-cost, nutrient maximization, or balanced formulations—while ensuring precise compliance with scientific and regulatory specifications.

Last updated