Your server is running PHP version 5.3.29 but this plugin requires at least PHP 5.4. Please run an upgrade.

Nutrition And Operational Research | Michael Spratt

Nutrition And Operational Research

Nutrition And Operational Research

 

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

 

 

 

Introduction

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 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) Amino Acids – Histidine, Isoleucine, Leucine, Mysine, Methionine+cystine, Phenylalanine+Tyrosine, Threonine, Tryptophan and Valine.

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.

 

 

______________________________________________



 Available Foods

Grouping of Available Foods

This screen controls the available food file.  The user can select a list of foods, copy a list to another name, delete an entire list and print all or parts of a list.  Once a list is select the user can work with the list in two different formats, By product or by Listing.

A_food_1

_________________________________________________

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.

This screen displays the principle data concerning the composition of a food.  The name of the file, the number of products in the file. In this example the file name is MASTER with 85 products in the file.   The product name is written in French, English and Latin.

The food group is indicate which group the product belongs to.

An “X” in the mixable option indicates that the product can be mixed in with other products.

A_food_2

The index of accessibility is roughtly equivalent to cost.   It represent the relative cost to an individual to purchase or procurer the product.  Some product are free or very cheap locally while other products require an import outlay of capital.

Dry matter content per (EP = matter bruit) Energy content Coefficient of digestibility for proteins and other variables and  calculations are also available on this screen

_________________________________________________

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

Amino acids are entered in mg per 100g of the aliment.

A_food_3

_________________________________________________

3) Minerals – Sodium, Potassium, Chloride, Calcium, Phosphorus, Magnesium, Iron, Iodine, Copper, Zinc, Manganese and Selenium.. The mineral composition of the food are displayed with this screen.  The units are in mg and µg

A_food_4

_________________________________________________

4) Vitamins – Vitamins A, D, C, B6, B12, K1, E Thiamin, Riboflavin, Nicotinamide, Folic acid, Pantothenic acid, Biotin. This screen displays all the vitamins and the values associated with the selected food.

A_food_5

_________________________________________________

5) Data Sources – References, Descriptions, Data entry date and responsible, etc. The bibliographic sources and reference to the data contained within this record.

A_food_6

_________________________________________________

Listing of Available Foods

This screen list all the available foods in a file.  The file title is displayed in the window’s header.  The products are in N° sequence.  The windows scrolls to the left which will display all the columns to the right.

A_food_list

_________________________________________________

Menu for for manipulating the Available Foods

A_food_menu

 

_________________________________________________

 


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

 

N_obj_3

 

N_obj_4

 

N_obj_3

 

___________________________________________

 

Executing Simplex Algorithm

 

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

 


Contains 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

 

_________________________________

 


 

The Trick

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 it 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)”).