The Decision Support System (DSS) Application to Determination of Diabetes Mellitus Patient Menu Using a Genetic Algorithm Method

Composition of foods containing sugar in people with Diabetes Mellitus should be balanced, so an app is required for facilitate the public and nutritionists in determining the appropriate food menu with calorie requirement of diabetes patient. This research will be recommended to determination of food variation for using Genetic Algorithm. The data used is nutrient content of food obtained from Tabel Komposisi Pangan Indonesia (TKPI). The requirement of caloric value the patient can be used the PERKENI 2015 method. Then the data is processed to determine the best food menu consisting of energy (E), carbohydrate (K), fat (L) and protein (P) requirements. The system is comparised with variation of Genetic Algorithm parameters is the total of chromosomes, Probability of Crossover (Pc) and Probability of Mutation (Pm). Maximum value of the probability generation of crossover and probability of mutation will be the more variations of food that will come out. For example, patient with gender is women aged 61 years old, height 160 cm, weight 55 kg, will be resulted number of calories: (E=1621.4, K=243.21, P=60.80, L=45.04), with the gene=4, chromosomes=3, generation=3, Pc=0.2, and Pm=0.2. The result obtained is the three varians: E=1607.25, K=198.877, P=95.385, L=47.508), (E=1633.25, K=196.677, P=85.885, L=55.758), (E=1630.90, K=177.455, P=85.245, L=64.335).


Introduction
In 2005 there were 200 million people with diabetes and is expected to increase to 333 million people in 2025. Countries like India, China, the United States, Japan, Indonesia, Pakistan, Bangladesh, Italy, Russia and Brazil is the top 10 countries with the largest population of diabetes [1]. The development of Diabetes Mellitus disease causes concern throughout the world, especially people who have nutritional transition marked by reduced traditional food intake and increased intake of instant food or fast food.
In the American Diabetes Association (ADA) research concluded that there are no more effective nutrients than carbohydrate, protein and fat. The proportion of macro nutrition should be tailored to each individual need to meet metabolic goals in a person with Diabetes Mellitus [2]. Diabetes Mellitus occurs sustainably, nutritional therapy in Diabetes Mellitus is effective for improving blood sugar control and other metabolic functions. In general, the energy needs of individuals with Diabetes Mellitus is not different from normal people.
Paradigm that happened in society is patient with Diabetes Mellitus should not consume sugar, but sugar is very needed for body metabolism process. Metabolism that occurs in the body will produce energy that will be needed for the activity. Lack of intake of sugar in a person will result in the occurrence of hypoglycemia, a condition in which blood sugar levels dropped dramatically. It would be dangerous and even fatal. Diabetes Mellitus sufferers should continue to consume sugar in sufficient quantities, no more and no less.
Therefore, the determination of energy needs in people with Diabetes Mellitus is considered very important. How to determine it is by using the formula of the PERKENI 2015. The problem that exists today is that people still rarely use the formula and more often use the formula approximately. So the provision of diet to patients with Diabetes Mellitus is not accurate. Hospitals have set the PERKENI 2015 formula but when determining the portion of the menu still uses the approximate formula because it is too complex, and it takes time for the community or nutritionist to calculate the energy needs of each patient each day.
The Genetic Algorithm has been widely used in various optimizations, including numerical optimization and combinatorial optimization problems. The advantages of Algorithm methods from other methods are capable of handling various types of objective functions with constraints on discrete, continuous, or mixed search spaces. The advantages possessed by Genetic Algorithm are selection evolution operations that work probabilistically against several possible solutions to make genetic algorithm very effective in global optimization. The genetic algorithm has a fairly good flexibility and is sufficiently possible to combine it with other methods and make a more efficient implementation of a particular problem [3].
From the problems and conditions that have been discussed earlier, it is necessary an information system to make the determination of food menu of people with diabetes mellitus using Genetic Algorithm. Genetic Algorithm is used to randomize food based on the calories needed.

Diabetes Mellitus
Diabetes Mellitus (DM) is a collection of symptoms that arise in someone who has increased blood glucose levels due to deficiency of insulin hormone in absolute or relative. The implementation of the diet should be accompanied by physical exercise and changes in food behavior. According to the consensus of Management of Diabetes Mellitus in Indonesia by the association of Endocrinology of Indonesia, Diabetes Mellitus disease is divided into 4 groups, namely: Type I and Diabetes Mellitus, Gestational Diabetes Mellitus, and other types [4].
Determination of food for people with Diabetes disease aims to maintain blood glucose levels to near normal, maintain normal serum lipid levels, and provide enough energy to maintain or achieve normal weight. The dietary requirements of inner Diabetes disease [4] are as follows: a. Foods with sufficient energy correspond to the total energy required by the patient to achieve and maintain a normal weight. b. Food with enough protein, ie 10-15% of total energy needs in a day. Fat is 20-25% of total energy needs in a day. And carbohydrates are the rest of the total energy requirement, which is 60-70%. c. The use of pure sugar in beverages and foods is not allowed unless the amount is a bit as a spice. When the glucose level is controlled, it is allowed to consume pure sugar to 5% of total energy needs. d. Vitamins and minerals. e. Distribution of food in a day: (2)

Fat
While for normal fat requirement is 25% of total energy requirement. The fat equation on Harris Benedict method is as follows:

Carbohydrate
While for normal carbohydrate needs is 60% of total energy needs, or residual energy after being reduced by energy derived from protein and fat. The equation determines carbohydrates are as follows: Diet used as part of Diabetes Mellitus management is controlled based on energy, protein, fat and carbohydrate content. As a guideline used 8 types of Diabetes Mellitus Diet as can be seen in Table 5 [4]:

Genetic Algorithm
The genetic algorithm is a heuristic search algorithm based on the mechanism of biological evolution. The diversity in biological evolution is a variation of the chromosomes between individual organisms. The Genetic algorithm was developed by John Holland from Michigan University. John Holland says if any problem (natural or artificial) associate with adaptation can be formulated in genetic terms. The genetic algorithm is a simulation of the evolutionary process of Darwin and the genetic operation of the chromosomes. In this algorithm, the search technique is done simultaneously on a number of solutions known as the population. Individual in one population are called chromosomes. This chromosomes is a solution that is still a symbol. The initial populations randomly constructed, while the next population is the result of chromosomes evolution through an iteration called by the term generation. In each generation, the chromosomes will go through the evaluating process using a measuring instrument called a fitness function.
The fitness value of a chromosomes will show the quality of the chromosomes in that population. The next generation known as term child (off-spring) formed from the combined 2 generation chromosomes now acting as the parent using a cross carrier (crossover), in addition to the cross carrier, a chromosomes may also be modified by a mutation operator. The population of new generation is formed by selecting the fitness value of the parent chromosomes and the fitness value of a child's chromosomes (offspring), as well as rejecting the other chromosomes so the population size (the number of chromosomes in a population) still constant. After going through several generations, this algorithm will converge to the best chromosomes. In general, a simple genetic algorithm flow diagram as shown in the figure 1: To implement genetic algorithm, the main components to do are: 1. Generate the initial population Before generating the initial population, it must first determine the number of individuals in the population. For example the number of individuals is N. After that, it generates only initial populations that have individual beginnings at random. 2. Evaluation function There are 2 things to do in evaluating chromosomes, that is: evaluate objective function (objective function) and conversion of objective function to fitness function. In general, the fitness function is derived from an objective function with a non-negative value.

Selection
Selection will determine which individuals will be selected for recombination and how offspring is formed from the selected individual. The first step in this selection is the fitness value search. Each individual in a selection vessel will accept the probability of reproduction that depends on its own objective value on the objective value on an individuals in the container. This fitness value will be used in the next selection stage.
A commonly used selection method is roulette-wheel. This selection aims to provide greater reproductive opportunities for members of high-fitness populations to reproduce. The workings of the roulette-wheel method are as follows: a. Calculate the total fitness (F): b. Calculate the relative fitness of each individual: c. Calculate cumulative fitness d. Select the parent that will be the candidate for the crossover: 1. Generate random r 2. If £ r and , then select the chromosome into (k+1) as the parent candidate.

Crossover
Crossover (crossing) is done on two chromosomes to produce a child's chromosome (offspring). The child's chromosomes that are formed will inherit some of the parental chromosomal properties. In crossover there is one parameter that is very important that is probability of crossover (Pc). Probability of crossover show the ratio of the children generated in each generation to the size of the population. Example the population size (popsize = 100), while the probability of crossover (Pc = 0.25), means there is expected 25 chromosomes of 100 chromosomes in the population will be crossover.

Mutation
Mutation is the process of modifying a child's chromosomes randomly. Mutations will create new individuals by altering one or more genes present in a chromosome. Mutations play a role in replacing the missing genes of the population due to the selection process and allow for the emergence of genes not present in the initial population. In the mutation there is one parameter that is very important is the probability of mutation (Pm). Probability of mutation show the percentage of total genes in the population that will undergo a mutation. To make a mutation, we must first calculate the total number of genes in the population. Then generate a random number that will determine which position will be mutated. Example the population size (popsize = 100), each chromosome has a length of 20 genes, then the total gene is 100 x 20 = 2000 genes. If the mutation probability (Pm = 0.01), means that there is expected (1/100) x 2000 = 20 genes will mutate.

Methodology
This research uses Genetic Algorithm method to optimize calorie and calorie needs of food so get the appropriate menu variation. Food data used in this study is Indonesian Food Composition Table (TKPI) and report on the results of research on the composition of food nutrients carried out at the Center for Research and Development of Nutrition and Food Ministry of Health.
In an effort to obtain optimal results, this research is done through the stages to be done, namely: 1. Literature review.
At this stage the process of collecting literature such as international and national journals in accordance with the topic of research, as well as articles relevant to the topic of research.

Interview.
Observation is done by conducting interview process to nutritionist of General Hospital of Kudus.

Analysis and Design of Information System
The design of this system is the conceptualization stage, which is a stage that requires analysis in the design of the system (software) so that the system is made according to the needs of the user. The diagram used in the design of this application is the Unified Language.

System implementation
At this stage will implement the system into the application to be built using PHP and MySql database based web.
Flow Chart on the Implementation of Genetic Algorithm for Decision Support System Food Menu Determination of Diabetes Mellitus Patients is shown in figure 2.

Research result
The results of the research were conducted by comparing the parameters used in the Genetic Algorithm, so it can form a conclusion of the use of suitable parameters for a relatively large amount of data. Food menu determination system can provide information on which food menu is suitable to serve as a menu for people with diabetes mellitus with the calories needed.

Discussion
Before calculating the food menu using Genetic The size of the population depends on the problem to be solved. After the population size is determined, then initialization of the chromosomes in the population is performed. Chromosome initiation is done randomly. Initial population by taking samples of 4 kinds of foods as genes and 3 menus as chromosomes to be done manual calculations.
There are two things to do in evaluating chromosomes, namely evaluating the value of objective function and conversion of objective function into fitness function. The number of calories here as an objective function.
The fitness function is lowered by a non-negative value. At the fitness value here, the minimum caloric difference is the optimization to be achieved in the determination of the food menu. So the smallest calorie difference will get the value of fitness with the greatest value. The initial population show in table 6, objective  function show in table 7 and fitness value in table 8. c. Stage of Selection After obtaining the value of the cultivated fitness (Q) and the random value (R), an approximation of R values to the Q value is altered to obtain a new chromosome. The following stage of selection in a table 9 and result of  selection in table 10. d. Stage of Crossover Crossovers are performed on two chromosomes to produce a child's chromosome (offspring). The child's chromosomes that are formed will inherit some of the parental chromosomal properties. Probability of crossover (Pc) is 0.5 then the value below 0.5 will be selected to be the parent chromosome. The following stage of crossover in a table 11 and result of crossover in table 12. e. Stage of Mutation The number of chromosomes that have mutations in one population is determined by the probability of mutation (Pm). In this mutation it is possible to emerge a new chromosome that had not originally appeared in the initial population. Each chromosome has a length of 4 genes, then the total gene is 3x4 = 12 genes. If the probability of mutation (Pm = 0.5), the expected means is 0,5x12 = 6. It is expected that there are 6 genes that will have mutations. The following calculation of the mutation stage is shown in table 13 and result of mutation in table 14 So, one of selected food menu is K [3]. Calculated to the desired generation.

Testing System
Below is a picture of the system implementation:

Analysis result
The results of the analysis that can be taken from the results of system testing performed: 1. In the determination of diabetes mellitus food made comparison using genetic algorithm parameters namely Chromosome Number, Maximum Generation, Crossover Probability, and Probability of Mutation. 2. By entering the number of chromosomes a little for example entering the number of chromosomes 5 will use a fast time during the process. Whereas if entering chromosome more than 15 will use a lot of time. 3. Output results will be more optimal if the number of chromosomes are used slightly and the greater the value of Maximum Generation, Probability Crossover and Probability Mutations will be more varied food that will come out. 4. Testing the system performed to produce benefits in terms of users is that if the user is a nutritionist should be use total chromosome = 5, Maxium of Generation = 30, Probability of Crossover = 0,1 and Probability of Mutation = 0,5. Because, with the total of parameter will produce a stable variation and use shorted time, that is 4 second. If the user is a layman and want to choose a lot of dietary variations it is better to use the total chromosomes = 15, Maximum of Generation = 30, Probability of Crossover = 0,3, and Probability of Mutation = 0,5. Because, with the number of parameter will produce a lot of dietary variations and use shorted time to compared with other, that is 12 second.

Conclusion
Genetic Algorithm Method can be applied to decision support system of food menu selection for people with diabetes mellitus. In the results of research conducted by comparing the parameters of genetic algorithm. By entering a small number of chromosomes will use a fast time during the process. And the greater the value of Maximum Generation, Crossover Probability and Probability Mutation will be more variation of food that will come out. Using Number of Chromosomes = 5, Maximum Generation = 30, Crossover Probability = 0.1 and Probability Mutation = 0.5 using a not too long time of 5 seconds with little food variation. While using the Number of Chromosomes = 15, Maximum of 50, Probability Crossover = 0.3 and Probability Mutation = 0.5 using a slightly longer time of 12 seconds with many variations of food and by using Number of Chromosomes = 25, Maximum Generation = 30, Probability Crossover = 0.5 and Probability of Mutation = 0.5 using a very long time of 21 seconds with many food variations and relatively stable.