Input Calculations are a powerful feature within Uncountable, giving you the ability to display derived values (ingredient ratios; formulation-level properties such as recipe cost or % solids; elapsed time; regulatory compliance; etc.) directly on the recipe view of experiments. This article will cover the types of Input Calculations available, how to configure them, and how to enable them within your experiments.
Input Calculations are by definition tied only to the inputs of an experiment, meaning the Ingredients and Process Parameters that are part of the Recipe. Categories and attributes tied to these Inputs can be factored into the equation and/or filtering logic of these calculations; however, Outputs cannot be used. Visit the Outputs Calculations article for an overview of Output Calculations and their use within Uncountable.
Input Calculations are accessed from Inputs / Outputs > Inputs > Calculations. You must have Write Inputs permissions within a material family in order to create new and make changes to existing Input Calculations.
To create a new Input Calculation, select “+ Create Calculation”. To edit an existing Input Calculation, select the name of the calculation in the list below.
Input Calculation Types
Standard
The most straightforward type of Input Calculation is “Standard”. Standard Input Calculations are used to display a recipe-level calculation tied to an experiment, either based on Ingredient amounts or Process Parameter setpoint values. A basic example would be a Feed Volume (mL) calculation that takes Feed Rate (mL/min) and Feed Time (min) Process Parameters as variables.
To create a Standard Input Calculation, select Standard and begin adding individual Entities as variables in the calculation:
In a Standard Calculation, Entities may be one of five possible types:
- Input – Specific Ingredient or Process Parameter that will be present within the experiment in which you would like the calculation to appear.
- Ingredient Attribute – An attribute of a specific ingredient (can also be a Process Parameter attribute, if applicable), which will be used as a factor of some sort in your calculation.
- Calculation – Another Input Calculation (must already be created).
- Weighted Sum – A weighted sum component that will itself be the sum of ingredients weighted by particular attribute(s).
- Step Quantity – The amount present within a recipe that is taken from one step (Parent Step) into another step (Child Step). Step Quantity entities are most commonly used to scale a calculation according to the actual amount of material taken from a preceding step.
Input
For Input Entities, you must select the Input (Ingredient or Process Parameter):
Once selected you can specify if you would like to “Include Ingredient Quantity Before Evaporation?”, which means the amount taken will be the value entered initially by you and not the remaining amount after applying percent-based evaporation. Note: Ingredient Evaporation is an advanced feature used to indicate that only a portion of the added ingredient is present in the final formulation. For more details, reach out to your dedicated Account Manager.
In addition, you can select to “Treat missing value as 0”, meaning that the Input value will be considered as zero if not present in the recipe. Note: If this option is not checked and the Input is not present in the recipe, the calculation will be displayed as blank.
Like all Entities added to a calculation, you may choose to modify the Variable Name, which defaults to the first word in the selected Entity. The Variable Name is the string you must use to refer to this Entity in the actual equation editor for the calculation, so it’s best to use something that is user-friendly and logical. Also note that the Variable Name cannot include any spaces or dashes, so use underscores or camelcase as needed (e.g., Variable_Name or variableName).
Ingredient Attribute
For ingredient Attribute entities, you must select the specific Ingredient Name and associated Attribute that you would like to reference. Note: While primarily intended to be used for Ingredient Attributes, you may also reference Process Parameter Attributes.
Similarly to the Input Entities, you’ll need to specify the Variable Name, if you wish to modify it from the default value.
Calculation
For Calculation Entities, you simply need to select an existing Input Calculation that you wish to reference as part of the newly created one you are configuring. Note that you may only reference other Input Calculations using this Entity type, not Output Calculations.
Weighted Sum
For Weighted Sum Entities, there are several more advanced configuration options. You may consider a Weight Sum Entity as an embedded, or component, calculation within your larger Input Calculation. For a Weighted Sum Entity, you will see the “Quantity” sub-entity already preselected, since this type of Entity is used to derive a weighted sum value of ingredients scaled by certain attributes.
In addition to the default Quantity Entity, you may add other Entities, allowing you to select from existing Ingredient Attributes. For example, you may select the Dry Density attribute of your ingredients to get a Weighted Sum representing the volume of your ingredients (mass / density = volume). When adding another Entity, you’ll notice there are several additional options to choose from. Taking the example of Dry Density, you may also add “Fallback Attributes” allowing you to determine the desired order in which attributes will be referenced. The most common use cases here are for the use of Ingredient Lots and/or Intermediate (or component) Experiments.
In your Weighted Sum Entity, you may wish to first check for the Density as a measurement on an Intermediate Experiment (recipe used as an ingredient), then check for the Density as a property of an Ingredient Lot (from a supplier TDS or measured internally), and then check for the Dry Density as the Ingredient Attribute (if none of the previous attributes apply). Such as configuration would look like the below:
You’ll note that for the Intermediate and Lot Attributes, you may expand the “Condition Match” section, which allows you to more specifically check for an Attribute (Output in this case) that is recorded with specific Condition Parameters, such as a Supplier, Method, Aging Condition, etc. To reorder these attributes to determine the priority order in which they should be referenced, simply use the three horizontal lines (a.k.a., “hamburger menu”) to the left of each Attribute.
Finally, there is a set of options to determine the behavior “If all attributes are not recorded for any ingredient”:
- Specify Default Value – Allows you to manually enter a default value to use if an ingredient (or intermediate or lot) does not have an associated value.
- Treat Attribute as 0 (Default) – If the attribute is not present, it will be automatically treated as being equal to zero.
- Treat Attribute as Infinity – If the attribute is not present, it will be automatically treated as being equal to infinity. More commonly used if the attribute will be in the denominator of the equation for a weighted sum entity.
- Display Warning – A warning will be displayed on the Recipe page, and the calculation will be blank.
- Display Warning and Return Zero – A warning will be displayed on the Recipe page, and the calculation will be displayed as zero.
Once you’ve selected your desired additional (sub-)Entities for the Weighted Sum entity, you may also choose to add filters, in order to restrict the Weighted Sum to only a subset of ingredients. You may apply these filters either based on Ingredient Categories, Ingredient Subcategories, individual Ingredients, Attributes and/or Quantities. Note: Separate filters are additive, meaning they are connected by an ‘AND’ condition, whereas options selected within a filter (if available) are connected by an ‘OR’ condition.
In the example above, the filters applied would result in the Volume Weighted Sum Entity being calculated only when the Ingredient Category is neither Polymer or Plastics (not equal to), AND the Ingredient Subcategory is Peroxide Cure (equal to).
After adding the desired (sub-)Entities and applying any appropriate filters, there are three remaining advanced options available to modify the behavior of your Weight Sum Entity:
- Sum Process Parameters Instead of Ingredients – By default (and in 99%+ of all cases), Weighted Sum Entities are used to calculate a weighted sum of ingredients; however, by checking this option, Process Parameter values will be summed instead.
- Include Ingredient Quantity Before Evaporation? – Same as the option available within the Input Entity type, when checked the calculation will utilize the ingredient amounts entered by you rather than those propagated to the final recipe (i.e., any amount assumed to be remaining after evaporation). Note: This only applies if you are using the advanced Ingredient Evaporation feature in your recipes.
- Component Experiment Behavior – This option allows you to determine how to handle component (or intermediate) experiments. By default, Weighted Sum Entities will use the “Explode” option, which will drill down into the individual ingredients present within component experiments and use associated attributes of those ingredients when computing the final Weighted Sum value. Alternatively, you may choose to “Use as Single Term”, in which case the intermediate experiment will instead be treated as one ingredient in the recipe. If using this option, you want to make sure to select an Intermediate Attribute as a Fallback when defining the Entities of your Weighted Sum Entity.
The final step of defining your Weighted Sum Entity is to design the equation. You can do this by manually typing in the Variable Names or using the pill buttons present below the equation editor to quickly populate the equation. You can use standard syntax for defining the basic arithmetic of your calculation, and then finally select “Submit” to save the changes to your Weighted Sum Entity:
Step Quantity
The final Entity type available in Standard Calculations is the Step Quantity. In this case, you must select a specific workflow, the parent step and child step. The Step Quantity Entity will then allow you to use the actual amount of ingredients that were used from a preceding (parent step) in a subsequent (child) step.
Once you’ve defined all the individual Entities of your Standard Input Calculation, there are several remaining steps available to configure your overall calculation:
- Set Workflow Step – This option allows you to restrict the entire Input Calculation to only a specific step per workflow, thus using Entities present only within those steps.
- Set Units – This option allows you to explicitly assign units to your Input Calculation, which will appear alongside the value.
- Normalization Settings – Relevant only when using the Normalization option available on the Recipe view of your experiments. If modified to Solvent vs. Default, the calculation will behave differently when normalizing a Recipe. For more details on this feature, reach out to your dedicated Account Manager.
- Enter Equation – This field is where you will enter the actual equation for your Input Calculation, which can include basic arithmetic syntax (+, -, *, /, etc.) or advanced Excel-style functions, such as average(), log(), if(), etc.
- For a summary of the available Excel functions, hover over the info (i) icon available above the equation editor:
- Notes – A basic text-only field used to provide additional context regarding the Input Calculation. Text entered here will be displayed on hover over the calculation on the Recipe page of your experiment.
- Tags – Used to identify and group together calculations. Tags then allow you to toggle groups of calculations to be displayed or not.
Weighted Sum or Average
Weighted Sum or Average calculations are perhaps the most powerful and scalable types of Input Calculations, giving you the freedom to have both recipe-level and ingredient-level calculated values tied to the components of your recipes. Many of the types of calculations you may be used to working with as a formulator are in fact Weighted Sums or Averages, like a formulation cost, or total % solids, or moles NCO. The first step when selecting this Input Calculation type is to then choose whether you want a Weighted Sum or Weighted Average aggregation behavior. While the two aggregation behaviors serve different use cases, the configuration options available for both are largely the same.
- Weighted Sum – Sum of all the components in a recipe weighted by one or more attributes associated with each ingredient (cost, % solids, density, etc.).
- Weighted Average – Average of all the components in a recipe weighted by one or more attributes associated with each ingredient.
Taking as an example the Pigment Volume Concentration (PVC %), which is a common Weighted Average calculation for paint formulations, there are several options available to configure:
- Aggregation Type – Defined upfront to specify the desired aggregation (sum or average) across ingredients that will contribute to the final calculated value.
- Quantity Basis – Used to determine the associated basis for the calculation: Mass, Volume or Moles. By default, calculations will default to a Mass basis, but can be switched if you are utilizing the Basis Units feature in Uncountable and have specific default conversions across Mass, Volume and/or Moles within your material family. For more details regarding Basis Units, reach out to your dedicated Account Manager.
- Total (Constant) – Allows you to scale your Weighted Sum or Average calculation by a fixed value, which defaults to 100 for all Weighted Average calculations (since these are most often expressed as a percentage).
- Type – Allows you to scale your Weighted Sum or Average calculation by an Input, Ingredient Calculation or Process Calculation. In essence, this simply allows you to scale your calculation based on a dynamic (rather than fixed) amount. You may choose a specific Input or another Input Calculation. Note: A Process Calculation must only use Process Parameters as Entities, otherwise it will be considered as an Ingredient Calculation. By way of example, this Type option is often utilized for scaling a recipe by a specific batch size (which would be entered as a Process Parameter Input).
- Attributes (Numerator and Denominator) – Allows you to select attributes that will be used in the numerator or denominator of your Weighted Sum or Average calculations. These must be numeric Ingredient Attributes, and you may select Fallbacks for each Attribute included in the calculation. See the Standard Input Calculation > Weighted Sum section for an explanation of Fallback Attributes.
- Add Filter – You may also apply filters to the numerator and/or denominator separately (in the case of a Weighted Average Input Calculation), thus restricting the scope of the calculation. See the Standard Input Calculation > Weighted Sum section for an explanation of Filters.
- Set Attributes Equation – Allows you to do basic arithmetic calculations on top of selected attributes. For example, if you wanted to use a Solids % attribute in a calculation to get you a Water % for each of your ingredients, you could apply a (100 – Solids %) subtraction to get to the Water %.
Once you have configured the overall Weighted or Weighted Average Input Calculation by specifying the desired Attributes, scaling constants or variables, and relevant filters, there are additional configuration options available (many of which overlap with those available in Standard Input Calculations):
- Include Ingredient Quantity Before Evaporation? – Same as the option available within the Input Entity type, when checked the calculation will utilize the ingredient amounts entered by you rather than those propagated to the final recipe (i.e., any amount assumed to be remaining after evaporation). Note: This only applies if you are using the advanced Ingredient Evaporation feature in your recipes.
- Component Experiment Behavior – This option allows you to determine how to handle component (or intermediate) experiments. By default, Weighted Sum Entities will use the “Explode” option, which will drill down into the individual ingredients present within component experiments and use associated attributes of those ingredients when computing the final Weighted Sum value. Alternatively, you may choose to “Use as Single Term”, in which case the intermediate experiment will instead be treated as one ingredient in the recipe. If using this option, you want to make sure to select an Intermediate Attribute as a Fallback when defining the Entities of your Weighted Sum Entity.
- Display as a Column? – This option allows you to display the calculated values for each ingredient as a separate column in the Recipe view of your Experiments, thus showing row-level values that contribute either to the Weighted Sum or Weighted Average. When displayed as a column, the calculated values can also be directly modified and locked as part of normalization workflows when designing experiments in Uncountable. By way of example, this could be used to display a Weight % or a Solids % contribution version of a formula.
- Workflow Behavior – Displayed only if “Display as a Column?” is checked, this option allows you to determine the way in which the calculation columns will be normalized, when using the Advanced Normalization features available in the Recipe page. Per-Step calculation columns will be normalized with respect to all of the ingredients in the current workflow step, whereas Entire Recipe calculation columns will be normalized with respect to all of the ingredients in the entire experiment.
- Override with Actual Values – If Actual Values are entered in the recipe (by toggling on the Actual Values column), the Input Calculation will use these actual values for ingredient amounts as inputs into the Weighted Sum or Average calculation.
- Set Workflow Step – This option allows you to restrict the entire Input Calculation to only a specific step per workflow, thus using Entities present only within those steps.
- Set Units – This option allows you to explicitly assign units to your Input Calculation, which will appear alongside the value.
- Make input calculation values filterable and plottable – When checked this allows the calculated values to be selected as the reference values to use when either filtering by or plotting ingredients. In essence, rather than filtering/plotting based on the entered amount (parts or percentage), ingredients can instead be referenced according to the associated calculated value.
- Use as Calculation Basis – When checked this option allows a Weighted Sum or Average Input Calculation to be used as a conversion factor (a.k.a., Calculation Basis) to convert across Mass, Volume, and/or Moles. This option tied to the Quantity Basis selection made upfront when configuring the overall Input Calculation.
- Set Normalization Settings – Relevant only when using the Normalization option available on the Recipe view of your experiments. If modified to Solvent vs. Default, the calculation will behave differently when normalizing a Recipe. For more details on this feature, reach out to your dedicated Account Manager.
- Notes – A basic text-only field used to provide additional context regarding the Input Calculation. Text entered here will be displayed on hover over the calculation on the Recipe page of your experiment.
- Tags – Used to identify and group together calculations. Tags then allow you to toggle groups of calculations to be displayed or not.
Date
Date Input Calculations are used in a relatively narrow set of use cases, but allow you to easily calculate an elapsed time relevant to the overall processing steps of an experiment. Date Input Calculations only work with Process Parameters of type Date or Timestamp, and they are used to perform a subtraction between these two Dates or Timestamps.
In the example below, and Aging Time is calculated by subtracting an “Oven aging start time” from an “Oven aging end time”, thus providing an elapsed “Aging time”:
- Date Subtracted From and Date Subtracted – Must be Process Parameters of either Date or Timestamp type. The Date Subtracted From is typically the latest of the two dates, as it will be the “larger” of the two.
- Use Component Process Parameters – When checked, the Input Calculation will check for the presence of the Process Parameter within component (or intermediate) experiments. This is particularly relevant in the case where you are utilizing a Test Sample structure for your experiments, where the initial date or time is present on the Parent Experiment, and the final date or time is present on the Test Sample.
- Set Workflow Step – This option allows you to restrict the entire Input Calculation to only a specific step per workflow, thus using Entities present only within those steps.
- Units – This option allows to determine the units displayed for the elapsed time (seconds, minutes, hours, days, weeks, etc.)
- Make input calculation values filterable and plottable – When checked this allows the calculated values to be selected as the reference values to use when either filtering by or plotting ingredients. In essence, rather than filtering/plotting based on the entered amount (parts or percentage), ingredients can instead be referenced according to the associated calculated value.
- Set Normalization Settings – Relevant only when using the Normalization option available on the Recipe view of your experiments. If modified to Solvent vs. Default, the calculation will behave differently when normalizing a Recipe. For more details on this feature, reach out to your dedicated Account Manager.
- Notes – A basic text-only field used to provide additional context regarding the Input Calculation. Text entered here will be displayed on hover over the calculation on the Recipe page of your experiment.
- Tags – Used to identify and group together calculations. Tags then allow you to toggle groups of calculations to be displayed or not.
Text Match
Text Match calculations allow you to display a conditional message on the Recipe page of your Experiments based entirely on matching logic associated with Ingredient Attributes. As an example, you may wish to know if an Experiment is REACH Compliant (EU regulation enacted in 2006), based on whether individual ingredients within the recipe are REACH Compliant. To do so you may utilize a Text Match Input Calculation:
- Select Ingredient Attribute – The Ingredient Attribute (typically Text or Categorical) that will be matched against.
- Any Match Words – If any of the words entered into this field are present for any ingredient in the experiment, the value for “Any Match” (in this case, Not Compliant) will be displayed.
- All Match Words – If any of the words below are present for all ingredients in the experiment, the value for “All Match” (in this case, Compliant) will be displayed.
- Unknown Value – If neither then “Any Match” or “All Match” criteria are met, the “Unknown Value” will be displayed.
The remaining options in this configuration window (Set Units, Set Normalization Settings, Notes and Tags) are the same as those described in the other calculation types included in this article.
Viewing Input Calculations
Input Calculations can be enabled at a Project-level or Workflow-level. Depending on the approach you have taken to structure and organize your experiments, either option may work best for you. The Project-level approach allows for more of a “set it and forget it” method, in which the Input Calculation will be displayed for all experiments within a project and its subsequently created child projects. The Workflow-level approach allows you to be more prescriptive in the way Input Calculations are displayed only for certain experiments, based on the workflow those experiments utilize.
Project Level
Input Calculations can be set at a project level at the time of creating a new project by selecting existing ones from the “Calculations Shown” dropdown menu.
If you would like to enable additional calculations after creating a project, you can select the cogwheel icon next to the project name on the Project Selection page, or the project info header on the dashboard of the current project:
Workflow Level
For added flexibility and configurability, you may also choose to enable Input Calculations at a Workflow level. Note that calculations enabled at a Workflow level will be additive to those already enabled at a project level. In other words, calculations enabled within a Project will still appear, even if they are not explicitly enabled in a Workflow.
To enable Input Calculations at a Workflow level, navigate to Inputs / Outputs > Workflows from the Navigation Bar:
After selecting the desired Workflow, simply add existing Input Calculations in the “Calculations Shown” dropdown list available in the right-hand workflow settings.
Recipe Columns
For Weighted Sum or Weight Average Input Calculations in which the “Display as a Column?” option has been checked (see details above), it is also possible to display these directly on the Recipe page of your Experiments. Once on the Recipe page of an Experiment, select the Calculation button in the ribbon (a.k.a., toolbar) and Show the desired calculation. In the example, below, the Weight Percent calculation has been displayed, which is now visible in addition to the primary Recipe column where the ingredient amounts were entered in parts. Note: The placement of the Calculations button in the ribbon may vary depending on customizations in place in your environment. You can always use the “Search Actions” field above to find the button if needed.
Calculation Sidepanel
Once enabled, Input Calculations will be displayed as additional rows on the Recipe view of your Experiments. If there is no specific workflow step associated with an Input Calculation, it will be displayed at the bottom of the recipe, otherwise it will be displayed at the end of its associated workflow step.
In addition to the default display of calculations as rows within the Recipe page, you may also display the Calculation Sidepanel, which is also available from the Calculations button in the ribbon mentioned above. Once selected a sidepanel will appear on the right side of the Recipe, listing all the calculations currently enabled either in the project or on the associated workflow.
By toggling the “Show individual calculation entity values” option on or off, you will also be able to see the details of each Entity contributing to the final calculated value. The Sidepanel view can also be particularly useful if you intend to use the Normalization features available on the Recipe page to target specific calculated values, as part of your experiment design in Uncountable.
+ Add Calculations Button
When viewing the Recipe page of an experiment, you may also directly add Calculations on the page by selecting the “+ Add Calculations” button. As long as you are within a Project, and at least one calculation has already been enabled within that Project, this button will appear at the end of each Workflow Step and the bottom of the entire Recipe. You can then enable existing calculations within the current Project or add a new calculation on-the-fly.