Content

Introduction

Formulation Calculations

Define a Formulation Method
Calculation Example
Unit Conversion
Stage Calculations
 

 

Introduction

Top ../../images/arwup.gif (846 bytes)

At the heart of the Formulation Module are various Labvantage calculations. These calculations are calculations for individual Formulation Ingredients, as well as the overall Formulations.

These calculations, for Formulation Ingredients and Formulations, must be go hand in hand. That is, an Ingredient calculation of Specific Gravity must be used with the overall formulation calculation of Specific Gravity. The Formulation Method assures that like calculations are used with like calculations for consistency when defining new Formulation Projects.

In the Formulation Method the different calculations that must co exist are defined in this abstract layer.

The formulation calculations used are grouped into the following categories.

Basic

Minimum calculation needed to properly manage recipe proportions and inventory etc.

Cost

Additional calculation to track and manage the overall cost of different ingredients and the whole Formulation.

Specific Gravity

Calculation that will calculate the overall Specific Gravity given the specific gravity of its inputs.

Other

Not provided out of the box, but additional calculations can be defined to calculate information about the overall formulation. For example, for an ice cream formulation, one can calculate the total fat, based on the fat content of the ingredients.

Lastly the calculations are sensitive to the recipe model of the project. Some calculations are only for the Proportional model, and some are only for the Quantity model.

 

Formulation Calculations

Top ../../images/arwup.gif (846 bytes)

When defining a Formulation Method determine whether the ingredients are to be entered in proportional or absolute quantities (Manage Formulation Recipe option). Depending on that choice, the following types of calculations can be managed for each Formulation.

Calculation Description
Part to Percentage Conversions The Formulation recipe is often specified in parts per either a weight unit, or a volume unit. A recipe that specifies 1 part of A, to 2 parts of B by weight will have 1/3 of the weight be of A, and 2/3 of the weight be of B. However, if they are different densities, then A's contribution to the volume of the mixture may be more or less then 1/3 the volume, as well as B's contribution of the overall volume.
Ingredient Calculations For "Proportional Quantities", the proportions (parts) are to be entered either as parts by Weight, or parts by volume.

For "Absolute Quantities", the absolute amount of each ingredient is entered with different weight or volume units.

The above entered values are used to determine contribution of the ingredient to the formulation in terms of Fraction/Cost.

The Formulation Method will define a parameter list for these Ingredient Calculations.  This permits the adding of Ingredients Calculations based on other attributes.  

For each ingredient, LabVantage needs to calculate the affect that ingredient will have on the overall formulation. Ingredients are defined as LabVantage Products, the Product defines what this ingredient contributes. The Product will have attributes that define a value per and unit. Some examples are:

Cost expressed in terms of $ per ounce
Fat expressed in terms of mg per lb
Calories expressed in terms of calorie per gram
These examples are always based on x units per weight unit. They also can be based on a volume unit. For example, they could have been specified as Mercury expressed in terms of ug per Liter.
Formulation Aggregate Calculations Once the individual ingredient calculations have been determined, the total of that value is added up across all the specified ingredients giving a total value.

Aggregate Calculations can simply sum the total of the Ingredient Calculations, or be extended to utilize additional cost values from processing Stages, Equipment used during manufacturing, or from columns like cost or the expected batch size of the Formulation (Product SDI).

Examples of these parameter lists are provided OOB.  These examples will cover both formulation recipe types, Proportional or Absolute.  At the Project level you could then extend these Paramlists or add additional Paramlists as required.

Comparator Calculations are special aggregate calculations that compare the results between different formulations of a project. Comparator Calculations can be used by any of the Aggregate Formulation Calculations. Some examples are:

"Savings" indicates the delta of Cost with respect to the Base Formulation.
"ParentSavings" indicates the delta of cost with respect to its Parent Formulation.
Stage Calculations Calculates the individual costs related to the different Stages of the Formulation. See Stage Calculations for more information.

OOB Formulation Methods

The following Formulation Methods are provided OOB.

Basic
Calculates the Total of Ingredient Costs.
Basic W Cost
Calculates the Total of Ingredient Parts and Costs.
Cost
Calculates Ingredient Cost and Formulation Total Cost and Savings only.
Overhead
Calculates any Overhead included for Stage or Equipment use.
Specific Gravity
Calculates overall Specific Gravity.

 

Define a Formulation Method

Top ../../images/arwup.gif (846 bytes)

To define a Formulation Method navigate to LIMS → Formulations → Formulation Methods. The Formulation Method list page opens.

 

Here you can "Add" new or "Edit" existing Formulation Methods. Choose to create a "New Version" of an existing Method.

To add a new Method click "Add". The Add Formulation Method page opens.

Provide general information about this Method.

Option Description
Formulation Method Enter a unique identifier for this Method.
Version
Version Status
Version Approved Date
The Version fields define the Version of the Method you are adding, the current Status of this Method, and if Approved, the date on which it was Approved.
Manage Formulation Recipe Choose to manage the Formulation Recipe using Proportional Quantities or Absolute Quantities. See Formulation Calculations for information.

A recipe using Absolute Quantities cannot have multiple parameters of the ParamType "Quantity" in the FormulationMethodParamLists.

A recipe using Proportional Quantities cannot have multiple parameters of the ParamType "Fraction" in the FormulationMethodParamLists.

Description Describe the purpose of this Method.
Notes Include any notes.

Define Formulation Method Parameter Lists

This detail defines the Parameter Lists to be used in the Formulation. Click "Add", the Select Parameter List dialog opens, choose one or more Parameter Lists.

Option Description
ParamList The Parameter Lists to be included for the Formulation.
Version
The version of the Parameter List selected.
Variant Parameter List Variant.
Target Use Choose the type of Calculation: Ingredient, Aggregate or Stage. See Formulation Calculations for a description of each. This defines at what level the parameterlist will be applied. It will either be applied to the individual Ingredient, to the Formulation as a whole for aggregate data (Aggregate), or to the individual Stages (Stage) depending on the value selected here, Ingredient, Aggregate, or Stage respectively.

Edit the Parameter List

Selecting a Parameter List and clicking "Edit" opens the Edit Parameter List page. Here you can make changes to the Parameter List.

Save the Formulation Method

Once Saved the Method is available when defining a Formulation Project.

Referencing a Formulation Method on the Formulation Project lets LabVantage know what parameter list (and resulting sdidata structure) to add to all new Formulations at the Formulation, Formulation Ingredient, and the Formulation Stage levels. This occurs when creating new Formulations, or the addition of new Ingredients and new Stages.

These sdidata structures are shown in the Manage Formulation data entry page (Manage Proportions). Shown below you see dataitems for the Formulation Ingredients in the first 7 rows, and additional dataitems for the overall formulation level shown in the last 4 rows.

  

Calculation Example

Top ../../images/arwup.gif (846 bytes)

This example illustrates the components needed to create the dataset displayed in the Example Formulation Grid below.

A Project is created using "Basic W Cost" as the Formulation Method, and "Proportional Quantities" as the recipe. The "Basic W Cost" Method includes the following 4 Parameter Lists:

ParamList Description
IngredientParts Includes the Parameters:
Parts (Paramtype "Part")
Upper Limit, Lower Limit, Fraction and Percentage.

Part, Upper Limit and Lower Limit are entered by the user in the Formulation Grid, Fraction and Percentage are calculated values.

IngredientCost Includes the parameter Cost (calculated). The calcrule is defined as:

${IngredientParts;*;*;*|Fraction} * LV.unitConv( ${link:Parent Product|ProductInformation|Cost}, ${link:Parent Product|ProductInformation|Cost;*;*;displayunits}, ${#;#;#;displayunits} )

The calcrule multiplies the Fraction of the "IngredientParts" paramlist with the Cost of the respective Raw Material Product. A unit conversion occurs, Product Cost may be defined as $/kg and displayunits of current parameter Cost is set as $/lb. The expression LV.unitConv(value, fromUnit, toUnit) is used for the conversion. Converts $/kg to $/lb.

FormulationTotalParts Includes the parameter Total (calculated). The calcrule is defined as:

sum([link:LV_ProductIngredient;s_productid|*|Parts])

This calculates the sum of the Parts entered for the ingredients of the Formulation.

FormulationTotalCost Includes the following parameters (calculated):
Total

This calculates sum of Cost calculated for each ingredient giving the overall ingredient cost.

sum([link:LV_ProductIngredient;s_productid|*|Cost])

Savings

This finds the delta of Cost with the Cost of base Formulation SDI.

NOTE:  All comparator parameters must have the term Comparator in the paramtype.

[sdirelation:Comparator|*|Total;Cost] - [Total;Cost]

Batch Total

This calculates the sum of the various costs defined in Stages, Equipment and overhead Costs of the Formulation and specifically calculates the cost using the actual batch size.

sum( sum([link:LV_ProductInstrument;s_productid|primary:Cost]) , sum([link:LV_ProductStage;s_productid|primary:Cost]) , [primary:Cost] , [Total;Cost]*[primary:expectedbatchsize])

ParentSavings

This finds the delta of Cost with the Cost of Parent Formulation SDI.

[link:Parent Product|*|Total;Cost] - [Total;Cost]

Ingredients are added to the first Formulation. The resulting Formulation Grid opens:

 

Enter values in the Parts, Lower Limit and Upper Limit fields. As you enter values the calculations are updated real time.

Parameter Lists defined in the Formulation Method

Parameter Lists as defined in the "Basic W Cost" Formulation Method provide the editable fields for Parts, Lower, and Upper Limits. Cost and Total Parts are calculated using attributes defined in the Ingredient Product. Formulation Totals are also calculated. The Total Cost Calculations are determined using calculated values from within this Formulation and values from other Formulations within the Project.

Ingredients included in the Formulation

As Ingredients are added to the Formulation they are included in the Grid. The Ingredient's Product provides the values in the columns highlighted in light blue. Here we have highlighted Product A, note that the Ingredient Cost and unit is pulled from the Product. Each Product listed as an Ingredient displays in the Grid. Adding or Removing an Ingredient from the Formulation updates the Calculations, real time, accordingly.

 

Total Cost Calculations

The Parameters included in the "Formulation Total Cost" Parameter List determine the Aggregate and Comparator Calculations shown in green.

 

Adding a new Formulation to the Project for Comparison

As additional Formulations are added to the Project the Comparative Calculations are performed.

 

Formulation 1.1 is a child of Tablet Formulation 1, a savings of -$3.06 $/lb is calculated.

View the Calculation Report to see details of the Calculation. Select a Calculation and click "Data Entry", then "Calculation Report".

 

Overhead Costs

In the following example we add an Additional Overhead Cost at the Project Level, and Overhead Cost for the Grinding Stage.

 

Add a New Formulation to the Project.

Note that the Batch Total now includes the two Overhead Cost amounts ($27.24 + 20 + 23 = $70.24).

  

Unit Conversion

Top ../../images/arwup.gif (846 bytes)

The Ingredients of a Formulation may be defined as a liquid or a solid. Quantities (or Parts) could therefore be defined as either volume or weight measurements. To determine the cost of each ingredient needed for mixing a Batch, Ingredient measurements need to match the unit defined with the Mixing batch size. The following Expression SDIs support the unit conversions required for different Formulation calculations:

UnitConv
UnitConvDataItem (Converts dataitem value to target unit. Source unit is the "displayunits" of the dataitem)
Supports unit conversion from units such as $/kg to $/lb. If LabVantage does not have a defined conversion rule from $/kg to $/lb, a conversion rule needs to be defined from kg to lb or from lb to kg.

Density Calculations

The Density of an ingredient may be used to determine its Cost contribution to the Formulation. To utilize the Density conversions you must:

Define a density parameter (within the Product) for each ingredient in the Formulation (leave the value empty if a Density is not needed).
Use the density Parameter lists included OOB (FormulationTotalCostUsingDensity and IngredientCostUsingDensity).

In the following example we created a simple Formulation to illustrate how density is considered when determining the Ingredient's Cost contribution to the Formulation.

Product 1 is defined with a Density of 1000 g/liter. First, the density of Product 1 is determined to be .45359 per liter. It is then multiplied by the defined cost per liter, .45359 x $10.00 = $4.53. That cost is then multiplied by the Fraction (which is calculated based on the Ingredients parts contribution to the Formulation). In our simple example Product 1 is 1/3 of the total Formulation. The Fraction, .333 is multiplied by the ingredient cost, .333 x $4.53. The Cost of Product 1 within this Formulation is $1.51 per lb.

Product 1.5 has a defined density of 1500 g/liter the calculation is as follows:

The Density is calculated to be .302394 per liter

.302394 x $10.00 = 3.02394 per liter

3.02394 x .333 = 1.00697

Since our Parameter display is set to 2 decimals places the cost is rounded to $1.01. 

 

 

Stage Calculations

Top ../../images/arwup.gif (846 bytes)

When Stages are included in a Formulation, Stage Calculations can be used to calculate additional costs for a each Stage, based on the Expected Batch size. Considering entered values such as, Efficiency per hour and a defined cost per hour, a more accurate Stage Cost could be determined.

Parameters and Parameter Lists can be defined for the Stage Calculation. When the Parameter List is associated with the Formulation Method used, a dataset is added for the Stage and values can be collected within the Formulation.

 

Stage Calculations should only be included when Individual Stages are defined (Support Individual Stages checked, and a Stage defined). If a Stage Calculation is used and a Stage has not defined, an error will occur.

 

Example

 

While an example Stage Calculation is not provided OOB you can use this example as a guide when adding your own. To calculate the cost of a Mixing Stage, using the Expected Batch size and an efficiency per hour value, we can calculate the hours necessary, multiplied by a defined cost per hour. Create the following Parameters and Parameter List.

Add Parameters

Add the Parameters "EfficiencyPerHour", "Hours" and "Cost".

Then add a Parameter List called "StageCost" and include the Parameters.

Define the Stage Calculations

This detail defines the Calculation Rule.

Parameter Calculation Rule
Hours [link:Product|primary:expectedbatchsize] / [EfficiencyPerHour;Standard]
Cost [Hours;Standard] * 50

Add the Stage to the Formulation Total Cost Parameter Calculation Rule

Add the following to the Formulation Total Cost Parameter list, Batch Total Parameter Calculation Rule.

Add the information highlighted in red:

sum( sum([link:LV_ProductInstrument;s_productid|primary:Cost]) , sum([link:LV_ProductStage;s_productid|primary:Cost]) , [primary:Cost] , [Total;Cost]*[primary:expectedbatchsize]), sum([link:LV_ProductStage;s_productid| *;*;*;* | Cost]))

Add the Stage Cost Parameter List to the Formulation Method

With the Stage Calculation defined, you can now add the Parameter List to the Formulation Method you intend to use when creating the Formulation.

Note that the ParamList is added and the Target Use is "Stage".

 

Add a Formulation

Within the Formulation we include a Mixing Stage and a Mixing Batch Size of 100 ml.

 

Upon Saving, the Stage dataset is added, view the dataset by clicking the dropdown menu and choosing "Manage Stage Data".

The dataset opens, enter the EfficiencyPerHour. The Hours and Cost are calculated according to the calculations defined above.

 

 

NOTE:   As Ingredient proporations are changed (in Manage Proportions for the Formulation), when those calculations are performed, the system automatically recalculates the Stage calculations.

The Calculation Report shows the Calculations performed.

 

Hours

 

Cost