Consecutive Meals Planning by Using Permutation GA : Analysis of Meal ’ s Characteristics in Optimum Solution

The consecutive meals planning is a planning problem that determines a meals plan on a long period consisting of consecutive days. A meal has a variety of characteristics such as food style, ingredient, and cooking method. Therefore, it is desired that the consecutive meals plan provides a variation of appearance order of meal's characteristics. This paper optimizes such a variation of appearance order on a long period by using a permutation GA and analyzes the meal's characteristics in the optimum solution. In the numerical experiments, we show that the optimum solution obtained by permutation GA has high quality and is effective for the consecutive meals planning with large variation of appearance order of meal's characteristics. 


I. INTRODUCTION
There are a lot of institutions which have to provide daily meals.For example, a hospital has to provide meals to an inpatient on a long period.Educational institutions such as elementary school and preschool also have to provide a school meal as a daily lunch during school term.On a long period consisting of consecutive days, it is desired that they provide the various meals having different characteristics such as food style, ingredient, and cooking method, for health of an inpatient and growth of an infant and a child.The nutrition managers of hospital have to decide the meal contents under the strict rules according to the condition of each patient.On the other hand, the nutrition managers of educational institutions consider some basic rules such as an amount of calories and costs, but they can decide the meal contents freely by their own policy and preference.Hence, many educational institutions have a critical problem that they may consecutively provide the meals in similar characteristics.
For such a consecutive meals planning, we design an evaluation function which expanded the function proposed by Kashima et al. [1] for measuring the  Manuscript received March 20, 2018; revised July 30, 2018.variation of order appearance of meal's characteristics on a long period.Then, we analyze the quality of optimum solution obtained by a permutation GA.

II. RELATED WORK
Generally, a meal planning optimization for one meal is to determine the food combination which minimizes or maximizes the given evaluation functions.Many researchers have dealt with caloric intake or cost minimization problems under constraints of nutritional requirements for their purposes such as healthy diet, balancing meals, nutrient recommendation, and muscle growth [2]- [7].Their problems are viewed as integer or mixed-integer linear programming problems.Hence, we can find the high accurate solutions by using a simplex method, an interior point method, or some of other numerical analysis methods.If a problem of meal planning cannot be solved by using these methods, we can adopt evolutionary algorithms.Seljak [8] applied the NSGA-II, a popular algorithm for multi-objective optimization problems, to a seven-objective meal planning problem.
On the other hand, we are focusing on a consecutive meals planning optimization for the educational institutions such as elementary school and preschool.
Kashima et al. [9] first proposed an evaluation function which measures the variation of order appearance of meal's characteristics on a long period when the number of meal's characteristics for one meal is three.Their evaluation function consists of three functions for meal's three characteristics, but each of three functions has a weight parameter.It has the problem that the value of the evaluation function depends on the difference in weight parameters.In this context, Kashima et al. [1] designed a new evaluation function whose three functions for meal's three characteristics are normalized.
They showed that the landscape of the evaluation function is viewed as one of multimodal functions by using the hill climbing method [10].The consecutive meals planning is one of difficult optimization problems.
On the other hand, the analysis of optimum solution's quality is not done.For the consecutive meals planning, in this paper, we design an evaluation function which expanded the function [1] for measuring the variation of order appearance of meal's characteristics on a long period and then analyze the quality of optimum solution obtained by a permutation GA.

III. CONSECUTIVE MEALS PLAN
Generally, one meal consists of one main dish and some side dishes.We deal with only a main dish as a meal and call it ``Meal Class'' in this paper.In other word, we determine the main dishes plan on one period consisting of consecutive days.
We first define the following notations.t : Item j of Characteristics i on Meal Class.

That is
Meal Class which is categorized by difference of meal's characteristics.That is x , be the meal's characteristics for Item j of Characteristics i .The Meal Class m X , the combination of meal's characteristics from x , , is defined as, For example, we classify the meal's characteristics into three categories; "food style", "ingredient", and "cooking method."In addition, we classify the category of food style into "Japanese", "Western", and "Chinese", the category of ingredient into "Meat", "Fish", and "Egg", and the category of cooking method into "Simmer", "Fry", "Saute", and "Deep-fry", respectively.Using these settings, Meal Classes are defined as, From the practical viewpoints, the educational institutions have many opportunities to provide a special meal on an event day.For example, Japanese preschool provides a chicken dish at Christmas.Hence, we assume that the event date which provides a special meal is randomly given on the period for the consecutive meals planning.
Here, let   e t be the time point of event date and let The meals plan defined by Equation ( 3) is a solution for the consecutive meals planning.

IV. CONSECUTIVE MEALS PLANNING PROBLEM
In this section, we design an evaluation function which expanded the function [1] for measuring the variation of appearance order of meal's characteristics and then define two optimization problems for the consecutive meals planning.

A. Function for Meal's Characteristics
It is well known that the information entropy is an index which measures the predictability/unpredictability of information content and is defined as the probability of observing event.We design the evaluation function on the basis of the information entropy.Let j i P , be the frequency rate of observing item j of Characteristics i in Meal Class on a given period.The information entropy of Characteristics i is maximized if all items of Characteristics i are observed the same number on the period.However, the information entropy has a problem that it cannot measure the appearance order which the event occurs on the period though it can measure the number of occurrences.For example, when there are two events, 1 E and 2 E , on the period consisting of consecutive four time points on   , the information entropy obtained from   . Can we measure the variation of appearance order of such different events?For the consecutive meals planning, we have to measure the variation of appearance order of different meal's characteristics.
In order to improve this problem, we divide one period consisting of T time points into the short intervals consisting of the number of items for each meal's characteristics.As described in Equation ( 1), the number of items of Characteristics i of Meal Class is i J .Here, the first interval consists of i J time points from 1  t to i J t  .To maximize the information entropy on this first interval means to maximize the variation of appearance order of meal's characteristics only on this interval because the number of time points on the interval is same as the number of items of Characteristics i .Moreover, the interval moves from the first one to the last one every one time point on the period.The last interval consists of Characteristics i .To maximize the total information entropy of all intervals means to maximize the variation of appearance order of meal's characteristics on one period.
For measuring the variation of appearance order of Characteristics i , we design the function as the average of entropies in all intervals.
For example, the functions in the case study of 12  T (Length of period), 2  I (The number of characteristics), 2 1  J (The number of items of Characteristics 1 ), and In Fig. 1, the meals plan consists of 12  T time points on the period.Meal Class is categorized into two characteristics.For Characteristics 1 , the information entropy is calculated on two dates because the number of items is 2 1  J , and thereby we obtain 11 information entropies.We can obtain the average of 11 entropies as the function for Characteristics 1 , 1 H .For Characteristics 2 , the information entropy is calculated on three dates because the number of items is 3 2  J , and thereby we can obtain the average of 10 information entropies as the function for Characteristics 2 , 2 H . On the other hand, the number of each of all Meal Classes is the same on the period.We define it as M T by using the length of period T and the number of Meal Classes M .If T is not a multiple of M , the number of each Meal Class provided on the period has the maximum difference of 1 .

B. Evaluation Function for Measuring Variation of Appearance Order of Meal's Characteristics
In this section, we design two evaluation functions on the basis of the functions for meal's characteristics given by Equation (4).For the consecutive meals planning, we define two maximization problems, Problems 1 and 2, using the evaluation functions.

1) Problem 1
We define the maximization problem which maximizes the total entropy of meal's all characteristics as Problem 1.

 ,
, , 1 , max where * i H is the theoretical value of the average of entropies of Characteristics i .

2) Problem 2
We define the maximization problem which maximizes the guaranteed minimum of the variation of appearance order of meal's all characteristics as Problem 2. This is the maximin problem.
. , , min max V. PERMUTATION GA For the consecutive meals planning, we adopt a permutation GA with the specific genotype.The permutation GA expresses a round trip route most simply.

A. Genetic Representation
In the genetic representation of permutation GA, we define the genotype of individual which is modified from the phenotype of solution.
We define the individual as the following genotype consisting of the integer sequence.
On the decoding procedure, we modify the genotype given by Equation ( 7) to the phenotype of solution.The solution is defined as the following phenotype.

B. Fitness Value
We employ the evaluation function given by Equation ( 5) and Equation ( 6) as the fitness value of permutation GA for Problem 1 and Problem 2, respectively.Note that the evaluation function for Problem 1 is the total entropy of meal's all characteristics.However, the evaluation function for Problem 2 is the minimum value of all entropies of meal's characteristics.The permutation GA tries to find the optimum solution which maximizes the fitness value.

C. Genetic Operations
The permutation GA generates the individuals in the initial population and makes new offspring by the crossover and the mutation.On each generation, the permutation GA selects the individuals to the new generation by the elitism and the tournament selections.Each operation of the permutation GA is designed as follows.
Note that the Meal Classes provided at event date are randomly given on the period and are fixed on the procedure of permutation GA.They are not operated by the crossover and the mutation.

1) Initial State
Meal Classes provided at event date are fixed in advance.On the first generation, the permutation GA generates p N individuals in the initial parents' population.On the basis of Equation ( 7), each individual consists of T variables which are randomly selected from the integer sequence   T , , 1  without overlapping.

2) Evaluation and Selection
The permutation GA applies the elitism and the tournament selections to select the individuals for the next population.individuals by using the order crossover [11] for exchanging the partial structure between two individuals according to the order of the sequence without overlapping.The example of the order crossover is shown in Fig. 2.

5) Terminate Criterion
The permutation GA repeats the operations of producing the offspring population and performing the selection until the maximum number of the repetitions, max t , is satisfied.From the last population, we choose one solution whose individual has the highest fitness value of all.This solution is the optimum meals plan for the consecutive meals planning.

VI. NUMERICAL EXPERIMENTS
In this section, we discuss the effectiveness of the solutions obtained by the permutation GA and analyze the variation of appearance order of meal's characteristics in the solutions.

A. Experimental Setting and Parameters
In the numerical experiments, the meal's characteristics are categorized into each of food style H in Table I are larger than those in Table II.Therefore, the evaluation function of Problem 1 given by Equation ( 5), the total entropy of meal's all characteristics H is effective for the consecutive meals planning having large variation of appearance order of meal's characteristics.Here, we compare the quality of solutions between Problems 1 and 2. We calculate the overlap rate of the appearance of the same characteristics in all intervals,   , of the given period.For example, the interval with the appearance order of meal's characteristics of   x and 2 , 1 x .For Problems 1 and 2, the overlap rate of each of meal's three characteristics in the Journal of Advances in Information Technology Vol. 9, No. 3, August 2018 optimum solutions obtained by the permutation GA on the 1st, 250th, 500th, 750th, and 1000th generations is shown in Table III, respectively.
From Table III, for Problems 1 and 2, the overlap rates of the appearance of the same characteristics gradually decrease.In addition, on every generation, the overlap rates of all characteristics for Problem 1 are smaller than those for Problem 2. Hence, we conclude that the optimum solution of Problem 1 obtained by the permutation GA has high quality and is effective for the consecutive meals planning.

VII. CONCLUSIONS
For the consecutive meals planning, we designed the evaluation function for measuring the variation of appearance order of meal's characteristics.Then, we applied the permutation GA to the two maximization problems, Problems 1 and 2. For Problem 1, we employ the total entropy of meal's all characteristics as the evaluation function.For Problem 2, we employ the minimum value of all entropies of meal's characteristics as the evaluation function.
In the numerical experiments, we showed that the optimum solution in Problem 1 has high quality and is effective for the consecutive meals planning with large variation of appearance order of meal's characteristics.
On the other hand, we have to apply other evolutionary algorithms to this consecutive meals planning and then compare the results obtained by the permutation GA with others.This is our future work.

Figure 1 .
Figure 1.Example of functions for meal's characteristics.


of items of Characteristics 2 ) are shown in Fig. 1.
time point t , the permutation GA has two kinds of variables,   t Y of solution and   t v of individual.
two variables selected at random on one individual.