Nutrition and Operational Research

Overview

This application calculates the most inexpensive mix of available foods which satisfy infant (0 – 24 months) nutritional needs.  The application uses the “Simplex Algorithm” to calculate the food mix and is written in FoxPro

As illustrated below, a master “Constraints” file controls the loading of the simplex table.  This file assures that all the “Available foods”, with their nutritional components (Amino Acids, Minerals, Vitamins, etc) are processes correctly and in accordance with the selected “Objective” record from the Objective file.

The user selects an Available foods group, which could contain hundreds of different foods (i.e. bananas, shrimp, mother’s milk, etc.).   The user must also select an Objective record which contains the established limits for each nutrient.  Utility programs compare these two files and present the data in a varity of formats with necessary calculations so that the user can quickly verify and modify the data.

After execution of the Simplex Algorithm the results are store, manipulated and presented to the user.

Nutrition Available Food

 Nutrition Available Foods is a list of all the foods and their nutritional make-up.

An Objective is a record (within the Objectives file) containing all the nutrients and their established minimum and/or maximum values.Constraints is a file containing a list of nutrients with preset or established values for each nutrient.  This file contains the instructions for processing each nutrient.

An Available Food’s nutritional content are grouped into 5 categories :

1) General Composition – Product name, Dry matter, Energy content, Coefficient of digestibility for proteins, Crude proteins, Digestible proteins, Fiber, Lipids, Linoleic acid, Linolenic acid, price per kg, etc.2)

2) Amino Acids – Histidine, Isoleucine, Leucine, Mysine, Methionine+cystine, Phenylalanine+Tyrosine, Threonine, Tryptophan and Valine.3)

3) Minerals – Sodium, Potassium, Chloride, Calcium, Phosphorus, Magnesium, Iron, Iodine, Copper, Zinc, Manganese and Selenium.4)

() Vitamins – Vitamins A, D, C, B6, B12, K1, E  Thiamin, Riboflavin, Nicotinamide, Folic acid, Pantothenic acid, Biotin.5)

() Data Sources – References, Descriptions, Data entry date and responsible, etc.

Objectives

Contains a record with all the nutrients having two different names, one name for the maximum and the minimum. For example Sodium would be labeled max_sodium and min_sodium.  Maximum is the roof, not to be exceeded, while the minimum is the floor, do not go below.  The constraint file performs the link of Sodium within an Available Food and the Maximum and Minimum in the Objective file.

Constraints

The Constraints file directs the Nutrition program because it contains information necessary for comparing the nutrients of an Available Foods to those fixed in the Objectives.
Storing information in the Constraints file permits the manipulation (adding, modifying, deleting) of the data before executing the Simplex Algorithm.    For example, a record could be added which establishes a percentage of an Available Food (i.e. >10 % sugar) to be included.  This causes a food to become an Objective.
Nutrients could be excluded from the calculation if the amount of the nutrient in a food is unknown.  A negative value for a nutrient (either in the Available foods or Objective files) indicates that the value is unknown and that the nutrient can not be considered in the calculation

Conclusion

Operational research is a very good technique when searching for an optimal solution for exploiting resources, under constrains, in a non-linear environment.  There are several important considerations when trying to adapt and apply the Simplex Algorithm.  The field of Operational Research is a  passionate science with amazing and stupefying results.

Objectives

 

Control
The user selects the Objective record.  Once select all the operation performed on the file will only apply to the selected Objectives.
N_obj_1
___________________________________
Maximums
One Objective records contains the Maximums

General Composition Amino Acids

Minerals

Vitamins
Crude protein (g)

Calcium (mg)

Vitamin A (µg eq. retinol)
Fiber (g)

Phosphor (mg)

Vitamin D (UI)

Sodium (mg)

Potassium (mg)

Chloride (mg)

N_obj_2
___________________________________

Minimums

General Composition

Amino Acids

Minerals

Vitamins

  Digestible protein(g)   Histidine (mg)   Sodium (mg)   Linoleic acid (mg)
  Lipids (g)   Isoleucine (mg)   Potassium (mg)   Vitamin A (µg eq. retinol)
  Leucine (mg)   Chloride (mg)   Vitamin B6 (µg)
  Lysine (mg)   Calcium (mg)   Vitamin B12 (µg)

Methionine + Cystine (mg)

  Phosphorus (mg)   Ascorbic acid (mg)

 Phenylalanine +  Tyrosine(mg)

  Magnesium (mg)   Vitamin D (UI)
  Threonine (mg)   Iron (mg)   Vitamin E (UI)
  Tryptophan (mg)   Iodine (µg)   Vitamin K1 (µg)
  Valine (mg)   Copper (µg   Thiamin (µg)
  Zinc (µg)   Riboflavin (µg)
  Manganese (µg)   Nicotinamide (µg)

  Selenium (µg)

  Folic acid (µg)

  Pantothenic acid (µg)
  Linolenic acid (mg)
  Biotin (µg)

N_obj_5

Combining Resources and Constraints

Combining Resources and Constraints.  The user selects a Available Foods group and an Objective.  They can also elect to manipulate many of the parameters

Calc_1

Utility for comparison of “Available Foods.  Once the user has selected an Available Foods group and an Objective they can quickly verify all the elements, their values and compare them.

Comp_A_food

A list of Available Foods in the group, their status and values for every nutrient.

Comp_A_food_1

The user can select an Objective (ie. Max crude protein (g)) see its value and those of all the Available Foods in the group

food_list_1

Index of Accessibility

Cost is assigned using an index of accessibility instead of price.  Monetary costs don’t accurately reflect the true local value of a food.

Index_1

Dry matter in a food can change over time or processing.  The user may have to adjust this value over time

verify_dry

 An Available Food can also be an Objective.  For example the mix must contain a fixed percentage of sugar.
Const_food_1

Const_food

Loss of Nutrients

Mixing, cooking and  other processes can cause certain percentages of loss for various nutrients.

Loss_nutr

Energy of mix or the number of calories.

Solution

Verification of Constraints is a work screen as it resumes the relations between the Available Foods and the selected Objectives.

Ver_const

List of inactive Objectives.  If the value of a nutrient is unknown it must be eliminated from the formula.  A negative value is used as a zero could be a valid quantity.

list_cons_inactive

List of maximum constraints

list_cons_max

Minimum Constraints

list_cons_min

Report output

Report_options

Execute the Simplex Algorithm

Let her rip.  The tables is rotated and each line and column calculated and the table sorted.  This could take several hundred reiterations.
calc_solution

Constains date, files used
Report1

Compares fixed objectives with calculated results
Report4

Composition, what foods and their percentage in the mix and the state of the product (ie. natural or dried)
Report3

Totals
Report2

Dynamic Self-Coding

The Constraints file directs the Nutrition program because it contains information necessary for comparing the nutrients of an Available Foods to those fixed by the Objectives.
Storing information in the Constraints file permits the manipulation (adding, modifying, deleting) of the data before executing the Simplex Algorithm.    For example, a record could be added which establishes a percentage of a food (i.e. >10 % sugar) to be included.  This causes a food to become an objective.
Nutrients could be excluded from the calculation if the amount of the nutrient in a food is unknown.  A negative value for a nutrient (either in the Available foods or Objective files) indicates that the value is unknown and that the nutrient can not be considered in the calculation.
 
For example, one record contains :

CODE_CONS

A value which controls the sequence of nutrient processing.

NOM_CONS

The name of the Nutrient in this,  the Constraint file  (i.e MAX_PROT_B  maximum protein brut).

TEXT_CONS

A text which appears on the screens, menus, etc. (i.e. “Max crude protein (g)”).

VAR_OBJET

The name of the Nutrient in the Objective file  (i.e MAX_PROT_B ).

VAR_DISPON

The name of the Nutrient in the Available Food file  (i.e PROT_BRUTE ).

INF_EQ_SUP

Describes the “Constraint” for this Nutrient,  inferior, equal or superior (Max, Equal, Min).

ACTIVE

If true the Nutrient will be included into the Simplex table for consideration.

LIST_OPT

If true the user can modify the contents of  this record.

VALUE_CONS

The actual value of the Constraint.  It is the original value in the Objective file.

INIT_LEG

The initial description of the Nutrient (maximum, equal, minimum) in Constraints file.

CONV_CALC

If true a conversion calculation is performed.

DIVIDE_100

If true the Nutrient will be divided by 100.

TAUX_PERT

An estimate loss of the Nutrient due to cooking.

TENEUR_EST

The results of the Simplex calculation.

PER_SATIS

The percent of satisfaction for the Nutrient resulting from the Simplex calculation.   This value indicate the limiting Objectives.

RPT_TEXT

The report text for the second language (i.e. Spanish, French, etc.).

TEXT_CONSE

The full name of the Constraint in English (i.e. “Max crude protein (g)”).

RPT_TEXTE

The report text in English (i.e. “Crude protein (g)”).