Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the limiting ingredient in something similar to a chemical reaction
ResourceFunction["LimitingIngredient"][relation,available] finds the limiting ingredient given relation and available. | |
ResourceFunction["LimitingIngredient"][relation,available,properties] finds the values of the properties in the list properties given relation and available. | |
ResourceFunction["LimitingIngredient"][relation,available,All] finds the values for all the properties. |
LimitingItem | limiting item |
ExcessItems | items that are in excess with some left over |
LimitingItemRelation | association representing how the limiting item is consumed |
LeftOver | association detailing how many items are not consumed |
Relations | association representing how each item is consumed for each item |
Factors | information on what you would multiply the input "reaction" by to get a reaction for each item. |
Find the limiting ingredient for the construction of a car modeled as a reaction (as shown in Chem Libretexts).
In[1]:= | ![]() |
Out[1]= | ![]() |
Lists of properties are supported:
In[2]:= | ![]() |
Out[2]= | ![]() |
Get all available properties:
In[3]:= | ![]() |
Out[3]= | ![]() |
See the same reaction with different supplies:
In[4]:= | ![]() |
Out[4]= | ![]() |
Consider the sandwich example from OpenStax Chemistry Atoms First Second Edition Section 7.4 Reaction Yields:
For the reaction 1 slice of cheese+2 slices of bread⟶1 sandwich, how many sandwiches can we make with 28 slices of bread and 11 slices of cheese:
In[5]:= | ![]() |
Out[5]= | ![]() |
We can make 11 sandwiches with 11 slides of cheese and 22 slices of bread:
In[6]:= | ![]() |
Out[6]= | ![]() |
The cheese is the limiting item (or ingredient). The excess item is the bread:
In[7]:= | ![]() |
Out[7]= | ![]() |
2 laser printers, 14 desks, and 30 chairs are needed for 10 full-time faculty members and 20 full-time staff. We are given 201 laser printers, 1400 desks, and 3000 chairs. Compute the limiting resource:
In[8]:= | ![]() |
Out[8]= | ![]() |
In this case there are actually two limiting reagents: desks and chairs:
In[9]:= | ![]() |
Out[9]= | ![]() |
How many big pancakes can we make given a set of ingredients:
In[10]:= | ![]() |
Out[10]= | ![]() |
Wolfram Language 13.1 (June 2022) or above
This work is licensed under a Creative Commons Attribution 4.0 International License