A great challenge facing geocomputation and spatial analysis is spatial optimization, given that it involves various high-dimensional, nonlinear, and complicated relationships. Many efforts have been made with regard to this specific issue, and the strong ability of artificial immune system algorithms has been proven in previous studies. However, user-friendly professional software is still unavailable, which is a great impediment to the popularity of artificial immune systems. This paper describes a free, universal tool, named AITSO, which is capable of solving various optimization problems. It provides a series of standard application programming interfaces (APIs) which can (1) assist researchers in the development of their own problem-specific application plugins to solve practical problems and (2) allow the implementation of some advanced immune operators into the platform to improve the performance of an algorithm. As an integrated, flexible, and convenient tool, AITSO contributes to knowledge sharing and practical problem solving. It is therefore believed that it will advance the development and popularity of spatial optimization in geocomputation and spatial analysis.
The process during which spatial entities achieve the optimal status under certain constraints is referred to as spatial optimization [
Up to now, a number of AI methods have been proposed, such as genetic algorithms (GA) [
AIS can be defined as intelligent and adaptive computational systems inspired by theoretical immunology principles and mechanisms in order to solve real-world problems [
During the past decade, researchers have developed many spatial decision support systems for use in solving spatial optimization problems [
Comparison of the popular AI tools for solving spatial optimization problems.
Tools | Programming language | Algorithms | Have GIS functions | Have application programming interfaces | Have graphical user interfaces |
---|---|---|---|---|---|
GeoSOS | C# | Ant colony optimization | Yes | No | Yes |
OAT | Java | Clonal selection algorithms, B-cell algorithm, and so forth | No | Yes | Yes |
EO | C++ | Evolution algorithms, particle swarm optimization, and so forth | No | Yes | No |
GAtool | MATLAB | Genetic algorithms | No | Yes | Yes |
Among these platforms or libraries, GeoSOS (Geographical Simulation and Optimization System, website:
Another universal tool for solving optimization problems is OAT (the Optimization Algorithm Toolkit, website:
EO (Evolutionary Objects, website:
The GAtool is one of the tools in MATLAB’s global optimization toolbox. It has provided researchers with the ability to apply genetic algorithm techniques to optimization problems in the MATLAB environment. The GAtool contains many predefined genetic operators, and users can also define their own operators by writing some MATLAB scripts. As this framework is a tool of MATLAB, it means that GAtool requires MATLAB to be installed, and users have to get a license to run the solver. Furthermore, the MATLAB software does not support the handling and displaying of spatial data, and the integration of GIS functions into MATLAB is usually challenging.
From the above review of the well-known intelligence optimization tools, we can conclude that most of the available tools or libraries for solving optimization problems still cannot directly meet the demands of spatial optimization. A new integrated, universal, and extensible tool is needed to advance the research into spatial optimization and to improve the ability of decision support for practical applications.
To develop a general purpose tool, it is essential to analyze the fundamental requirements of spatial optimization modelling. Like general optimization problems, spatial optimization problems can also be described as follows:
However, compared with nonspatial optimization problems, spatial optimization problems are more complicated and more particular. The representation of spatial optimization problems is more complicated and more particular than nonspatial problems. When using immune algorithms to solve an optimization problem, the first step of the process is to encode the solution of the problem into “artificial antibodies” by using an encoding strategy (binary, real number, etc.). Then, an antibody corresponds to a solution to the problem, and each spatial entity or variable of the solution is represented as a “gene” in the antibody. However, the data structures, which are used to represent the location and status of the entities or variables, are usually more complicated than in nonspatial problems. Therefore, researchers usually have to redesign the encoding strategy and data structures for each specific problem. The objective functions of optimization problems are distinct from each other, and most spatial optimization problems are multiobjective problems. When solving a spatial problem in geospatial modelling, the design of the objective functions usually has to incorporate the ecological context and social and economic criteria under some predetermined scenarios. The constraints of spatial optimization problems might include some complex spatial constraints such as topological constraints. Furthermore, the mutation operation of antibodies is not usually completely random but is conducted with some specific domain knowledge. For example, when solving land-use spatial allocation problems, the “mutation” operation means to change the land-use type of some parcels. Therefore, this operation should be implemented based on the physical and socioeconomic properties of the land. Furthermore, the properties of the neighboring parcels should also be considered. Solving spatial optimization problems requires customization of the simple immune algorithms. Usually, researchers have to customize the basic immune algorithms to improve the performance of the algorithms, especially in solving complex spatial problems. In most cases, the immune algorithms can be improved from the following two aspects: (i) hybridization with other global optimization search algorithms such as GA or ACO to avoid the algorithm falling into a local optimum and (ii) incorporation of a local search mechanism to accelerate the convergence of the immune algorithm. The inputs/outputs of different spatial optimization problems are distinct in content, structure, and format.
In summary, to determine the appropriate encoding strategy, objective functions, constraints, and inputs/outputs of the artificial immune model for spatial optimization is the most important problem to the users. The steps or operators mentioned above are problem-specific and should be integrated into AITSO as standard application interfaces. Furthermore, the process of the algorithm framework should be extensible to meet the customization demands of the algorithm.
As a universal tool, we assume that the users who might use this tool can be divided into the following classes based on their background knowledge and skills.
A unified spatial optimization model is a prerequisite for the establishment of a universal tool. Such a model must meet two basic requirements. For one thing, the model must be extensible as, in practice, algorithms are usually revised and improved to solve specific problems. The model should therefore be able to integrate different algorithms and to customize the process and operators. For another, the algorithms or operators that are integrated into the framework must be reusable. When a new algorithm or operator is developed, it should be able to be used in other cases.
We referred to the principle proposed by Keijzer et al. [ As shown in Figure All the immune operators mentioned above can be divided into two categories, according to whether or not the operator has to operate the genes of an antibody. Since the data structure of genes is usually problem-specific, the operators which need to change the genes have to know the data structure of the genes. The selection operator, reselection operator, replacement operator, and the stopping criteria are only concerned with the affinity of the antibodies and are totally independent of the specific problems. Therefore, these operators can be considered as common immune operators and can be used to solve different problems. Other operators, such as initialization operators, evaluation operators, clonal operators, mutation operators, and decoding operators, are problem-specific and have to be redesigned for particular problems.
The common artificial immune model for spatial optimization.
A critical shortcoming of this design is that users still have to redesign the problem-specific operators when the data structures of the genes are changed. For instance, the mutation operators, which have to change the values or status of the genes, are dependent on the exact data structures of the genes. However, the functions used to operate the genes are dependent on some particular data structures. Nevertheless, the immune principle used to calculate the mutation rate might be the same: the higher the affinity, the smaller the mutation rate [
As shown in Figure
The hierarchical model of the unified optimization algorithm framework.
The functions that do not have to operate the genes can be applied to different problems directly, and the reuse of the problem-specific functions is implemented by the use of object-oriented technology. As stated above, the functions that are used to operate the genes can be encapsulated into an abstract class or interface to provide the immune operators or functions with standard function interfaces to access the genes.
One of the most important purposes of AITSO is to bridge the gaps between immune algorithm researchers, spatial optimization problem researchers, and decision makers. To achieve this goal and to meet the different demands from these users, AITSO has adopted a very flexible architecture based on a “plugin host” structure to build the platform. As shown in Figure
The components of AITSO and their relationships.
The foundation class library comprises the definition of the fundamental abstract classes, interfaces, enumerations, and some ancillary classes. These abstract classes and interfaces define the primary properties and behavior of the immune operators, antibodies, and optimization problems. Once a class implements all the properties and functions of the “ICSOperator” interface, the host program will identify it as a validated operator class. Similarly, the “ICSOptimizationProblem” interface is designed for developing application plugins that are used for solving specific spatial optimization problems. The abstract class “CSAntibody” is used for extending the data structures of the antibodies, and the parameters’ information is stored by using the “CSParameters” class.
All the immune operators are stored in a folder named “Operators” in the form of dynamic link library (DLL) files. Algorithm researchers or anybody who wants to improve the performance of the algorithms can use the “ICSOperator” interface to develop a novel operator plugin. When the host program runs, the host program will search the DLL files contained in this folder and extract all the classes inherited from the “ICSOperator.” After that, an instance of the operator class will be activated by the reflection technology provided by the .NET Framework. Finally, the information about the operator class, such as the name, description, functions, and the parameters, can also be extracted and displayed to users through the GUI.
Similar to the “immune operator library,” the “application library” is a folder named “Problems,” which stores many application plugins. An application plugin is a DLL file which has encapsulated one or more spatial optimization problem classes inherited from “ICSOptimizationProblem.” Once an application class is activated, the host program can obtain the description and parameters from the instance of the class and show them to the final users.
The major functionality of the host program is to link the decision makers and underlying libraries, which include the application library and immune operator library. Therefore, the host program plays two crucial roles in the whole platform. One is that it provides the user with a friendly GUI. The application plugins and operator plugins are identified based on the standard interfaces, and then the basic information (name, description, parameters, etc.) of the plugins is extracted and displayed to the user via the host’s GUI. Thus, decision makers can accomplish their work interactively, for example, choosing the corresponding application plugin, customizing the immune algorithm, setting the parameters, and configuring the inputs/outputs of the problem. The other role of the host program is that it builds the process of the model and carries out the optimization tasks. Once the user has completely defined their problem and optimization model, the host program will activate the instance of the application and operator classes specified by the user. After that, the model will be constructed dynamically, according to the user’s configuration, to accomplish the computation task.
The key technology for customizing the spatial optimization model is the design of the “CSStepInfo” class (see Figure
The class schema diagram of “CSStepInfo” and “CSParameter.”
Furthermore, the “CSParameter” class was designed to describe and manage the parameters of the model (see Figure
As stated in Section
Structure of the optimization problem class.
The schema diagram of the primary classes used for developing application plugins.
The antibody is the fundamental operating unit in immune algorithms, and it represents a solution to the optimization problem. The abstract class “CSAntibody” defines the basic properties and behaviors of the general antibodies. Once a new encoding strategy is proposed, developers can create a problem-specific antibody class, inherited from “CSAntibody,” and design the data structure for the genes. In addition, the basic gene manipulation functions, “AddGene,” “ClearGenes,” “GetGene,” “SetGene,” and “Clone,” should also be implemented. Among these functions, the functionality of “Clone” is to get an identical antibody to its parent, and it can be employed by the clonal operators.
The “ICSOptimizationProblem” interface is composed of two types of interfaces that are termed “user interfaces” and “function interfaces.” The “user interfaces” in the “ICSOptimizationProblem” are a group of .NET Framework “user controls.” The interfaces are designed for the end-user, since they can provide the user with friendly wizards to configure the parameters, constraints, inputs, and outputs. Once an application class is activated, the “user interfaces” implemented in the “ICSOptimizationProblem” class will be instantiated and integrated into the host program GUI framework so as to gather parameters settings and so forth.
The “function interfaces” include six standard function prototypes declared in “ICSOptimizationProblem.” They are used to integrate the problem-specific gene-based operations and provide the immune operators with interfaces for assessing the genes of an antibody. Among the six function interfaces, the “CreateAb” function is used to create a problem-specific antibody object, and it can be invoked by the initialization operators; the “MutateAb” function is used to change the values or status of the genes according to the user-specified mutation rate under the constraints or domain knowledge; and the objective functions used to calculate the objective values and the affinity of the antibodies are packaged into “EvaluateAb.” Some complex methods such as the paretodominance approach for dealing with multiobjective problems and the penalty functions for handling the constraints can also be integrated into “EvaluateAb,” as needed. Furthermore, as the crossover operator has been widely used in evolutionary algorithms, the “CrossOverAb” function is defined to integrate the crossover mechanism to improve the performance of the immune algorithm. Once an optimization task is finished, the decoding operators can call the “WriteOptimalResult” function to save the optimal solution into the result file. The host program will also load the results to a mapping window to visualize the optimal solution and draw a convergence curve to analyze the performance of the algorithm.
Developers can also package some other operators (local search algorithms, etc.) into the algorithm by implementing the “CustomOperator” function. For example, when solving the traveling salesman problem (TSP), a 2-opt or k-opt local search can be employed to improve the performance of the algorithm [
In order to get a general understanding of how the immune operator plugins work, the overall architecture of a typical operator class and its relationship to the other components in AITSO are illustrated in Figure
Structure of the operator class.
The “function repository” usually comprises one or several functions implementing various immune strategies. It allows developers to package a group function into one operator class. For example, as stated in Section
{
}
Once an operator class is activated to carry out the evolution tasks, the population of antibodies and the parameters will be sent to the instance of the operator from the host program. Then, the host program will call the “execute” method of the class to accomplish the specific task. There are two parameters of the “execute” module: the population is passed by using the “CSPopulation” parameter, and the function used to execute the calculation task is specified by the “function name” parameter. If the functions have to operate the genes of the antibody, the standard gene operation interfaces provided by “ICSOptimizationProblem” are employed.
AITSO was developed based on the open-source DotSpatial GIS components (
Main GUI of AITSO.
Steps for customizing the spatial optimization model.
As shown in Figure
Figure
To test the reusability and the extensibility of the platform, we adopted the traveling salesman problem (TSP) as a benchmark testing application. TSP is a typical NP-hard combinatorial optimization problem [
To solve this problem in AITSO, we developed an application plugin which integrates two key classes: “CSTSPAntibody” and “CSTSPProblem.” The “CSTSPAntibody” class inherited from the abstract “CSAntibody” class represents the solutions of the problem. The affinity evaluation function, inputs, and outputs are implemented in the “CSTSPProblem” class inherited from the “ICSOptimizationProblem” interface. Furthermore, to test the customization features of AITSO and to improve the performance of the algorithm, the crossover mechanism, which is a key operation in a genetic algorithm, was introduced to the artificial immune algorithm.
The TSP dataset used for testing is the Eil51 dataset chosen from the standard TSP library TSPLib95, which has been used as a benchmark testing dataset (download url:
Results of the testing traveling salesman problem.
An environmental monitoring network optimization problem was employed to demonstrate how to solve environmental modeling and spatial optimization problems in AITSO. The experimental data source code used in this case study can be downloaded from the website
Environmental monitoring networks, composed of several monitoring stations, are used to capture environmental pollution data or quality information of the air, water, and soil of a specific area. The objective in the optimization of an environmental monitoring network is to arrive at the optimal number and spatial layout of the monitoring stations. This is critical to environmental monitoring and assessment since it can help to achieve an optimal configuration of the monitoring stations while obtaining the pollution information accurately under a minimum number of monitoring stations and at least cost [
The optimization problem designed for this case was the optimization of the air quality monitoring network of Wuhan, which is located in central China (coordinates: 30°35′N 114°17′E), with a population of over 10 million people (2011 census). As shown in Figure
Results of the testing environmental monitoring network optimization problem.
Usually, optimization of the number and spatial layout of the monitoring stations has to deal with some complex influential factors, such as the contamination levels of pollutants, cost and budget, population density, terrain conditions, and spatial coverage. However, the main purpose of this case study was to illustrate the basic principles and methods for developing an optimization application in the AITSO environment and to provide researchers with a simple programming template. Therefore, in this case study, we only considered the spatial coverage of the stations, and the “minimization of the mean of the shortest distances” (MMSD) criterion was adopted as the optimal objective of the problem. MMSD aims to minimize the average of the distances of all grid points to their nearest station [
This case describes the general principles and methods of using an immune algorithm to solve an environmental monitoring network optimization problem in AITSO. In this case, only the “MMSD” criterion was considered, and some other important factors were not integrated into the objective functions. However, this case could be extended to optimize different types of environmental monitoring networks (soil, water, disease, etc.) by integrating some important environmental factors, such as the concentration of PM2.5 in the air or the concentration of heavy metals in soil.
Spatial optimization is a type of complicated and widespread problem that is common in spatial planning and geocomputation. The artificial intelligence approaches have provided effective solutions for solving these problems. Therefore, the main contributions of this paper include the following. (i) The characteristics of spatial optimization problems were analyzed and summarized and then a general paradigm for geospatial optimization modelling under the context of geocomputation was proposed in this study. (ii) A unified framework of spatial optimization model was developed to model the geospatial problems in this paper. (iii) The freely accessible tool AITSO, which integrates the artificial immune system algorithms, has been developed as a flexible and extensible tool for researchers and decision makers.
Since the initial testing of the tools demonstrates the potential of AITSO as a flexible tool for the modeling of practical spatial optimization problems such as spatial route optimization and planning and environmental monitoring network optimization, it is therefore believed that AITSO will advance the development and popularity of spatial optimization in spatial optimization modeling and decision making. Benefiting from the loose “plugin host” architecture, developers can easily implement their own problem-specific application plugins or new immune operators based on foundation APIs provided by AITSO to solve practical problems or improve the performance of an algorithm. With these standard interfaces, researchers can easily integrate their own models and knowledge into the tool to solve some special spatial problems. Furthermore, the technologies described in this paper could also help developers to build universal optimization tools based on some other algorithms, such as genetic algorithms, evolution strategies, and particle swarm optimization.
As a universal tool for spatial optimization, the present software still has the following deficiencies, which will be improved in the future: (i) only the clonal selection immune model has been integrated into the tool; some other AIS models such as aiNET have not yet been implemented. Hence, these algorithms will also need to be implemented in the future. (ii) The method used for solving multiobjective problems is now based on a weight-based approach. Since a lot of spatial optimization problems are multiobjective problems, it will be crucial to integrate some more useful multiobjective methods into AITSO, such as the paretodominant strategy. (iii) The process of using artificial intelligence algorithms to solve spatial problems is usually data-intensive or computationally intensive [
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work is supported by the National Nature Science Foundation of China (no. 41401446); National Science Foundation for Postdoctoral Scientists of China (no. 2014M550412), Open Research Fund Program of Key Laboratory of Digital Mapping and Land Information Application Engineering, National Administration of Surveying, Mapping and Geoinformation (no. GCWD201405), and Fundamental Research Funds for the Central Universities (no. 2042014kf0078).