IAES International Journal of Artificial Intelligence (IJ-AI)

Received Sep 1, 2021 Revised Feb 14, 2022 Accepted Mar 3, 2022 Scheduling resources under limited resources using tailored approaches can be done successfully. However, there are situations and problems that require a schedule to handle uncertainties dynamically. The changes in the environment could lead to a non-optimal schedule, which could lead to the wastage of resources. The infeasible schedule could also be an outcome of changes that would render the schedule obsolete, and a new schedule must be generated. The majority of the scheduling problems are solved by a heuristic approach that utilizes a random number generator, thus the outcome is not guaranteed to be optimal. Domain transformation approach (DTA) is a scheduling methodology that has confirmed its expressive power in producing feasible and good quality schedules through avoidance of randomness elements as highly used in heuristic approaches. DTA has been employed in this study to solve the water irrigation scheduling for urban farming. The proposed model was tested on three different datasets. It was observed that the costs obtained on all datasets without utilizing the dynamic DTA are higher in all instances, which indicates that the solution produced by DTA is of higher quality. Thus, dynamic DTA is a more effective way of scheduling resources with considering ad-hoc changes.


INTRODUCTION
Malaysia is currently one of the most urbanized countries of East Asia and one of the most rapidly urbanized regions around the world; over the last ten years, the urban population in Malaysia has increased from around 70% in 2009 to 76% in 2019 [1]. Rural population growth is expected to increase as people from rural areas migrate to urban areas due to the economy and employment continuing to shift from agriculture to industry and services [1], [2]. This shows that agriculture must change concurrently with human lifestyle changes.
Urbanization causes a shortage of land to grow plants. Plus, many Malaysians in urban areas support the concept of urban farming as a way to lessen the burden of high living costs [3]. Urban farming provides solutions to many traditional farming problems and is one of the major solutions for securing food quantity [4]. The economic impact of coronavirus coronavirus disease (COVID-19) on ensuring food security is more critical than ever said an academician [5], [6]. Things are changing, and adapting to changes resulted in an alternative. Urban farming is a concept that refers to the production of food within cities and around them [2],

625
[3], [7]. Moreover, with the internet of things (IoT) technology, urban farming can be managed automatically without human intervention [2]. Automation can be done and is easier using the scheduling method. According to the Oxford Dictionary, scheduling is an arrangement or plan to take place at a specific time. As for resource scheduling, it can be defined as the activity of delivering resources at a particular time that has been pre-determined. Some examples of resources include manpower, materials, assets, water, or energy that can be utilized to produce advantage or benefit. Scheduling can be a simple problem sometimes, but once many constraints are imposed on it, the complexity of the problems could increase. There are many ways to do resource allocation or scheduling, but some of the solutions produced are not feasible (or less quality) [8], [9].
Resource scheduling can be even more challenging and complex when there are some changes in the environment. Examples of famous and widely researched resource scheduling problems include staff scheduling, examination scheduling, transportation scheduling, financial allocation and nurse rostering [10], [11]. Recently, other resources scheduling problems have attracted researchers' attention which includes irrigation scheduling, urban farming resource allocation [2]. Most of the scheduling problems cannot be solved in a reasonable amount of time [12], [13]. Due to its complexity, the scheduling process needs to be automated. However, when there are unexpected or ad hoc changes in the environment (for example, change of weather, limited resources), the allocation of resources will be interrupted. To react to changes in the environment, the scheduling algorithm needs to be adaptive and dynamic.

RESEARCH METHOD
The urban farming method was synonym with automation since this kind of agriculture was indeed a result of modernization. Automation includes resource scheduling as a process to run recurring tasks efficiently with minimum cost. Most of the methods for resource scheduling in urban farming did not react effectively to changes in the environment [8], [14]- [19].
The computational process and the allocation of resources required to complete a specific task or production are called resource scheduling. Resource scheduling techniques, in general, will perform well when the amount of resources required for the processing is sufficient [20]. However, this is not always the case.
Moving forwards with technology, urban farming needs to align itself with current methods and approaches. A reactive algorithm has been used by [13], and it was proven that the algorithm needs to be proactive in order to meet dynamic criteria and solve uncertainty. Automation can be hard to micromanage. Therefore, there is a need for an algorithm that can handle ad hoc changes dynamically [12].
In heuristics, similar problem experiences are used to derive strategies to solve new problems, and the base of fundamental heuristics are trial and error approaches to solve the current problems. The majority of the heuristics approaches use a random number generator as the base for computation. Thus, the outcome is not guaranteed to be optimal or good. This is the main reason that the same heuristic approach that generates good solutions for a problem and is applied to other problems will not produce the desired outcome. This characteristic is undesirable as there is no way to ensure that the quality of the solution is acceptable.
The heuristic method was also broadly used when it came to scheduling problems. Research done using machine learning, ant colony algorithms, particle swarm optimization, and greedy algorithm were all doing well under certain circumstances. In a controlled environment, the heuristic can obtain the nearly same result. However, results show that the machine learning process took a long time to process and was unable to fully optimize resource consumption [20], [21].
Since most of the methods are not so consistent and cannot guarantee feasible solutions, motivated by domain transformation approach (DTA) [11], [20], [22]- [24], which managed to produce encouraging results in many resources scheduling areas as mentioned in the literature, therefore, DTA will be employed in this study to solve the resource scheduling problem as the DTA method would simplify the data and then obtain new knowledge. Baskaran [10] was using DTA to simplify a complex problem, which can be applied in this project in the pre-processing stage. By referring to this model, the research is able to produce a dynamic DTA model.
While heuristic and DTA are both reactive [20], [25], a more capable algorithm has to be proactive in determining the solution. This means the algorithm is capable of predicting a situation where it does not happen yet. A proactive algorithm is able to adapt to ad hoc changes even with limited resources. Therefore, prediction and comparison of data need to be made for readiness.
Considering a few past studies that proved DTA was capable and produced more feasible results [11], [20], [22], it is wise to further enhance the resource scheduling model to one level ahead. Through DTA, the original problem domain will be transformed into a much simpler domain that is easy to solve. DTA is an approach that will break down the problem into several stages so that it will make the problem looks simpler to be solved systematically. Consequently, the adaptive or dynamic elements will be added to the current DTA.
The proposed flowchart of the process to adapt to ad-hoc changes in the dynamic domain transformation approach (DDTA) is illustrated in the following Figure 1. In the proposed DDTA, the dynamic element was introduced to the model which is to read the moisture level and determine water priority and requirement for a plant to survive. Changes on the parameter, in this case, an average of moisture level and moisture level, will always be recalculated. The aggregated data constructs will be updated accordingly to ensure that new schedules are generated using priority-based criteria for optimal resource allocation, in this case, water distribution. Step 1: pre-process the IoT data retrieved from urban farming to produce aggregated data construct by setting: i) minimum of water requirement, ii) average of soil moisture, and iii) priority ordering of plants according to water requirement. Table 1 shows a sample of collected data representing raw data and aggregated data representing the information needed to calculate and process the water irrigation.

−
Step 2: Schedule by priority ordering allocation of water based on minimum water requirement and soils moisture. The moisture and water left in the reservoir are needed to put weight and rules for this project. Thus, based on past studies and agriculture facts [14], [26], [27], these were the knowledge obtained to calculate whether the plants will be able to survive and produce food or vice versa. New information for the domain transformation approach (DTA) was based on this table to filter data and calculate cost function. According to [26], as portrayed in Table 2, appropriate soil moisture must be between 80-100% depending on the type of soil used. Preferably, close to 100% of soil moisture was claimed as the best-case scenario. For this experiment and generally, an optimal water level can be considered based on the number of plants and crop size, but generally, 500 liters are considered a fair amount [27]. This knowledge is then used to calculate through comparison by using the knowledge as a reference, and this research study is expected to develop new information and be able to measure and manipulate the algorithm accordingly.

−
Step 3: Calculate the cost using a cost function. Using an appropriate range as suggested in Table 3, the cost for each dataset was calculated where x represents the number of penalties compounded on the calculation and ( ) represents the total water constraint (summation of penalty) from all of the data received. The penalty method was also used to minimize constraints. This means value would be added whenever constraint is violated.
The dynamic domain transformation model portrayed the process of handling ad-hoc changes. All this information can be exploited to a cost function assuming only soil moisture. With cost function, the algorithm would be able to dynamically produce an optimal result. Referring to [26], soil moisture would be considered optimal around 80-100%. Using this knowledge, this project would be able to establish the cost function and penalty method. Figure 2 shows three different datasets that were pre-processed using DTA. This method was able to pre-process data and establish water priority based on soil moisture level. A higher priority plant would be given an optimum amount of water.

RESULTS AND DISCUSSION
Based on average moisture, the program is able to identify penalties accordingly to give fair water irrigation. As stated in Table 3, the cost function would be higher if average moisture were low. Therefore, it shows that optimal conditions would handle better water irrigation and decrease wastage because minimal water would be needed in a better moisture level, and optimal water would have to be used to maintain plants' health. Both situations are inevitable, but the research is able to point out the condition or situation of a place or crops dynamically.
This proposed model was tested on three different datasets, as shown in Figure 2 (obtained via the IoT device in the urban farming) from three different urban farming kits. The irrigation schedules generated on all three datasets are considered good, in which water was distributed intelligently to all plants according to priority. Plants with less soil moisture were scheduled first to be irrigated, and plants with low priority (with more soil moisture) were scheduled later to receive the water. The costs obtained were tabulated in the following Table 4.
The three datasets were then calculated and the results were compared with the results produced by the method without using the DDTA. The same cost function was used again to measure the quality of the schedule as illustrated in Table 5. It was observed that the costs obtained on all datasets without utilizing the DDTA are higher in all instances. This indicates that more penalties are reduced using the proposed DDTA.  Under limited water resources, it is important to ensure that the water is utilized efficiently and distributed intelligently according to priority to avoid water wastages and starving situations in any plants. Based on the above results, the lower the cost function would be better as the plants would have better soil moisture levels, thus, able to live healthily. Thus, it can be concluded that DDTA is a more effective way of scheduling resources with the possibility of ad-hoc changes.

CONCLUSION
The dynamic domain transformation approach proves that a complicated scheduling and irrigation issue could be solved effectively because the problems were translated into something simpler and clearer to understand. It is believed that the outcome of this research was able to enhance water scheduling/irrigation for better and optimal results. The DDTA is robust enough to address new requirements, in our situation, the ability to adapt to ad-hoc changes that are introduced to the system. relative humidity and plant growth," TNAU Agritech Portal. https://agritech.tnau.ac.in/agriculture/agri_agrometeorology_relativehumidity.html (accessed Sep. 17, 2020). . He started his career as a Research Assistant with the school of computer science, USM. He was later promoted to Research Officer after securing a grant from the Ministry of Technology, Science and Innovation. During the three years of service as a government servant, he was involved in various projects, grants and consultation giving him broad experience in the Information Technology domain. The responsibility gives him added advantage on technical papers, proposals and report writing. In 2007 after 3 years of service with the company, he was invited to sit on the Board of Virtual Softnet Solutions Sdn Bhd until 2011. He was involved in various projects, including government agencies projects related to system development, reverse engineering, big data analytics, and project revival. Currently, he works at Aim Solutions Sdn Bhd as the Group Chief Operation Officer. He can be contacted at amirhamzahjaafar@gmail.com.

Raseeda Hamzah
been a lecturer at Universiti Teknologi MARA since 12 August 2016. She is currently a Senior Lecturer at the Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA, Shah Alam Selangor. She secured her Ph.D. in Information Technology and Quantitative Sciences (Ph.D.) at Universiti Teknologi Mara, Shah Alam, Selangor. Her area of expertise is Digital Signal Processing, specifically in Speech Analysis and Image processing. She is also actively doing research in Urban Farming and IoT. Her email is raseeda@uitm.edu.my.