Efficient Scheduling of Plantation Company Workers using Genetic Algorithm

Scheduling is an activity carried out by allocating certain resources intended to perform a job or task related to time. Scheduling is a part of the industry's decision-making process to allocate existing data or resources to be utilized more optimally [1]. Good scheduling is required by a company that works in the field of plantation and garden management. The company has a number of tasks such as planning all the care of plants and green areas, providing all fertilizer and plant material needs to ensure all plants are growing well and productive, harvesting crops, and maintaining the stock of fertilizer. Plantation activities are carried out by plantation workers whose schedules are determined by the company. The density of worker activities must be balanced with efficient and fair work scheduling. A good schedule will minimize worker dissatisfaction and work stress while maintaining physical health [2][3]. The schedule should consider a fair allocation of working time in holidays, ensuring all tasks are assigned to a worker, and even the number of working days of each worker every month.

Workers at large plantation companies have various activities. These activities include caring for plants, regularly applying fertilizers according to schedule, and crop harvesting activities. The density of worker activities must be balanced with efficient and fair work scheduling. A good schedule will minimize worker dissatisfaction while also maintaining their physical health. This study aims to optimize workers' schedules using a genetic algorithm. An efficient chromosome representation is designed to produce a good schedule in a reasonable amount of time. The mutation method is used in combination with reciprocal mutation and exchange mutation, while the type of crossover used is one cut point, and the selection method is elitism selection. A set of computational experiments is carried out to determine the best parameters' value of the genetic algorithm. The final result is a better 30 days worker schedule compare to the previous schedule that was produced manually. efficient chromosome representation is designed to produce a good schedule in a reasonable amount of time.
This study considers a scheduling problem in a company that has a large garden and plantation area. There is a total plantation area of ± 50 ha and plantation management of ± 200 ha. 18 workers assign to 3 work shifts every day. Scheduling used in this study is to process guidelines in terms of work time and vacation time of plantation workers. In the process of scheduling, the components used are workers, days, and shifts. The worker shift schedule has the goal of providing a daily schedule divided into thirty-day shifts for each worker. In this study, thirteen employees are assigned into 3 shifts of working time. The morning shift is started at seven o'clock in the morning until three o'clock in the afternoon, then continued with the afternoon shift that is started at three o'clock in the afternoon until eleven o'clock at night. The night shift is started at eleven at night o'clock and is ended at seven o'clock in the morning.

II. Method
The current schedule is made manually. Some workers feel dissatisfied as they have more working time in national holiday than other workers. Other problems are raised when a worker is assigned working time in 2 nights shifts continuously as it will impact worker's physical health.
A genetic algorithm is an algorithm that provides an alternative to the traditional search techniques by adapting the mechanisms found in the genetic world. The genetic algorithm has been successfully applied for complex scheduling [18][19] [20]. There are several stages in implementing the genetic algorithm, including determining chromosome structure as solution representation, crossover, and mutation to produce new solutions and selection to pass the chosen solution for the next iterations [22].
Determining chromosome representation is a crucial step in implementing the genetic algorithm. The chromosome representation used is an integer representation. Chromosomes are made based on the division of the number of plants, the number of workers, and also shift workers. Each chromosome will contain numbers from the number of workers that will be entered into each existing shift. An example of part of a chromosome for 2 working days is presented in Figure 1.
There are three shifts: morning, afternoon, and night. The division of workers will then be divided based on working days and work shifts set by the company. In Figure 1, some numbers refer to worker numbers. The number of workers in this calculation is 13. Then, the numbers from 1 to 13 will be assigned to 9 cells (each work shift requires three workers). Then do as much as 30 days / 1 month each worker must not work on the same day and time, and there must also be a balance in the distribution of employee scheduling systems. Therefore, it needs good scheduling in which each employee's composition must be on par with the others.
Penalty calculation is used to find the fitness value of each possible solution [23]. The assessment is used to measure how good the chromosome is for worker scheduling. The number of violations or penalties that appear on the chromosome is required to calculate the fitness value. For each violation, the penalty value will increase 1. The list of penalties that have been determined is presented in Table 1. One worker is registered on the same day/shift P2 Workers have more vacation days than specified P3 Workers who have shifted the night will work again in the morning shift the next day How to calculate fitness on the representation of chromosomes is done by first calculating the number of penalties on each chromosome. For example, there are 9, 12, and 4 violations, according to P1, P2, and P3, respectively. Thus, the total penalty is calculated in equation (1): (1)

= 9 + 12 + 4 = 25
The fitness is calculated according to the total penalty as shown in equation (2): Initial population generation is required for the initial steps in carrying out the counting process. The population is formed from randomized data, with a predetermined number of populations. The amount of the population will be equalized for each generation.
The crossover needed in the genetic process is to get offspring or new chromosomes by choosing two parents. One cut point crossover is a process of crossing between 2 chromosomes or random individuals, which cut the two chromosomes and then combine them to the other cut results.
The mutation process is used to get offspring by using 1 parent. Exchange mutation is used. The method works by randomly selecting two positions (exchange point) and then exchanging the two positions' values.
After doing a fitness calculation for all chromosomes resulting from the crossover and mutation process, it is also necessary to select which chromosomes will be passed to the next generation. Elitsm selection is implemented by gathering both parent and offspring into a pool, then the highest value of chromosomes will be selected

A. Population Size Testing
Testing on this stage is carried out to measure the effect of population size (number of chromosomes in the population) on the fitness values. The test will use the crossover rate with a value of 0.4 and a mutation rate with a value of 0.6. The results of the test are presented in Table 2 and Figure 2. Figure 2 shows that in the low population size, the fitness value is lower than the others. The greater the population's size, the fitness value will also tend to be better, but at some point, the increase in population size does not provide a significant increase in fitness value. In the 140th population and 200 th population, fitness value achieves the best value compared to other populations. Then the optimal solution in testing the population is a population of 200. Therefore, the next test population will be used 200 for further testing. In the 200 th population, the fitness value achieved is 0.6944.

B. Number of Generations Testing
Testing the number of generations aims to find the optimum generation known by looking at the best average fitness results. In this stage, the population size used is 200, and the values of the crossover rate and mutation rate are 0.4 and 0.6, respectively.
As with the effect of population size, the greater the number of generations, the fitness value will also tend to be better, but at a certain point, the addition of the number of generations does not provide a significant increase in fitness. Figure 3 shows that from generation 0 to generation 140, there has been a significant increase in the average fitness value. In the 172 nd generation, the average value of fitness has not increased at all. In the 172 nd generation, the average fitness value obtained was 0.71942. Therefore, the 172 nd generation is the best.

C. Crossover and Mutation Rate Testing
Tests of crossover rate and mutation rate are made to determine the optimal value to reach the best fitness value. The use of crossovers and mutations is to combine and produce offspring for the next generations from the previous explanation. In this test, the value of the rate is used, starting from 0 to 1 with an interval of 0.1. From these results, it can be seen which combination is the best result in this optimization. The result is presented in Table 3.
The crossover and mutation rate testing is started from the value mutation rate of 1 and a crossover rate of 0. The first test's value produces a value of 0.609, which is still relatively low compared with the other results. The highest fitness average is found in the mutation rate of 0.4 and a crossover rate of 0.6. Therefore, the values will be used for the next stage.

D. Scheduling Result
Testing at this stage is used to get the best schedule using the best parameters that have been obtained in the previous tests. In the last test, the best population was the 200 th population, with 172 generations using a crossover rate and mutation rate of 0.6 and 0.4, respectively. The change of fitness values during generations is shown in Figure 4.
In the generations of 172, the genetic algorithm obtained a solution with a smaller number of penalties. In this case, the fitness value obtained is 0.7246, and the schedule is shown in Table 4. In the worker schedule for 30 days, there are 3 division numbers indicating each shift. The division starts from the morning, afternoon, and night shifts. The worker's ID will fill each shift.

IV. Conclusion
Genetic algorithms for optimizing worker scheduling can be implemented with integer chromosome representation. The chromosome representation consists of the worker's ID, date of work, and daily shift. An initial stage is required to obtain the best parameter values for the genetic algorithm. The best parameter values are required to ensure that the genetic algorithm produces a good worker's schedule in a reasonable amount of time. Using the best parameter values, the genetic algorithm obtained a solution with a smaller number of penalties in the generations of 172. The next study will consider adding local searches into the genetic algorithm's cycle to produce a better solution.

Author contribution
All authors contributed equally as the main contributor of this paper. All authors read and approved the final paper.

Funding statement
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Conflict of interest
The authors declare no conflict of interest.