2.1. Background
Menu planing has been solved by using computers since early 1960 [
2,
14]. Many of the proposed formulations are NP-complete, meaning it is quite a complex task [
15]. In essence, the classical MPP aims to find a combination of dishes which satisfies certain restrictions involving budget, variety and nutritional requirements for an n-day sequence. Even though there is no consensus on the specific objectives that an MPP formulation should consider, in almost every formulation, it is common for the cost of the menu plan to be considered one of the main objectives to optimise [
2,
3,
4,
10,
16,
17]. Other options for defining the objective functions are the users’ preferences for certain foods, the level of adequacy or the level of acceptance [
18,
19,
20,
21].
The constraints considered in menu planning problems are usually based on the nutritional requirements that meal plans have to satisfy. As a result a set of constraints is defined that models the recommended minimum and maximum amounts of different nutrients [
21,
22,
23,
24,
25,
26]. Other constraints consider the variety of the meals, their predominant colour, their consistency, the time required to prepare them and food that cannot be consumed, among others [
19,
22,
25,
27]. Two of the most frequently used techniques to handle constraints are based on the application of repairing methods [
4,
10,
19,
26,
28,
29] or penalisation functions [
16,
30,
31]. In the first case, operators are applied to an infeasible solution until it becomes feasible. In the second case, the fitness function is penalised somehow depending on the degree of infeasibility of the corresponding solution. Hence, the higher the degree of infeasibility of the solution, the larger the probability to be discarded.
Both single-objective [
3,
16,
19,
32] and multi-objective optimisers [
4,
10,
17,
28] have been devised for the MPP. In the single-objective case, most of the formulations consider the cost as the only objective to optimise, while the nutritional requirements are used as constraints. In the case of multi-objective formulations, the cost is always considered as one of the objective functions to optimise [
29,
30,
31]. Additionally, the seasonal quality, food flavour and food temperature [
29], food preferences [
30] and the nutritional error [
31] are considered as other objective functions. In almost all cases, the nutritional requirements, as well as the users’ personal preferences, model the constraints of the multi-objective formulations.
Although there exist many different types of algorithms for solving this problem, a high percentage of published papers use evolutionary algorithms (EAs) or other types of meta-heuristics due to the benefits they offer, such as robustness, reliability, global-search ability and simplicity [
16,
20,
21,
26,
28]. EAs are approximated methods based on the concept in natural evolution of survival of the fittest individual [
33]. Given a population of individuals in some environment with limited resources, the competition for survival causes natural selection, with the fittest individuals more likely to survive and reproduce. In addition, being approximated methods means that although there is no guarantee of obtaining the optimal solution to a problem, high-quality solutions can be found in a reasonable period of time. The classical genetic algorithm (GA) is the most common approach for solving single-objective formulations of the MPP [
16,
34], while previous multi-objective formulations of the MPP have been frequently addressed by applying the state-of-art NSGA-II, such as the work proposed in [
28,
30,
31].
The lack of ad-hoc operators for the MPP could possibly yield sub-optimal solutions due to the problem of premature convergence. In order to avoid this, problem-specific operators or procedures, such as intensification mechanisms, have been included into EAs, resulting in memetic algorithms (MAs) [
35,
36]. MAs can be seen as the combination of an EA with an intensification mechanism in order to improve the general performance of the optimiser [
37]. An example of a single-objective MA successfully applied to the MPP is that proposed in [
3].
Additionally, a software named
schoolthy was proposed in [
4], which allows menus to be planned automatically. The tool uses an MPP formulation similar to the one proposed in this work to generate not only affordable plans, but also varied from a nutritional standpoint. Although it was designed for school cafeterias, it could be adapted to other environments, such as hospitals, prisons and retirement homes, among others.
As we previously mentioned in
Section 1, in the current work, we present a novel constrained multi-objective formulation of the MPP. It consists of the same set of nutritional daily and n-days (global) constraints presented in [
3]. At the same time, the two objective functions proposed in [
4], i.e., the cost of the meal plan and its level of repetition of courses and food groups, are also considered. As far as we know, this is the first time that an objective function modelling the level of repetition of specific courses and food groups is optimised together with the cost under a multi-objective formulation of the menu planning problem, which in addition considers the management of daily and global nutritional constraints. Those constraints are successfully managed by considering the infeasibility degree of a particular solution, thus giving preference to those solutions with, first, a lower infeasibility degree, and second, a lower fitness in terms of both aforementioned objective functions. Furthermore, the application of a multi-objective memetic approach based on decomposition that includes knowledge about the menu planning problem in the form of a tailored improvement operator and an ad-hoc crossover operator had never been carried out before. The above allows feasible solutions of the multi-objective constrained formulation that we are presenting herein to be attained quickly.
2.2. Formulation
In this work, a novel multi-objective constrained formulation of the MPP focused on school cafeterias is proposed. Due to the above, only lunch is planned for n days, including a starter, a main course and a dessert per day. The different courses are selected from a database containing their cost and nutritional facts. Courses in the database are grouped into three different categories: starters, main courses and desserts. The particular objective functions are, on the one hand, the cost of the whole plan, which has to be minimised, and on the other hand, the level of repetition of specific courses and food groups that the plan consists of, which has to be minimised as well. The motivation behind the second objective function is to promote a varied plan from a nutritional point of view.
Additionally, the set of daily and global constraints applied in [
3] are also taken into account in this new formulation. Those constraints are modelled on the recommendations on intakes of macro-nutrients and micro-nutrients following the guidelines given in the White Book on Child Nutrition. Furthermore, other reference documents regarding school diets and allergens were also consulted, specifically, those endorsed by the Spanish Government Ministry of Education, Culture and Sports and the Ministry of Health, Social Services and Equality (These consensus documents are available at
http://www.aecosan.msssi.gob.es/AECOSAN/docs/documentos/nutricion/educanaos/documento_consenso.pdf and
https://www.aepnaa.org/).
As we said, the cost is an objective to be minimised and is calculated as the sum of the costs of the courses included in the plan. Note that the cost of each course is calculated as the sum of the costs of all the ingredients required to prepare that course. Formally, the cost is defined as follows:
where
C is the total cost of the menu plan and
represent the cost of the starter, main course and dessert, respectively, for day
j, and
n is the number of days for which the menu plan is being designed.
An assorted menu plan is particularly important when it is intended for children. As a result of this, the level of repetition of courses and food groups was defined as the second objective function to be minimised. The level of repetition represents the percentage of courses and food groups repeated throughout the meal plan. The following equation defines how it is calculated:
where
is the level of repetition,
represents the compatibility, in terms of food groups, among courses
for day
j;
p is a penalty constant for every kind of course and
d stands for the number of days since a specific course was repeated. Finally,
is the penalty value for repeating particular food groups in the last five days.
Equation (
3) allows the value of
to be calculated, where
is the number of food groups,
is the number of times a particular food group is contained in the three courses (starter, main course and dessert) of the menu for day
j and
is the corresponding penalty value for repeating the food group
g. The food groups considered in this work are as follows: meat, cereal, fruit, dairy, legume, shellfish, pasta, fish, vegetable and other.
Equation (
4) is used to compute
, where
days is the number of previous days considered,
is the number of food groups,
indicates whether the food group
g is repeated on day
(
) or not (
) with respect to day
j,
indicates whether any food group was repeated
i day(s) before the current day
j (
) or not (
), and
and
are the corresponding penalty values.
The types of penalties and their values used to compute
and
are shown in
Table 1. Furthermore, penalties are determined by the repetition of food groups (
–
), the repetition of the same food group from one to five days prior to the current day (
–
), and the repetition of specific courses (
,
, and
). In the case of penalties for repeating food groups (
–
), if the penalty value of a given food group is very large in comparison to the remaining food group penalty values, then a plan with a lower number of courses belonging to that food group will be provided. For instance, we have given preference to those courses consisting primarily of vegetables (
) over courses composed primarily of meat (
).
Additionally, as stated earlier, in order to consider a menu plan as feasible, it must fulfil some constraints related to a set of nutritional requirements, such as having each nutrient intake be within a given range. Besides, the set of constraints of this MPP formulation is modelled by two sub-sets of constraints: global constraints and daily constraints. For instance, energy (kcal), fats and proteins are evaluated both daily and globally. At this point, we note that, since only lunch is considered in the meal plans, the recommended nutritional intakes were adapted. For each nutrient
h considered,
denotes the recommended amount to ingest every day at lunch. Based on the recommended amount, a range of acceptable intake is generated for each nutrient.
Table 2 defines a set
R of pairs
with the minimum and maximum amount allowed for each nutrient
h, respectively (The set of micro-nutrients is as follows: Folic acid, Phosphorus, Magnesium, Selenium, Sodium, Vitamins A, B1, B2, B6, B12, C, D, E, Iodine, Zinc).
Formally, an individual
S would be considered feasible if and only if it satisfies the following set of global constraints:
where
is the global intake of nutrient
h in the plan
S, and
denotes the set of nutrients considered for the global constraints.
In the case of energy, fats and proteins, their intakes for every single day
d, i.e.,
are also checked to be in the established daily ranges:
where
is the set of nutrients considered for the daily constraints.
In order to properly compare solutions, a definition of an infeasibility degree
is required. As previously defined in [
3], the infeasibility degree of a solution
S is calculated as shown in Equation (
7). Note that an individual
S that satisfies Equations (
5) and (
6) would have an infeasibility degree
, and it would be considered a feasible solution.
The infeasibility degree
is calculated as the sum of the global infeasibility degree
and the daily infeasibility degree
. Equations (
8) and (
9) show the calculation of
and
, respectively.