An island-based hybrid evolutionary algorithm for caloric-restricted diets

The most popular and successful way to maintain a healthy body is to have a rich and balanced diet combined with physical exercise. Since the diet dilemma was proposed, several works in the literature suggested calculating a diet that respects the nutritional needs of each person. In the Caloric-Restricted Diet Problem (CRDP), the goal is to find a reduced-calorie diet that meets these nutritional needs, enabling weight loss. This paper proposes an Island-Based Hybrid Evolutionary Algorithm (IBHEA) that uses a Genetic Algorithm (GA) and a Differential Evolution (DE) Algorithm with different parameters settings in different islands communicating through several migration policies to solve the CRDP. Computational experiments showed that IBHEA outperformed more than 5% compared with non-distributed and non-hybrid implementations, generating a greater variety of diets with a small calorie count.


Introduction
Obesity due to high-calorie diets and overnutrition is a major public health problem in most of the world [13], linked to several chronic diseases, such as diabetes mellitus, hypertension, and coronary diseases [12,14,31,52]. With the increasing number of overweight and obese people, the World Health Organization considers the obesity crisis as a pandemic [33] and the United Nations has declared 2016-2026 as Decade of Action on Nutrition as an attempt to contain such crisis [27].
A high-calorie diet and the lack of physical activities are the main causes of overweight and obesity [32]. An efficient treatment for obesity consists of the ingestion of a hypocaloric diet [8,21]. It has been shown that a hypocaloric diet with 1200 kilocalories (kcal) can be used to reduce the body fat [44]. Besides, a hypocaloric diet with 1000 to 1200 kcal can improve the life quality of obese people in less than 30 days [20]. However, these diets also need to provide all the necessary vitamins and nutrients to a person, such as carbohydrates, iron, zinc, fibers, among others [50].
A large part of the world's population does not have proper access to primary healthcare and nutrition professionals, especially in low-and middle-income countries [19] 1 3 where nutrition specialists are scarce [24] and most people have no access to healthcare facilities [4,19]. Therefore, new manners to generate proper diets are needed.
The automatic generation of diets through computational methods can be employed as a manner to provide access to basic nutritional advice for people. The Diet Problem (DP), proposed by Stigler [56], was the first attempt to generate diets automatically. It aims at computing the minimum financial cost of a diet that satisfies a person's nutritional needs. However, the results obtained by Stigler [56] are hard to be used in practice since the generated diet lacks food variety and palatability. Besides, it only focuses on healthy individuals, not being applicable to treat preexisting diseases.
Recently, some effort in developing computational methods for the automatic generation of diets can be found in the literature. Maurya et al. [39] employed machine learning models to propose diets for patients with chronic kidney diseases automatically. Anselma, Mazzei, and Michieli [9] proposed a decision support system to aid people in correcting dietary transgressions. Mendes Samagaio, Lopes Cardoso, and Ribeiro [40] address the challenges in building a chatbot embedding sentiment analysis algorithms to model food preferences and to provide the nutritional recommendation system for the elderly population.
Chen et al. [17] presented a decision support system based on deep learning and evolutionary computing to compute optimized diets for a person taking into consideration his/her genetic sequence. Furthermore, integer programming models were used by Amin, Mulligan-Gow, and Zhang [7], and Bas [11], to compute healthy diets considering the variation in the amount of nutrients in each food product. HernÃƒAE'Ã †â€™Ãƒâ€šÃ‚Â¡ndez et al. [28] employed goal programming to generate low-cost healthy diets following Mediterranean standards. Besides, Marrero et al. [38] and Ramos-Perez et al. [47] used multi-objective evolutionary algorithms to formulate diets healthily over a period that minimizes the diet's cost and the level of repetition of food groups. Moreover, [53,54] and [55] focused on computing optimized healthily calorie-restricted diets through evolutionary algorithms.
In this paper, we focus on the Caloric-Restricted Diet Problem (CRDP), introduced by [55]. This problem aims at computing a diet that shows a small calorie count and respects the minimal amount of nutrients necessary for a person. A solution of CRDP represents the diet as a set of six meals with great food variety and palatability, being able to be used daily by people.
Previous works solved CRDP using a Differential Evolution (DE) algorithm [54] and a Genetic Algorithm (GA) [55]. This work proposes to solve this problem using an Island-Based Hybrid Evolutionary Algorithm (IBHEA). This distributed evolutionary algorithm divides its population into subpopulations that are evolved in parallel using a DE or a GA. In addition, the IBHEA maintains periodic communication between the sub-populations through a migration operator, by which sub-populations exchange solutions among them.
Computational experiments show the superior performance of IBHEA compared to isolated algorithms and nonhybrid implementations of the Island Model. The use of the IBHEA achieved significant results for the CRDP since it reduced the number of calories of diets without violating the constraints and allowed the formulation of a daily and healthy diet that can be used in practice.
The remainder of this work is organized as follows. Section 2 formally defines the CRDP, while Sect. 3 proposes the IBHEA for CRDP. Computational experiments are presented and discussed in Sect. 4. Finally, the conclusions of our work are drawn in the last section.

The caloric-restricted diet problem
It is challenging to develop a caloric-restricted diet that provides all necessary nutrients for a person, such as proteins, zinc, and iron. The first attempt to develop an algorithm for computing a diet was presented in [56]. However, the author only seeks a minimum financial cost for the diet, and the problem definition does not concern the diet's application in the daily routine. [55] proposed the CRDP, an optimization problem to compute caloric-restricted diets while preserving the nutritional needs of an individual.
Let T be the set of available foods to be included in the diet and let i ∈ T be a food product. Besides, let N be the set of nutrients considered within CRDP, whereas m i,j gives the amount of nutrient j ∈ N in food i ∈ T . Additionally, the minimum amount of nutrient j ∈ N required in the diet is stated as b j . The CRDP can be expressed as the objective function described in Equation (1) and the constraints described in Equation (2). The problem considers variables k i > 0 that represent the calorie count of one portion of food i and p i ∈ [0.5, 3] that represent the portion of food i ∈ T to be included in the diet. Furthermore, y i ∈ {0, 1} are variables that indicate if each product i ∈ T is present or not in the diet, such that y i = 1 if the food i is included in the diet and y = 0 otherwise. In this work, the values of m i,j were retrieved from the Brazilian Table of Food Composition In Equation (1), it is possible to observe that the values of k, p and y that minimize the objective function are achieved when ∑ T i=1 k i p i y i = 1200 . Therefore, the objective function aims at finding a diet with 1200 kcal, which is the most indicated in order to reduce weight [20,44]. A diet with a higher amount of calories does not contribute much to this objective. On the other hand, a diet with smaller calories can represent a risk to the person's health. The constraint expressed in Equation (2) guarantees that the nutrient's requirements are met.
The model used in this work considers portions of 100g and 100mL for solid and liquid foods, respectively. Therefore, by bounding p i ∈ [0.5, 3] ensures that no food will be prescribed in relatively low or high quantity, preventing real impracticable situations as cooking only 10g of fish at dinner, for example, or that it dominates the diet due to its high quantity.
Regarding food alternatives to building the diets, this work selected nine groups of food products to CRDP, recommended by a specialist in nutrition. They were classified into nine categories according to their characteristics, as displayed in Table 2. The first column displays the food category, and the second column shows a symbol representing each category. The third column presents the number of foods within each category. The last column shows a range of indexes associated with foods in each category, which were employed in the algorithms for CRDP. Beverages, except natural juices (represented by J) and alcoholic beverages, are represented by B, while L represents milkderived products. Carbohydrates are separated into two different groups: the first one, represented by C1, is composed of snacks, like bread, cookies, and crackers; the second one, represented by C2, contains the carbohydrates of the meal, such as rice, potato, and cassava. Grains and leguminous foods, such as lentils and beans, are represented by G. The protein category P contains high protein foods, such as meat, chicken, and eggs.

Island-based hybrid approach for CRDP
The concept of evolution has been considered in solving optimization problems of different areas by Evolutionary Algorithms (EA) since the 1950s. Commonly, these algorithms build a population of candidate solutions to a given problem and apply operators inspired by natural genetic variation and natural selection [49]. Over the years, different EAs and alternatives to implement them have been proposed in the literature [43,48]. This work considers the alternative known as Island Model.
Island Model is a class of distributed EAs in which the population is divided into sub-populations called islands, which run their EAs independently, in parallel with others. Periodically, the islands interact through the migration operator [15], exchanging solutions according to the applied topology and a set of rules known as migration policy.
This section presents the proposed IBHEA, a hybrid Island Model to solve the CRDP. Before presenting the main IBHEA characteristics in Sect. 3.4, the following Sects. 3.1, 3.2 and 3.3 briefly present concepts, operators and features to be considered in its implementation.

Representation of solutions
In order to design an EA, it is necessary to define the individual shape, that is, the numerical representation of the candidate solutions. The solutions/population are evaluated in the EA execution, resulting in a fitness value indicating how to fit the specific individual is to solve the problem. In order to adjust the IBHEA to solve the CRDP, the candidate solutions are represented as proposed in [55]. Figure 1 illustrates a daily routine of meals in a typical diet for the CRDP, organized in the six ordered daily meals: breakfast, two snacks, lunch, dinner, and supper. In this sense, in addition to the number of food groups that must be placed in each meal, Figure 1 clarifies what those groups are. Figure 2 presents the scheme adopted in the IBHEA to represent the respective diet in its candidate solutions. They are composed of two vectors called portions vector and ID vector, that describe the six daily meals.
The  Table 2.
Each value in ID vector is mapped to the respective food and nutritional characteristics by a bijective function f ∶ ℕ ↦ T applied in IBHEA. Besides, each value in the ID vector is restricted to those in Table 2 according to the respective food groups.

Population initialization and constraint handling
Initially, each portions vector and ID vector in the IBHEA population is randomly generated according to the respective domains. In this case, the IBHEA initial population X is randomly generated with |X| = pop individuals. For each portions vector, a random real number is generated in [0.5; 3] for each gene. For each ID vector, a random integer number is generated for each gene according to the interval of its class of food (Table 2). Regarding the evaluation of each IBHEA candidate solution according to Equation (1), when the constraint given by Equation (2) is violated, a mechanism to handle this violation must be adopted. Hence, the fitness function becomes the objective function f(k, p, y) plus a penalization term [23]. Let M = 100000 denotes a large constant value considered as a penalty term. Then, the penalized fitness function is given by where f(k, p, y) is the objective function given by Equation (1) and j ∈ {1, 2, … , N}.

Genetic algorithm
John Holland [29] presented the Genetic Algorithm (GA), inspired by the evolution theory proposed by Charles Darwin. GA updates its population based on the operations selection, recombination (crossover), and mutation. It was initially proposed for binary representation of the individuals. However, several variants proposed in the literature extended its application with floating point representation.
GA operations can be implemented in different ways. Algorithm 1 illustrates a generalization of its implementation. After the population initialization, the parents are selected. Then, the recombination, mutation, and evaluation phases are executed in this order. Finally, the fittest individuals are selected to the next generation. Fig. 1 The general model of a solution for CRDP: 6 meals made by 17 food products In this work, the GA applied in the IBHEA islands selects the parents by the binary tournament selection strategy, aiming to return the fittest solutions in the population. After selection, each pair of parents are recombined in two distinct ways. The −blend crossover recombines the portions vector with a randomly selected value between the parent's values. Regarding the ID Vector, the parents are recombined by the two points-crossover recombination operator. In this work, the mutation operator considers a random value in [0.5, 3.0] for the portions vector. For the ID vector, the mutation operator chooses a random food index for the position to be replaced, according to Table 2.
To select the survivors for the next generation, each individual of the new generation is compared with that in the same position in the population of the previous generation. The individual with the best fitness according to Equation (3) is selected for the next generation. This operation guarantees the monotonicity of the algorithm, and the best solution is always retained.

Differential evolution algorithm
The Differential Evolution algorithm (DE) [45] is a classical EA originally designed to deal with real-valued variables. It is a general algorithm that can be easily adapted to a wide range of problems. In the literature, it is possible to find DE applications in engineering [34,51], chemistry [10], biology [18], finance [37], artificial intelligence [57] and other areas [22].
The steps and operators of the basic DE are illustrated in Algorithm 2. After the population initialization, the parents are selected. Then, the mutation, recombination, and evaluation phases are executed in this order. Finally, the fittest individuals are chosen to be considered in the next generation.

3
The mutation produces a new population of candidate solutions V = {v 0 , … , v pop } , such that |V| = |X| = pop . In DEs applied in the IBHEA islands, two different mutation operators are considered, one for each vector of the candidate solutions.
The portions vector of a candidate solution v s ∈ V is generated by the sum of a random individual from X to the difference between two other random individuals, also from X. This process employs a factor of perturbation F ∈ (0;2] that weighs the inserted randomness. This factor needs to be set as a parameter for DEs in IBHEA islands. There are many different mutation processes described in the literature, as reported in [45]. However, the most adopted is the DE/rand/1, described as follows. Let X g denote the population in an IBHEA island with DE at the generation g. Also, let x , x and x be three distinct random individuals that belong to X g and let x k j denote the k-th gene of an individual x j ∈ X g . DE/rand/1 generates a candidate individual v s that belongs to the generation g + 1 as show in Equation (4). This operator is applied to each gene separately. In the CRDP, if v k s results in a value less than 0.5 or greater than 3, then it is rounded to the nearest bound value ∈ [0.5, 3].
The ID vector of the trial individual v s is generated by a different mutation operator. Each gene k ∈ {1, … , 17} from v s is generated by randomly selecting one of the k-th gene from x or x with the same probability. Thus, each gene of the trial individual also respects its food category and does not compromise the modeling of the solution.
For each target individual x s ∈ X a trial individual v s ∈ V is generated from mutation. Then, an individual u s , denominated offspring, is generated as where u k s , v k s and x k s are the k-th gene of the individuals u s , v s and x s , respectively. These solutions are inserted into a new population U = {u 0 , … , u pop } . The value r ∈ [0, 1] is randomly generated for each gene of the individual. R r ∈ [0, 1] is a parameter required for the IBHEA islands with DE. This parameter represents the DE recombination ratio, that is, the probability that an offspring inherits the genes from the trial individual v s . When R r = 1 , the offspring will be equal to the trial individual v k s . On the other hand, when R r = 0 , the offspring will be equal to the target vector x k s . If 0 < R r < 1 , the offspring can combine genes from both v k s and x k s . One can see that this is a crucial parameter for DEs in IBHEA, as it controls the exploration/intensification ratio.
As the number of offsprings is the same as the number of individuals in the current generation, the selection operator compares each offspring with the corresponding individual in the current population by the selection operator. Then, the individual with the worst fitness is discarded, and the other undergoes to the next generation. This procedure ensures that generation g + 1 will always be equal to or better than the generation g.

The IBHEA implementation details
Commonly, the EAs build a population of candidate solutions to a given problem and apply operators inspired by natural genetic variation and natural selection [49]. One of the proposed alternatives to implement EAs is the Island Model (IM), by which it is possible to run EAs in parallel Fig. 4 Example of the three phases of the IBHEA evolutionary process computing environments. The IM is a class of distributed EAs in which the population is divided into sub-populations called islands. Each island runs its own EA independently in parallel with others. A topology defined by the user connects them. So, periodically, they interact by the migration operator [15], exchanging solutions through the connections according to a set of rules known as migration policy. Figure 3 represents an island graphically as a group of individuals evaluated separately. Two or more of them, connected in a specific way defined by the user, configures the Island Model.

Fig. 3 Island representation
When designing an Island Model, the choice of the EA to be applied in the islands is one of the most critical steps. In a hybrid IM, different EAs are applied in the islands. This type of implementation can be very beneficial for solving the optimization problem.
The proposed IBHEA comprises 24 islands with different EAs and different values defined for their respective parameters. The choice for the hybrid implementation for IBHEA aims to provide different evolutionary behavior between islands.
For the implementation of the IBHEA, this work considers the algorithms DE and GA to be applied in its islands. These EAs were chosen because they have distinct evolutionary behavior. In this way, the hybrid characteristic of IBHEA is reinforced, and it is possible to establish a scenario of cooperation between EAs through the migration of solutions produced in different evolutionary algorithms [26]. Thus, the islands with DE exploit the population, while the islands with GA perform population diversification.
A ring topology connects the islands in IBHEA. In this case, each island is randomly connected to two other ones at each migration process in a unidirectional way. So, each island receives solutions from only another one, as well it sends to only another island in the topology. Figure 4 illustrates the evolution process of IBHEA, defined by three steps. In the evolution phase, each island evolves its population independently by its own EA, which can be DE or GA, by a certain number of generations. Then, the migration phase starts, and each island sends and receives the same number of solutions to/from its neighbors. After each migration phase, the islands are randomly connected again for a new execution of the evolution phase, followed by a new migration phase with the new connections. This sequence of steps is repeated until a stop criterion is met, the maximum of 100 generations or reaching a diet with less than or equal 1200 kilocalories.

Computational experiments
The computational experiments were performed in a personal computer with Intel Core i5 CPU 5200U with 2.2 GHz and 4 GB of RAM, running a Linux operating system. The computational solution was implemented in C and compiled with the GNU GCC 4.7.3 version.  The evolutionary algorithm in each island, either DE or GA, performs the search over 100 generations with a population of 100 individuals. A total of 24 islands were used in this study: 12 running the Differential Evolution and 12 running Genetic Algorithms. Different parameters sets were considered for each of 12 DE and 12 GA applied in the 24 IBHEA islands according to Table 3. Each combination of the previously described parameters is assigned to each island. Table 3 contains the two main parameters to be defined by the user for GA: the crossover probability C GA ∈ [0, 1] and the mutation probability M GA ∈ [0, 1] . Regarding the DE, its main parameters to be defined by the user, also presented in Table 3, are: the perturbation factor F DE ∈ [0, 2] and the crossover probability C DE ∈ [0, 1] . Table 3 shows the parameter settings for DE and GA applied in the islands of IBHEA, defined according to the scenarios applied by [55].
The parameters that describe a migration policy are the migration rate (the number of individuals that will migrate) and the migration frequency (the frequency of generations in which the migrations occur). In this work, the IBHEA was evaluated under different configurations regarding the migration policy setting. The migration rate varied from 1% to 20% of solutions, randomly chosen from each island. The migration frequency varied from 1 to 20 generations. Table 4 shows the combinations of parameters used in this paper.
Since DE and GA are not deterministic algorithms, it is necessary to run each experiment several times to mitigate  its non-deterministic behavior. Each IBHEA configuration was executed 100 times with different random seeds for each independent run. Table 4 presents the Minimum, Mean and Maximum values of the objective function of the solutions obtained in the 100 runs of different IBHEA configurations identified in the first column. This table also indicates that the migration operator in IM can positively contribute to the solution quality of EAs. Table 4 demonstrates that the IBHEA configuration that produced the best set of solutions, according to the Minimum and Mean metrics, was the one in which the migration was performed at each generation of EAs and which exchanged the most significant number of solutions between the islands. The configuration associated with the lowest value for the Maximum metric also presents a similar characteristic of IBHEA regarding migration application.
A set of simulations was performed to compare the results produced by the hybrid algorithm with the results of other evolutionary algorithms presented in the literature. In this context, a comparison with the results presented by [54] is shown in Tables 5 and 6. The first and second columns of Table 5 show the parameters employed in the DE algorithm, while the third column displays the average result. The IBHEA result is presented in the fourth column. The fifth column shows the caloric reduction compared to the stand-alone DE, and the last column shows the percentual caloric reduction. Similarly, Table 6 presents the results for stand-alone GA, except for the first and second columns that show the crossover probability and mutation rate, respectively. The parameters of the stand-alone algorithms are the same as shown in Table 3.
The results show that the hybrid island-based approach reduces the average calories of the daily meals. The main reason for improving the quality of the results arises from the diversity of the population introduced by the migration between islands with different evolutionary algorithms. It should be noticed that the hybrid models implementing GA and DE show the same number of objective function evaluations. IBHEA results achieved better performance when compared to the results present by [54], which used a DE with island implementation to solve the CRDP.
An essential feature of the present work is the easy interpretability of the resulting models of the algorithm. A solution represents an actual diet that makes sense for human readers. Table 7 shows an example of a daily diet generated by IBHEA, in which a large diversity of foods and drinks in all meals can be noticed. This diet was chosen because its meals sound good, the calories of this diet (1444.72 kcal) are just a little bigger than the best result reached by the IBHEA (1407.66 kcal), and almost the same as the mean of all the results for better migration policy(1/20), as one can see in Table 4.
Another relevant feature of IBHEA is its applicability to real-world contexts since it can solve many instances of CRDP in seconds. As a population-based method, IBHEA generates different diets at each execution. The great diversity of foods and drinks makes diets easier to follow, so the taste will not be tired with repetitive meals, thus becoming more comfortable with adapting to the diet and, as a consequence losing weight.

Real-life implications
The hybrid approach proposed in this work has achieved superior results than recent literature, but there are potential points for improvements in the methodology proposed in this work. One of these points lies in the generality of the diet obtained due to the execution of the IBHEA. It is known that the success of diets can be profoundly impacted by personal factors related to the environment, family, education, and socioeconomic status of the individual [36]. Consideration of such aspects could significantly enhance the quality of an automatically generated diet and improve its potential for adoption and success.
Furthermore, the success of a diet may not be restricted to measurable properties of a food prescription table, but to the satisfaction concerning individuals' evaluation between their desires with the diet and the goals achieved with them, their motivation to control the diet, their satisfaction with their food-related behaviors or even the way and frequency that they receive nutritional recommendations [25,36]. In this sense, it is important to note that a methodology for automatic generation of diets based on the optimization of nutritional information can prevent the incorporation of external factors that might influence individuals' behavior to improve the success of diets, such as scent and ambient music. Other internal factors, such as their own perception of healthiness and portion sizes [58]. These aspects are strongly related to cultural characteristics, profoundly varying according to the region of the world where they are contextualized, and socioeconomic characteristics, according to their lifestyle or even their academic background [16].
In order to define a method for generating diets with even more quality and success, the methodology must go beyond nutritional information, which imposes an additional level of complexity on optimization methods that follow approaches similar to the method proposed in this work. In this direction, the computational model can use more personalized information to generate diets that meet more specific objectives and consider individual aspects, considering the recommendations of nutritionists or doctors. For this, other restrictions can be included in the formulation of the problem and, based on its definition, can be easily added to the search algorithm for a diet that, later, must be analyzed by a specialist to ensure that the patient's goal is achieved safely and healthily. Other improvements can be done by integrating other recent-developed evolutionary algorithms [1-3, 30, 41, 42, 46].
Checking the balance between the amounts of food generated in the diets is also a crucial step. For example, a diet with 300 g of lettuce, although feasible and within the caloric restrictions, can make the meal unattractive. In addition, increasing the number of items in each meal can improve palatability. Such consideration can also be included as a constraint. Another important aspect is the cultural relationships involving the ingredients of the meals [6]. The cultural diversity in regional cuisines creates some consumption patterns and combinations of ingredients that transcend individual tastes and must be considered in diets. These aspects that were not considered in this work can be conducted as future research.

Conclusion
This work presents an Island-Based Hybrid Evolutionary Algorithm (IBHEA), a distributed evolutionary algorithm in which evolved subpopulations considering Differential Evolution and Genetic Algorithms. The IBHEA is applied to a Caloric-Restricted Diet Problem (CRDP) solution, aiming to compute a low-calorie diet with the minimal amount of necessary nutrients.
The methodology presented in this work brings some significant aspects when compared to others in the literature. First, it is crucial to the point that the IBHEA is able to generate a great diversity of solutions. Thus, the algorithm can quickly generate various diets, increasing the potential of individuals to engage in specific diets, unlike deterministic methods, such as branch-and-bound approaches or mathematical programming methods, that can not be adequately used to solve CRDP as it would always generate the same diet. Another important aspect is related to the CRPD modeled in this work, which represents a solution as a set of six meals with great food variety and respecting a minimum amount of each ingredient, increasing the palatability of the diet. The solution of the CRPD modeled in this work is also highly interpretative, which is a critical feature for a method that aims to be applicable in practical contexts.
A limitation of our approach is the lack of diet customization, we don't have an interface that the user can remove or add foods to the list, nor is there a way to change the number of meals or the number of items in each of them. However, the diets presented are satisfactory, as they achieve good results in terms of respect for nutrient restrictions. The use of the hybrid islandbased model achieved significant results since it reduced the number of calories of the diets without violating the constraints in the majority of the scenarios. This work can be applied in real situations, as it can generate many diets in a short time.
Although the present work shows the results of a very consolidated methodology, it brings the opportunity to apply the IBHEA to several variations of the CRPD, considering different scenarios and restrictions. In this sense, for future works, we propose developing a multi-objective version of the CRDP, minimizing the number of calories, the financial cost, or the sodium consumption while maximizing the amount of fiber and protein, for example. It is also essential to apply the methodology presented in this work to construct a tool that can be more easily controllable by the user, allowing it to be used in specific diets for diabetic or hypertensive patients. A user-friendly tool will also allow it to generate variations on the same diet, increasing the potential to adopt the diet by individuals. Data availability Data and materials can be obtained upon request to the authors.
Code availability Code can be obtained upon request to the authors.