The application uses linear programming to calculate the amounts of locally available foods that would need to be consumed to meet specifications for energy, macronutrients and micronutrients for any given individual or group of individuals at lowest possible cost. The application can also include and limit the total weight of each separate food to create a mixture that is similar to local dietary habits. The term ‘diet’ is used in this context to describe the foods selected by the software to meet the recommended intakes of energy and nutrients for a day, week, season or year, but which is limited in all calculations to prevent unrealistic amounts of foods being included and to prevent excessive amounts of some nutrients, to avoid toxicity.
Figure 1 shows a flow diagram of the data needed to conduct an assessment, which is separated into two streams: one related to the cost and amount of nutrients provided in foods and the other related to the specification of people’s intakes of energy and nutrients. The information on local foods, their cost per 100 g, and on dietary habits is collected in the location of the assessment using primary data collection methods. The nutrient composition of foods, their portion sizes, and the energy and nutrient specifications of individuals are embedded within the software. If the affordability of the diet is to be estimated, income and expenditure data are required either from a primary source, such as the household economy approach [6], or from a secondary source.
The software applies parameters from five in-built databases: the energy and nutrient content of foods, with the edible portions of raw foods; the energy and nutrient specifications for individuals, sometimes called energy and nutrient ‘requirements’; an optional collection of standard families of between 4 and 10 individuals that are aligned by their average energy intake with families described during a Household Economy Approach [6]; the portion sizes of foods; and currency conversion factors. These parameters are applied to data collected during a survey of all raw foods currently available for sale in local food markets plus some inexpensive processed foods, to obtain the average cost of the edible portion of each food per 100 g. The software then selects foods based on their cost, energy and nutrient content to meet the specifications for energy and nutrients of one or more individuals, but in amounts that can be limited by three factors: the portion size, defined as the maximum weight of any given food that can be eaten in one meal; the maximum weight of all food that can be consumed in one meal; and the number of times each food can be included in the diet in a week, set as minimum and maximum constraints. The basis of the calculations and the data required are described in more detail in the following sections.
Location and subjects of an assessment
A Cost of the Diet assessment is typically undertaken in an area in which people have a similar diet, such as a province or district, an urban or peri-urban area, an agro-ecological zone or a livelihood zone, especially when a household economy approach (HEA) [6] has recently been done. The links to an HEA are described below, but it is not a requirement of the method. The subjects of a Cost of the Diet assessment are usually the poor, who are reported to buy their foods in small amounts on a daily basis, so may pay a higher unit price than if it was bought in large quantities [7, 8]. The analysis of data for groups with specific dietary habits or needs, such as vegetarians or young children, can be done separately by excluding or selecting specific foods to be included in the assessment.
Food tables
The software contains a database of the concentration of energy and nutrients in 3,580 food items and supplements, each categorised into one of 15 food groups and drawn from analyses in nine countries. The data are extracted from five main food tables: the WorldFood Dietary Assessment System published by the FAO [9]; a table of foods published by the United States Department of Agriculture (USDA) [10]; a table of foods from West Africa [11]; a table of foods from Bangladesh published by the University of Dhaka kindly included with permission [12]; and a table of average values of common foods calculated for the software, called a CotD food table, described in Additional file 1: Appendix 1. The Bangladesh food tables do not include values for vitamin B12 so average values from the other food tables for the same or similar foods were applied. Each entry in the food table also specifies the following: the proportion of each raw food that can be eaten, called the edible portion factor, described in Additional file 1: Appendix 2; a factor to convert liquid foods in millilitres to their weight in grams based on their specific gravity [13]; and iron bioavailability factors [14, 15].
Users may add new foods to the database provided that the edible portion of the food is known and that values for the concentration of energy and all nutrients per 100 g of the food are entered into the main food table that is used by the software to calculate a diet. This function allows users to add new raw foods, processed foods, fortified foods and food supplements, plus data on their cost per 100 g, and so to estimate their impact on the quality and cost of the diet.
Identifying local foods and seasons
Data on the foods consumed by people in the locality of an assessment are collected in the field. First, a list of locally available raw foods and commonly consumed processed foods is prepared, typically in consultation with local experts or key informants, to include all foods available in all seasons and including all imported, wild and home grown raw foods. Some commonly consumed canned foods such as fish or manufactured foods such as bread may be included, but they may rarely be purchased by the poor, while their cost usually excludes them from the calculations.
Each food is then identified in the food database in the software by selecting either the example that is geographically closest to the assessment site or the generic CotD food, and then transferred to a new screen to create a local food list. The list of foods can then be printed by the software and used to record current and retrospective prices in all seasons during a market survey.
The same local experts are also used to define up to six seasons of the year, depending on local conditions, as the season often affects the availability and price of foods. This is often done as a part of an HEA. The period covered by all seasons must add up to 365 days. This facility could be used to assess the impact of a short term change in the cost of specific foods, for example.
Market survey of foods: cost per 100 g
A map of the location of all food markets in the assessment area is prepared and an arbitrary minimum sample of six markets are chosen, ideally using a lot quality assurance method of sampling such as centric systematic area sampling method [16], so that markets in the whole area are covered. This serves to take into account the potentially higher cost of foods in small, distant, rural markets compared with markets in large towns.
In each market an arbitrary sample of up to four traders of each food are visited and asked if they are willing to provide information on the cost of foods, ideally during a quiet time of day so that their business is not disrupted. Each trader is asked the price of each item of food, which is recorded, and the weight of three samples are recorded using a battery operated scale with a precision of 1 g such as a Tanita KD 400 (Tanita Corporation, Japan) which weighs items up to 5 kg. This allows for the fact that many fruits and vegetables are sold in quantities that may differ in weight by season but are sold at a fixed price.
If retrospective data on prices are collected, each trader is asked the price of the same food in each preceding season to cover the whole year or, if the price remains fixed, how much of each food is sold in each season, as traders may adjust the amount or number of items sold rather than the price. The collection of retrospective data on prices is less accurate, but can be used to estimate seasonal changes in the cost of a diet during an assessment conducted at a single point in time.
The data on weights and prices are entered from the forms into the Cost of the Diet software which calculates the average cost per 100 g of each food and applies the values to the linear programming calculations.
After the four standard diets have been calculated (see below), users have the ability to alter the cost per 100 g for any or all foods in any or all seasons, by individual or collectively for a group of individuals. This allows an estimate of the impact of a change in food prices due to the season or a shock such as a natural disaster, or estimates of the effect of interventions such as providing free or subsidised food for a given period, for example.
Currency conversion rates
The price of foods per 100 g can be entered into the software in one of 135 currencies. A database in the software contains average currency conversion rates published by the World Bank for 2013 [17] to allow costs to be calculated in any currency and are convertible into British pounds (GBP), United States dollars (USD) or Euros (EUR). The database will be updated when new values are released. Users can change the conversion factor for any currency or for purchasing power parity [18] and save this in the assessment, although it would override previous calculations.
Typical dietary habits
An interview is done in the locality of six of the markets with a group of eight to ten local women who prepare food for their family. If an HEA has been done, two women from each wealth group may be selected to assess their potential range in purchasing power.
Each woman is asked how often each week each individual food in the local food list is typically consumed and the answers are categorised to provide a constraint that can then be applied by the software as a maximum and minimum frequency with which each food is consumed in the food habits nutritious diet (see Additional file 1: Appendix 3 and below). For example if most women say that sweet potato is eaten once or twice a day the minimum constraint for sweet potato is set at seven and the maximum is set at 14 so that the software must include sweet potato in the food habits nutritious diet no less than 7 times a week (once a day) but no more than 14 times a week (twice a day). Users can change the minimum and maximum food frequency constraints for individuals or collectively for multiple individuals for each or all foods in any given season. This allows the impact to be assessed of introducing a new food to the diet, to increase or decrease the consumption of any given food, or to exclude specific foods from the diet by setting both constraints to zero.
The same eight to ten women then take part in a focus group discussion to explore whether any foods are taboo for any individuals or in particular periods of the life cycle such as infancy or pregnancy, and to ask if any foods are consumed by specific individuals. This allows individual foods to be excluded from the diet or included for specific individuals.
Portion size and total weight of food
To ensure that the software allows a realistic amount of food that can be consumed at a meal and to promote dietary diversity, a portion size for each food per meal has been calculated in grams and is applied by the software to each food for each individual in the database by a process of scaling. The portion size specifies the maximum weight of any given food per meal and is adjusted for each individual in proportion to their average energy requirement, a proxy for size.
A standard portion size in grams per meal for all food groups has been estimated for a child aged 1–3 years based upon the recommendation that the maximum percentage of energy should be 50% from carbohydrate foods, 30% from fats, 10% from fruit and vegetables and 10% from protein foods [19]. The exceptions to this are: breast milk, milk powder, supplements, infant foods, sugar, honey, confectionary, herbs, spices, salt, flavourings, condiments, and beverages, as described in Additional file 1: Appendix 9.
The portion sizes of foods for all other individuals are calculated by applying a scaling factor calculated by dividing two standard deviations above the average energy requirement for each individual by the average energy requirement of the child aged 1–3 years. This increases the portion size per meal for the food in proportion to energy for someone with a large average energy specification. The method is described in more detail in Additional file 1: Appendix 9.
Users can adjust the portion sizes for each individual or collectively for all individuals for each or all foods in any given season. This parameter strongly influences dietary diversity and therefore cost, but allows an estimate of the effect of increasing or decreasing the amount in a given portion of food as a result of a programme intervention.
As no data on maximum stomach capacity could be found for all 237 individuals in the database, a uniform, empirical approach has been used to create an upper limit to the amount of food that can be consumed in a day based on the assumption that a given individual with an above average requirement for energy can satisfy their needs from a diet with a relatively low energy density. To calculate this upper limit, the mean plus two standard deviations of the energy specification for each individual has been divided by 1 kcal/g, a diet with a low energy density. The method used is described in more detail in Additional file 1: Appendix 10. This parameter cannot be changed by users at the moment but may in future versions of the software as evidence becomes available.
Selecting individuals and standard families
The software contains a database of the amounts of energy, protein, fat and 13 micronutrients for 237 individuals specified by the World Health Organization (WHO) and the Food and Agriculture Organization (FAO) [14, 20–22]. Data are specified separately for:
-
girls, boys and children of either sex aged between 1–5, 6–8, 9–11 and 12–23 months;
-
girls, boys and children of either sex aged between 2 and 18 years in 1-year intervals;
-
men aged 18–29, 30–59 or 60+ years with a body weight of between 50 and 90 kg in 5 kg divisions, each for three levels of physical activity, light moderate and vigorous;
-
women aged 18–29, 30–59 or 60+ years with a body weight of between 45 and 85 kg in 5 kg divisions, each for three levels of physical activity, light moderate and vigorous;
-
and for the additional energy and nutrients specified during three stages each of pregnancy or lactation.
The software allows the selection of an unlimited number of individuals to create a group, such as a family or a household, depending on local definitions. The composition of a family, who typically eat the same foods, can be defined by users based on local knowledge or published data.
Alternatively, if an HEA has been done in the same assessment area, users can select from a database of standard families that are aligned with the HEA in terms of their total average energy requirement, as described in Additional file 1: Appendix 4. Users can choose one of 14 such families consisting of between 4 and 10 individuals. All 14 families include a child aged 12–23 months, a lactating woman and an adult man as standard, plus from one to seven children; seven families also contain a woman aged 60+ years to represent a mother-in-law, plus one to six children. The household members are selected so that the total average energy requirement of the family is N x 2,100 kcal in which N is the total number of individuals in a typical family determined during an HEA, usually by wealth group. These standard families cannot be changed by users but the same method of alignment with an HEA could be applied by users to select another group of individuals for an assessment. This facility allows users to assess the impact of theoretical interventions on vulnerable individuals or groups, or on specific target households.
Energy specifications
The needs of each individual for energy are specified as the estimated average requirement (EAR) [20] and are applied as a default value to be achieved, but not exceeded, by the software. When this specification is met it indicates that the probability that the energy needs of any given individual are met is 0.5 or 50%.
Users can adjust the default amount of energy for each individual or collectively for all individuals between the 1st and 99th percentile of the EAR. The factors and method used to calculate these values are described in Additional file 1: Appendix 5. This function allows users to calculate the impact on the cost of the diet of increasing or decreasing the probability that energy requirements are met, perhaps if an individual is inactive or very active, or of increasing energy intake during convalescence, for example.
Protein specifications
The needs of individuals for protein are specified as the 95th percentile of the distribution of requirements per kg body weight [21] multiplied by body weight for each individual, and are applied as a default value to be achieved if possible, but can be exceeded by the software. When this specification is met it indicates that the probability that the protein needs of any given individual are met is 0.95 or 95%. The exceptions are children aged 1–6 months whose recommended daily intake of protein is calculated from the quantity of protein contained in the amount of breast milk required to meet the EAR based on an energy density of 0.67 kcal/ml [23]. This is based on the assumption that the amount of protein in breast milk is sufficient to meet the needs of all infants in this age range.
Users can adjust the default amount of protein for each individual or collectively for all individuals between the 1st and 99th percentile of the recommended intake per kilogram of body weight for all individuals aged >12 months. The factors and method used to calculate these values are described in Additional file 1: Appendix 6. This function allows users to assess how protein specifications influence the cost of the diet.
Fat specifications
The needs of each individual for fat are specified as a minimum and maximum percentage of their average energy intake, which is converted into grams of fat by applying an energy density of 9 kcal/g, and varies by age group [22]. The software includes in the diet a minimum amount of fat as a percentage of energy depending on age, which is set at 20% for adults, and must not exceed a maximum, which is set at 35% for adults, as recommended by the WHO [22]. The values applied to each age group are given in Additional file 1: Appendix 7. Users can adjust the default amounts of fat for each individual or collectively for all individuals to provide between 1 and 99% of energy from fat for all individuals aged >12 months. This function allows users to assess how fat specifications influence the cost of the diet.
Vitamins and mineral specifications
The needs of individuals for each of 13 vitamins and minerals are specified as the recommended nutrient intake (RNI) [14] and are applied as default values by the software to be achieved if possible but can be exceeded by the software unless upper limits are set because of toxicity or adverse effects (see below). The default amounts for all micronutrients except vitamin A, which is expressed as a recommended safe intake, are set at two standard deviations above the estimated average requirement. This indicates that the probability that any given individual’s needs are met is 0.97725 or 97.725%.
Users can adjust the default amount of each micronutrient for each individual or collectively for all micronutrients for all individuals to between the 1st and 99th percentile of the RNI. The factors and method used to calculate these values are described in Additional file 1: Appendix 8. The exceptions are pantothenic acid and magnesium, for which no factors are published to allow adjustments, and for all individuals <12 months of age. This function allows users to identify the micronutrients that most influence the cost of the diet and to examine the financial cost of setting the RNI at 2 SD above the mean in order to minimise the risk of deficiency.
Upper limits for specific nutrients
To prevent the software from creating a diet that exceeds specifications for specific micronutrients that might be toxic, upper limits have been set. The upper limits for vitamin A, vitamin C, niacin, calcium and iron are based upon published evidence of toxicity in excess [14, 24, 25]. The software will not allow these limits to be exceeded so if the limit is met for one nutrient, the specifications for other nutrients may not be reached despite the availability of foods that could provide these missing nutrients. This may mean that the linear programming may not achieve a solution (see below).
Absorption factors
The absorption from the diet of iron and zinc is reduced by substances such as phytate and oxalate in plant foods, so a proportion of these nutrients are not bioavailable from foods consumed. Published absorption factors have been applied to each food take into account the bioavailability of iron [14, 15] and are described in the table in Additional file 1: Appendix 11. These parameters cannot be changed by users. For zinc, users have the ability to change both the percentile of the RNI and the degree of absorption of zinc from the diet between low, moderate and high bioavailability as defined by the WHO/FAO [14] depending on the quality of the diet of individuals in the assessment area. For example, if households typically consume a diet rich in vegetables containing oxalate or phytate such as spinach and cereals, the bioavailability setting for zinc could be changed from moderate, which is the default, to low, which increases the amount of this nutrient that the software needs to include from foods.
Standard diets
The Cost of the Diet software applies all parameters for all individuals and foods to a linear programming solver [26] to estimate the lowest possible cost of four theoretical diets. These diets provide standard points of reference for the purpose of comparison and allow the incremental cost of increasingly specific requirements to be estimated. The diets meet the following specifications:
-
The recommended average energy requirements of individuals, called an energy-only diet;
-
The recommended intakes of energy, protein and fat, called a macronutrients diet;
-
The recommended intakes of energy, protein, fat and 13 micronutrients, called a nutritious diet;
-
The recommended intakes of energy, protein, fat and 13 micronutrients but limited in amount by the typical dietary habits of households in the assessment area, called a food habits nutritious diet.
Linear programming calculations
In this context linear programming is a mathematical optimisation process that uses an objective function to minimise the cost of the four diets whilst satisfying constraints for:
-
the amount of energy as specified, which is met but not exceeded;
-
the proportion of energy from fat, as specified;
-
the amounts of protein and 13 micronutrients specified, which is met, but any upper limits are not exceeded;
-
the portion sizes, an upper limit to the amount of each food that can be included in the diet;
-
the weight of food, an upper limit to the total amount of food consumed;
-
the frequency of consuming each food, the number of times each food and each food group can be included in the diet per week.
The programme either establishes a feasible solution, which means that all the constraints listed above are met or adhered to, or an unfeasible solution, which means that a solution that respects all constraints cannot be achieved.
The equations for the cost optimisation and the six constraints listed above are described in detail below. For all following mathematical equations:
-
i)
X
ij
represents the weight in grams of food item ‘i’ in food group ‘j’
-
ii)
The mathematic symbol ∑
r
i = 1
is the sum of all items across all subscript ‘i’ from 1 to r.
For example, ∑
3
i = 1
Ai = A1 + A2 + A3
-
iii)
The mathematical symbol ∑
r
i = 1
∑
n
j = 1
represents the sum over all subscript ‘j’ from 1 to n and all subscript ‘i' from 1 to r
For example:
$$ {\displaystyle {\sum}_{i=1}^2{\displaystyle \kern.6em {\sum}_{j=1}^3\kern.6em {A}_{i j}={\displaystyle {\sum}_{i=1}^2\kern.7em {A}_{i1}+{A}_{i2}+{A}_{i3}=\overset{i=1}{\overbrace{A_{11}+{A}_{12}+{A}_{13}}}+}}}\overset{i=2}{\overbrace{A_{21}+{A}_{22}+{A}_{23}}} $$
Swapping the place of Σ does not affect the final answer.
For X
ij
defined as above, ∑
r
i = 1
∑
n
j = 1
X
ij
represents the sum of all weights of food items ‘i’ in food group ‘j’
The most important function of the linear programming routine is to minimise the total cost of the diet for each individual or group of individuals. The mathematical formula for this function is:
$$ \mathrm{Overall}\kern0.5em \mathrm{cost}\kern0.5em ={\displaystyle \sum_{j=1}^r{\displaystyle \sum_{i=1}^{r j}{X}_{i j}\times \kern0.5em \cos {\mathrm{t}}_{\mathrm{ij}}}} $$
(1)
in which: cost
ij
is the cost of food item ‘i’ in food group ‘j’.
The solver is set to minimise the above expression, which represents the sum of cost for the corresponding amount of each food.
Energy constraints are used to select locally available foods for a diet that provides the estimated average requirements for energy per day, for each specified individual. The software should not create a diet that exceeds or falls below this requirement. The mathematical formula for this function is:
$$ {\displaystyle \sum_{j=1}^r{\displaystyle \sum_{i=1}^{r j}{X}_{i j}\times \mathrm{energ}{\mathrm{y}}_{i j}=\mathrm{denergy}}} $$
(2)
in which:
-
i)
denergy is the desired total dietary energy content.
-
ii)
energy
ij
is the energy content of food item ‘i’ in food group ‘j’
Nutritional constraints are used to select locally available foods for a diet that provides the recommended intakes of protein, fat and 13 micronutrients specified by the WHO. These specifications are described as ‘desired’ nutrient specification. The software is allowed to exceed these specifications if necessary but it should not exceed the specific upper limits set for vitamin A, niacin, vitamin C, calcium and iron. The mathematical formulae for the constraints are:
$$ {\displaystyle \sum_{j=1}^r}{\displaystyle \sum_{i=1}^{r_j}}\ {X}_{i j} \times \kern0.5em n u{t}_{i j n\ }\kern0.5em \ge \kern0.5em d n u{t}_{n\ }\kern1.75em n\in N $$
(3)
$$ {\displaystyle \sum_{j=1}^r}{\displaystyle \sum_{i=1}^{r_j}}\ {X}_{i j} \times \kern0.5em n u{t}_{i j n\ }\kern0.5em \le \kern0.5em u n u{t}_{n\ }\kern1.75em n\in N $$
(4)
in which:
-
i)
N is the set of nutrients of interest.
-
ii)
n ϵ N is the nutrient ‘n’ within the set of nutrients ‘N’.
-
iii)
dnut
n
is the desired nutrient requirement for all nutrients ‘n’ of interest in ‘N’.
-
iv)
unut
n
is the upper limit for nutrient requirement for all nutrients ‘n’ of interest in N.
-
v)
nut
ijn
is the nutrient ‘n’ content per gram of food item ‘i’ in food group ‘j’.
The mathematical formulae for calculating the portion size scaling factor and applying this factor to the standard portion size for an individual are:
$$ \mathrm{Portion}\ \mathrm{size}\ \mathrm{scaling}\ \mathrm{factor}\kern0.5em =\kern0.5em \frac{\mathrm{Mean} + 2\ \mathrm{SD}\ \mathrm{energy}\ \mathrm{specification}\ \mathrm{of}\ \mathrm{individual}}{\mathrm{Mean}\ \mathrm{energy}\ \mathrm{requirement}\ \mathrm{of}\ \mathrm{child}\ 1-3\ \mathrm{years}} $$
$$ \mathrm{Portion}\ \mathrm{size}\ \mathrm{f}\mathrm{o}\mathrm{r}\ \mathrm{individuals}\ \left(\mathrm{g}\right) = \mathrm{Portion}\ \mathrm{size}\ \mathrm{f}\mathrm{o}\mathrm{r}\ 1-3\ \mathrm{y}\ \mathrm{child}\ *\ \mathrm{scaling}\ \mathrm{f}\mathrm{actor}. $$
The number of times per week a portion of food can be included in a diet is limited by applying minimum and maximum food frequency constraints. Using these constraints and the portion size as g/meal for each food, the software calculates the minimum and maximum weekly amount of each food in grams which can be selected for a diet by multiplying the portion size by the weekly frequency. The mathematical formulae for the constraints are:
$$ {X}_{ij}\ge m i{n}_{ij}\cdots i=1,2,\dots, {r}_j\kern1em j=1,2,\dots, r $$
(5)
$$ {X}_{ij}\le m a{x}_{ij}\cdots i=1,2,\dots, {r}_j\kern1em j=1,2,\dots, r $$
(6)
in which:
-
i)
min
ij
is the minimum portion size of food item ‘i’ in food group ‘j’
-
ii)
max
ij
is the maximum portion size of food item ‘i’ in food group ‘j’
The number of times per week a food from any given food group can be included in the diet is limited by applying a maximum food group constraint. This enables the user to adjust the frequency with which each food group can be consumed in a week. For all diets the maximum frequency is set at a default value of 105 times per week for all food groups. This gives the software the option to include up to five foods from a food group for three meals a day, 7 days a week. The mathematical formula for this function is:
$$ {\displaystyle \sum_{i=1}^r}{\displaystyle \sum_{j\in S(s)}^{r_j}}\ \frac{X_{i j\ }}{a{ v}_{i j\ }}\ \le \kern0.5em fgma{x}_s $$
(7)
in which:
-
i)
av
ij
is the weight (in grams) of an average portion size of the specified food item ‘i’ in food group ‘j’.
-
ii)
S(s) is the food group ‘s’ within the set of food groups S.
-
iii)
fgmax
s
is the maximum number of servings in the food group ‘s’.
The total quantity of food (in grams) that the software can include in a diet is limited by applying a total food weight constraint. The mathematical formula for this constraint is:
$$ {\displaystyle \sum_{j=1}^r}{\displaystyle \sum_{i=1}^{r_j}}\ {X}_{i j\ }\ \le\ \mathrm{T}\mathrm{F}\mathrm{W} $$
(8)
in which TFW is the total food weight.
Cost of the Diet software
The design specified by Save the Children for the Cost of the Diet application determined the achitecture of the software. The specifications were: the application should be deployable without requiring any other software to function and should not require administrator rights to install it; the software should need only to be copied onto a hard disc from which it should run directly; and the software should run on low specification computers using a Microsoft Windows operating system from Windows XP to the latest version available in 2016.
The software is a database application using the Windows Single Document Interface (SDI) model. The user interface has been implemented to use a “wizard” type workflow whereby the user navigates backwards and forwards through a series of screens, building an assessment model on the way. Each screen is presented in the form of a spreadsheet with both data and most of the navigation links. A menu structure has been implemented to make the navigation familiar to Windows users, so it is intuitive.
The application has been written in Embarcardero’s Delphi (version XE7 ©) an object-orientated language based on Object Pascal. This was chosen because of Delphi’s reputation for rapid application development, its ability to be built with little modification for several platforms, and that fact that it runs independently without the need for installation. The application has three major components:
-
1.
The user interface to enter data, to navigate through the system and to select reports, which includes third party software TMS Grid Pack © matrix utilities and FastReport © report generator.
-
2.
The linear programming module (lp_solve version 5.5.2.0) that optimises the foods chosen within diets to minimise cost and within chosen dietary constraints [27].
-
3.
The database back-end (SQLite) that stores all the data entered by the user to build the assessment, manipulate the data to feed into lp_solve, and store results for presentation.
The software can be downloaded from: http://www.heacod.net/countries/reports/cotd-software-version-2-2016/ Users are asked to register and agree to the licence conditions to use the software, which is free. Registration ensures that users will be informed of updates to databases and bug fixes. Bugs should be reported to cotd@savethechildren.org.uk with a screen capture that includes any error message. The method and software are explained in a manual [28], which is available in English (http://www.heacod.net/countries/reports/cotd-practitioners-guide-v2-english/) or French (http://www.heacod.net/countries/reports/cotd-practitioners-guide-v2-french/).
Income and expenditure data
The cost of a nutritious diet becomes a more meaningful figure when compared with the income and essential expenditure of the poorest members of the community in which an assessment is done. A diet may be inexpensive in comparison with other contexts, but if it is beyond the means of the poor, then a risk of malnutrition exists. If an analysis is wanted of the affordability of the diets generated by the Cost of the Diet software, then information can be entered into the software on the annual income and non-food expenditure for one or more wealth groups. This allows an estimate to be made of the impact of an income generating activity or a social protection scheme such as a cash transfer, on the affordability of a nutritious diet. Such data are usually available from an HEA, a livelihoods based analytical framework which is designed to provide an estimate of household economy for arbitrary levels of wealth within a given community [6]. An HEA also provides useful contextual data such as: the division of a region into livelihood zones; the location of markets and villages; the division of the population into wealth groups; the typical annual income and essential non-food expenditure by wealth group; the typical household size by wealth group; the sources of food for households including wild foods; and a seasonal calendar [6]. For these reasons the two tools have been aligned as described in Additional file 1: Appendix 4. If an HEA has identified that different wealth groups typically contain a different number of individuals within a household, then the cost of the four standard diets will need to be calculated for each of the household sizes to ensure the estimates of affordability are accurate.