Skip to content
View Categories

Managing Ingredients

LPSolve Managing Ingredients

Hello, and welcome to this LPSolve Knowledge Base video. In this episode, we’ll look at how to manage Ingredients and nutrients within the LPSolve formulation matrix.

Ingredients are displayed as rows in the main ingredient matrix. The first column lists the ingredient names, followed by columns for cost and the minimum and maximum inclusion levels used by the linear programming algorithm. To the right of these are the nutrient columns. Nutrients that have a minimum or maximum constraint are highlighted in blue, while nutrients without constraints appear further to the right.

When you modify the nutrient composition of an ingredient, the edited cell is highlighted to indicate the change. You’ll also see the word Save appear in the row header. This indicates that the formulation has been modified and that action is required.

At this point, you have three options for managing the change.

First, if the ingredient will be used in multiple formulations, you can save it to the local ingredient library, which is stored in the application data folder. Ingredients saved here are automatically loaded with every LPSolve simulation file, making them available across all future formulations.

Second, you can save the current simulation file. In this case, the modified ingredient will be retained only in that file and will not be written to the local ingredient library.

Finally, if the change is temporary, you can close the file without saving. The ingredient’s original nutrient composition will then be restored the next time the file is opened.

You can increase or decrease the number of ingredients in the matrix using the drop-down selector above the main matrix. It’s important to note that the formulation system requires all rows to be populated; empty rows will prevent the model from running correctly.

To add a new ingredient, begin typing its name into an empty row. As you type, LPSolve searches both the permanent ingredient library and the local ingredient library, displaying matching results. You can also select an ingredient directly from the drop-down list.

Another way to add ingredients is through the Ingredients menu, where you can open the ingredient library. Ingredients in the library are organized by category, allowing you to narrow your search to a smaller subset. Simply select a category, choose an ingredient, and click OK to populate the matrix.

When an ingredient is first added to the matrix, its price is set to a default value of $100 per metric ton. Ingredient libraries are stored in the application folder and are not normally accessed directly by the user.

That concludes this episode. Thanks for watching, and be sure to explore the other LPSolve Knowledge Base videos to learn more about how to get the most out of the program.

Powered by BetterDocs