Research on Grain Purchasing Location Based on Immunity Algorithm

It is very important to the farmers and government that how to choose correctly grain purchasing location, resulting from villages and towns mergence. First, this thesis considers grain purchasing location which will result in the effects of mutual costs. Then it offers Mathematical Models on location problem based on the way of Computer Immune Algorithm and uses Matlab to write the corresponding program. Finally, through the examples of simulation, it is proved that this Algorithm has many advantages, such as fast convergence, optimization success rate and so on.


Introduction
Villages and towns mergence is an important content of government institutional reform. On the one hand, it is an effective measure of reducing redundant employees, improving efficiency and enlightening peasant's burden; on the other hand, to a certain extent it brings to negative effects to peasant life. For example, every town has its own grain purchasing station before mergence, but after mergence, because of simplifying structure, it is no double that the former grain purchasing locations will be decreased. So how to provide a rational distribution which can obtain the minimum cost on grain purchasing is the research content of this thesis.
The research on grain purchasing is limited. Based on exhaustive algorithm and graph theory, LIN Miao-Hua (2000) puts forward a selection plan of the best grain purchasing location by adopting matrix algorithm Dijkstra. Exhaustive algorithm, which is too cumbersome and is applied only to the relatively simple area, is often considered impossible once constraint condition increases, but the graph theory approach has strong applicability. [1] DAI Xi-Wu(2011) proposes a mathematical model of the best grain purchasing location based on the Dijkstra matrix algorithm. [2] it is considered that the optimization of grain purchasing location can constrain multi objective optimization(NP-hard).Immune algorithm has the advantages of better global search ability and fast convergence, so it is applied rapidly to various industries in recent years. [3,4 ] Therefore, this thesis constructs a plan of the grain purchasing location based on immune algorithm.

The model of Grain Purchasing Location
The object of building a model is to choose a new grain purchasing location from the towns, which can guarantee to obtain the minimum cost in the process of purchasing. The cost contains mainly two parts: one is the desired cost in the process of food transportation and another is the operation cost of grain purchasing station. The cost in the process of food transportation is related to the transport distance, expenses, and the total public grain which is handed in by every village and the quantity of grain purchasing locations. Therefore, the objective function can be expressed: (1)N=｛1, 2, …, n｝represents sequence number set; Mij is the assembling place whose distance is less than d between the village and the grain purchasing location; kij represents the distance between villages (i) to gain purchasing (j); Hj represents the operation cost of gain purchasing location (j); Sj represents variable from 0 to 1. This thesis explores the adjustment of the current gain purchasing location with the advent of villages and towns mergence, which will discuss mainly the operation cost of gain purchasing location, not considering newly constructed grain storage which will lead to the problem of fixed assets investment. Therefore, the object of modeling is to minimize F (i, j).

Design of Immune Optimization Algorithm
Population Initialization. In this thesis it adopts a simple coding method, in which every location project can form antibody (i), that is Ai=(b1, b2, …bi). In this coding method, i can be expressed the amount of current grain purchasing location, according to which it can reduce the result. With the occurrence of the first iteration, if memory base is blank, the antibody will appear at this time, so stochastic production individual need judge feasible solution. Otherwise, it may obtain Memory cells from memory cell base, produce new antibodies and constitute antibody group. Appetency Computation. Antibody appetency is a key index to measure an algorithm. The appetency between antibody and antigen can discriminate their relationship while the appetency of inter-antibody can measure its similarity degree. In appetency computation, it adopts to compare antibody e with antibody f, then the sum of every same number location divides the length of antibody H, it will get appetency of two antibodies, i.e.: H represents the length of antibody and L(e, f) is the sum of same location between antibody e and antibody f. Antibody Density. Antibody density is a proportion of similar antibody. Therefore, the code difference, which represents the distance of inter-antibody, will finally occur by adopting different selected way to all gain purchasing locations. So antibody density between e and f can be expressed: But constraint condition is N represents the amount of antibodies and θ is the appetency threshold which is set previously. In the process of calculating density, more similar antibody will be seen as the same one. Algorithm Design. Individual reproductive rate is decided by appetency and density. In the course of calculation, if antibody density is over the previous set threshold, it certainly produces a memory cell which records local optimal solution. To prevent sticking in local optimal solution, memory cells sometimes need to be acted as suppressor cells. In other words, if the individual has excessive density, reproductive rate should be controlled to decrease its survivability. On the contrary, to those highly adapted individual, survivability should be improved to make sure of its diversity Immune Operation. Roulette wheel selection method is used to operate by the individual of a group, which can select those survival antibodies to proceed crossover operation according to single-point crossover method and carry on variation through adopting dialogue variation way. Algorithm Framework. The basic steps of algorithm are as followed: Step 1: To choose the correct expressions of some solutions and parameter settings, including group scale, variation rate, density threshold, crossover probability and so on.
Step 2: To initialize antibody group. Once memory base is blank, N individuals will produce and L individuals will be selected to form the initial population from memory bank.
Step 3: To evaluate each antibody, including the fitness of antigen and antibody and similarity of inter-antibody.
Step 4: To compose parent group. By calculating appetency and density between antigen and antibody, reproductive rate is obtained. The initial population is in descending order according to the reproduction rate, and forms a parent population from N individuals.

186
Information Technology for Manufacturing Systems III Step 5: To determine whether they meet end conditions, if it meets, it will end. Otherwise, continue to the next step.
Step 6: To produce new group. According to the result of step 3, new group will be produced by the operation of group election, crossover and variation, and then the new generation will be constituted from memory bank individual Step 7: To repeat step 3 to step 6.

Simulation Experiment
In simulation experiment, the original 14 villages are required to form villages and town's mergence, so the question is how to distribute grain purchase locations is more reasonable. If grain output, which is required to transported by every village per annum, is (300,1000,400,900,700,600,900,700, 1000,1500,300,200,800, 700) tons, other major parameters are as shown in In order to meet the minimum cost during the process of grain transportation in objective function F (i, j), solution is produced by adopting immune algorithm. When this region is required to retain two grain purchasing locations, it will calculate that the location is (4,2). The results are shown in figure 1. Algorithm convergence curve is shown in figure 3. Through the curve, it can be seen that application of immune algorithm can calculate the global optimal in solving NP-hard problem. But in practical application, although each adding a grain purchasing location can reduce the transport cost, it will lead to increase management cost which is not considered in this thesis because of its marginal utility, that is to say, the more locations, the higher management costs. According to the mentioned examples, when this region is required to retain five grain purchasing locations(7, 9, 10, 13, 14), the objective function F (I, J) achieves the minimum (174527 Yuan), which is the best solution of this model.

Conclusion
Taking the lowest overall cost as the objective function, this thesis puts forward the model on grain purchasing location according to the actual situation and obtains the solution methods based on immune algorithm, which is proved as an effective and feasible way through theoretical analysis and the solution statements. But the shortage existing in this thesis is taking cost as the main constraint condition without considering other constraint condition, such as Alpha. The quality of the road which leads to the transportation loss, food storage fees, the local environment, industrial layout, new grain purchasing location required for the cost of fixed investment. Therefore, this model should be improved its fitness in the following research, which can be better combined with practical application.

188
Information Technology for Manufacturing Systems III