Abstract Using Genetic Algorithm for High-Level Synthesis

合集下载

智能水管理系统(IoT 基础设施) 植物水管理系统的智能化说明书

智能水管理系统(IoT 基础设施)  植物水管理系统的智能化说明书

Internet of Things Based Intelligent WaterManagement System for PlantsIsbat Uzzin Nadhori1,* M. Udin Harun Al Rasyid1 Ahmad Syauqi Ahsan1 BintangRefani Mauludi11 Informatics and Computer Engineering Department, Politeknik Elektronika Negeri Surabaya, Indonesia*ABSTRACTWater has an important role for crops. Every crop needs water to survive. The amount of water that crops need, in different regions and seasons, is different. To calculate the amount of water needed by the crop precisely require careful analysis of the available supporting data. In practice, the fulfilment of water needs in crops is only based on soil moisture without being adjusted to weather data. Thus, water is often wasted, for example when watering during high rainfall. Therefore, we need a system that can determine the volume of water requirements in crops based on its conditions, watering schedules, and weather data. This research aims to build a monitoring system for crops that can determine the right watering volume by considering soil moisture, air temperature and humidity, watering schedules, and weather data by utilizing the fuzzy method. Based on the results of our experiments, the system has managed to monitor crops and display watering volume notifications when its conditions are not normal and when to do watering based on the weather. Keywords: smart water management, water monitoring, IoT, sensor, Fuzzy1. INTRODUCTIONWater has a major role in the plant body. The role of water in the plant body includes: as a constituent of protoplasm, as a solvent for nutrients, as a substance that plays a direct role in metabolism, and also plays a role in cell enlargement and elongation. [1].All crops need water to survive. The amount of water needed by different crops is not the same for different regions and seasons. To calculate and estimate how much water is needed by crops, careful and thorough analysis is needed of available supporting data such as climate data, irrigated area environment, crop types and cropping patterns, soil types, rainfall data, and other meteorological data [2].Meanwhile, farmers still use manual methods in watering their crops, without considering some of the factors above. By using this manual method, water is often wasted or vice versa, water for crops is less. This is not good for crop growth, so it is necessary to develop a system that can calculate and provide the right amount of water for crops. To solve the problem of providing water for crops appropriately, several researchers have worked in this field with various parameters, various approaches, various hardware, various platforms, and also utilizing analytical methods in it.Vijay et. Al. [3] proposed intelligent agricultural monitoring and irrigation systems with ThingSpeak and NodeMCU based IoT platforms. This system monitors temperature and humidity to optimize water use. The data from the sensors is sent to the IoT platform, analyzed with Matlab to take appropriate action, and if the value is below the threshold, a notification will be sent to the user via email.Chen Yuanyuan et. Al. [4] proposed intelligent water-saving irrigation based on ZigBee-wifi. The system monitors soil conditions based on soil moisture sensors using several sensors placed in certain planting areas. The results of soil moisture monitoring are used as a reference in making decisions about when to start and when to stop irrigation.Maria Gemel et. Al. [5] proposed a water management system that utilizes temperature sensors, humidity sensors, and soil moisture sensors to collectdata on crop and soil conditions. This data is then used to Proceedings of the 2nd International Conference on Smart and Innovative Agriculture (ICoSIA 2021)determine the exact water requirements for tomatoes and eggcrops. Overall this results in a total savings of 44% in water consumption, and the crops are visually healthier than traditional watering methods.R. Kondaveti et. al [6] proposed an automatic irrigation system with precise rainfall prediction algorithms that can help us determine what crops are suitable for planting in a particular area. Automatic irrigation is used to water crops when needed by activating an electric motor, this can save water and electricity so it is very beneficial for farmers.Jiaxing Xie et al [7] conducted a study to predict the water requirement for longan garden irrigation based onthree environmental factors: air temperature, soil moisture content, and light intensity. The data is then processed using the backpropagation neural network method using a genetic algorithm to optimize the weight and threshold of the artificial neural network. This model is used to predict irrigation water requirements based on environmental factors in longan plantations.S. Kumar [8] proposed a lawn watering system using soil moisture sensors and weather forecast data. The soil moisture sensor is used to provide information on the water content in the soil, if the soil moisture is below a certain level the watering system will activate automatically. Weather forecast data is used to get rain information so that if there is a rain prediction, watering will be delayed by one to two days. Weather prediction data is obtained from the Indian government website .in which provides weather information for the next 6 days, as well as weather information for 24 hours.Based on those research, we propose real-time water demand monitoring system for crops by combining sensor data (soil moisture, temperature and humidity), watering scheduling data and weather data to determine the volume of watering crops using fuzzy method.2. PROPOSED SYSTEM DESIGNThe solution we propose aims to solve the problem of how to determine the right volume of watering crops based on its conditions, watering schedules and weather predictions with the required volume of water output. The proposed system consists of four important parts as shown in Figure 1 below. Figure 1 Proposed system designThe first part is a sensor system designed to monitor the state of soil moisture, air temperature, and air humidity in crops, which consists of a Capacitive Soil Moisture Sensor and a temperature and humidity sensor. (DHT11 sensor). The two sensors are connected to Arduino Uno to get soil moisture data, air temperature data, and air humidity data. The data is sent via the ESP8266-01 Wi-Fi module which is connected to the Arduino Uno to the second part (server) then processed using the fuzzy logic method to get the volume of water needed by the crops. The server requires weather data (part two) as well as the time and schedule for watering crops (part three) according to the type of crop to determine water requirements and watering times more accurately. The latest weather data is obtained through api weather (third part) which is used to get a forecast of whether it will rain today or not. The results of processing on the server are displayed in the form of visualization of watering needs in the fourth part.3. EXPERIMENTAL STUDYIn this system there are 3 fuzzy variables used in the fuzzification process, namely soil moisture, temperature and volume variables that will be used in decision making.Soil moisture sensor is useful for observing the value of moisture in the soil. Soil moisture data is expressed in units of %RH. Soil moisture sensor data is divided into three categories, namely dry, moist, and wet. To provide a clear picture of the fuzzy set of soil moisture sensors, it can be described in the membership function shown inFigure 2.Figure 2 Fuzzy set of temperature variable (℃) The temperature sensor is useful for observing the value of the air temperature around the monitored environment. The temperature sensor data is divided into five categories, namely cold, cold, normal, warm and hot. To provide a clear picture of the fuzzy set of temperature sensors, it can be described in the membership function shown in Figure 3.Figure 3. Fuzzy set of temperature variable (℃) This volume set is the result set that is used to determine the final result of this fuzzy process.Figure 4. Fuzzy set of volume variable (mL)After the fuzzification stage, fuzzy rules will be formed. The formation of fuzzy rules is done to express the relationship between input and output. The operator used to connect two inputs is the AND operator, while the operator that maps between input and output is IF-THEN.This volume set is the result set that is used to determine the final result of this fuzzy process. The number of rules formed is obtained from the multiplication between each membership of the fuzzy variable. In this study, 15 rules were formed from the use of 2 parameters. Examples of rules that have been formed can be seen in Table 1.Table 1. Fuzzy Logic RulesAfter getting the rules used in the inference process, the next thing to do is to aggregate or combine the output of all the rules. This stage is called the Composition stage which will produce the predicate of each rule.After going through the Composition stage which produces -predicate from each rule, the next step is the Deffuzification process. This defuzzification process is a crisp output calculation process by calculating the average of all z with the following formula:z=α1∗z1+α2∗z2+⋯+αn∗z nZ1+Z2+⋯+ Z n(1)The following is an illustration of the stages of preparation for the trial environment that will be carried out. System testing should be carried out on agricultural land that has "bedengan" (part of the ground that is raised for plants to grow). “Bedengan” generally have a width of 100 cm with a length that is adapted to soil conditions. The height of the "bedengan" is approximately 20 cm with a distance between the "bedengan" of 100 cm. See figure 4 for the illustration of “bedengan”.Figure 5 Overview of “bedengan” in generalPlanting crops in “bedengan” has its own rules. One “bedengan” consists of 2 rows, and each row has a distance of 60-70 cm. And the distance between the crop holes is 60 cm. Figure 8 is a description of the system testing on a “bedengan” with a size of 1 m2. This system should be tested on open agricultural land so that water and weather requirements can be tested in real time. However, due to time constraints, the trial was carried out on polybags with the same concept of “bedengan” and calculations. Tests on polybags can be seen in Figure 6,7 and Figure 8.Figure 6 “Bedengan ” in an area of 1 m 2Figure 7. Transition of trials from agricultural land to polybagsFigure 8. Trial prototypeSystem testing was carried out on polybags with a height of 20 cm and an area of 50 cm x 50 cm. This concept is the same as the concept of beds on agricultural land. Crops are placed in open land and not indoors or in the shade. This experiment was carried out for 4 days. Watering is done twice a day if the weather on that day is sunny and the soil moisture value is less than the normal limit. Watering is done once a day if the rainfall is low on that day and the soil moisture value is less than the normal limit. Watering is not carried out if on that day the weather predicts high rainfall. The data for each scenario will be stored in a database that is useful for analyzing the results of system trials.. Table 2 contains crop monitoring data carried out for 4 days for trials carried out on polybags. The parameters monitored were the value of soil moisture, air temperature, and air humidity taken before watering the crops. In table 2 it can be seen that the soil moisture valueis lower than the optimum soil moisture value for eggplant which should be in the range of 60% - 80%. The monitoring results also show that the temperature and humidity values are quite constant. Table 3 shows the performance results of the system that has been created. On the first and second days there was no rain, so watering in the morning and evening was still carried out. Notifications have also worked according to the watering schedule based on weather conditions and crop conditions.Table 4 contains data from the 2-day trial. In this table there is a date column that shows when the experiment was carried out, a watering time column, and a watering volume column. There is also a column of soil moisture, air temperature and humidity that contains the data values measured after watering.There are two application interfaces for this system, web-based and android-based. The interface of thisapplication can be used to monitor the condition of theTable 2. Monitoring Before WateringTable 3. Notifications based on existing conditions.Table 4. Monitoring after watering.crop and display the amount of water it needs. Web-based applications are used to determine crop conditions in detail, making it easier for farmers to take an action. There is a graph that displays the condition of the last 100 data. The android application is used to make it easier for farmers to monitor their crops at any time, and provide notifications if there is a need for watering for crops. The interfaces of these two applications can be seen in Figures 9 and 10.Figure 9. Web application interfaceFigure 10. Android application i nterface4. DISCUSSION AND CONCLUSIONOn the first day of the experiment, it was used to see the condition of the crops, where the crops were not in accordance with the ideal conditions, the crops gradually reached the ideal conditions after the fourth day. Experiments were carried out on eggplant crops. In general, eggplant crops have an optimum humidity value of 60% RH - 80% RH. So that on the fourth day of the experiment the volume calculation was appropriate because after giving the volume the value of soil moisture was between the values of 60% RH - 80% RH.Implementation of crop condition monitoring on the device can work in real-time. After conducting several trials on the actual crop environment, it can be concluded that this application has succeeded in monitoring crops and displaying watering volume notifications when crop conditions are not normal or when the time for watering crops based on the weather has arrived. ACKNOWLEDGMENTSThis research was supported in part by Ministry of Research and Technology of the Republic of Indonesia, under scheme Higher Education Excellence Applied Research Penelitian Dasar Unggulan Perguruan Tinggi', No. Grant B/112/E3/RA.00/2021. REFERENCES[1]Saccon, P., Water for agriculture, irrigationmanagement. Applied Soil Ecology, 123, 793–796., 2018[2]Sun, J., Kang, Y., Wan, S., Hu, W., Jiang, S., &Zhang, T., Soil salinity management with drip irrigation and its effects on soil hydraulic properties in north China coastal saline soils. Agricultural Water Management, 115, 10–19., 2012[3]Vijay, Anil Kumar Saini, Susmita Banerjee andHimanshu Nigam, An IoT Instrumented Smart Agricultural Monitoring and Irrigation System, International Conference on Artificial Intelligence and Signal Processing (AISP), Vellore Institute of Technology Andhara Pradesh and IEEE Guntur Subsection, India, 10-12th January 2020[4]Chen Yuanyuan, Zhang Zuozhuang, Research andDesign of Intelligent Water-saving Irrigation Control System Based on WSN, IEEE International Conference on Artificial Intelligence and Computer Applications (ICAICA), Dalian China, 27-29 June 2020[5]Maria Gemel B. Palconit, Edgar B. Macachor,Markneil P. Notarte,Wenel L. Molejon, Arwin Z.Visitacion2, Marife A. Rosales, Elmer P. Dadios1;IoT-Based Precision Irrigation System for Eggplant and Tomato; International Symposium on Computational Intelligence and Industrial Applications (ISCIIA2020) CITIC Jingling Hotel Beijing, Beijing, China, Oct.31-Nov.3, 2020[6]Revanth Kondaveti, Akash Reddy, Supreet Palabtla,Smart Irrigation System Using Machine Learning and IOT, International Conference on Vision Towards Emerging Trends in Communication and Networking (ViTECoN), Vellore, Tamilnadu, India, 30-31, March 2019[7]Jiaxing Xie, Guoslicng Hu,Chuting L, Peng Gao,Daozong Sun,Xiuyun Xue, Xin X, Jianmei Liu, Huazhong Lu, Weixing Wang; Irrigation Prediction Model with BP Neural Network Improved by Geneti Algorithm in Orchards; International Conference on Advanced Computational Intelligence,Guilin, China, June 7-9, 2019[8] C. Kamienski, J.-P. Soininen, M. Taumberger et al.,“Smart water management platform: iot-basedprecision irrigation for agricul ture,” Sensors, vol. 19, no. 2, p. 276, 2019.[9]Sudheer Kumar Nagothu, Weather based Smartwatering system using soil sensor and GSM, World Conference on Futuristic Trends in Research and Innovation for Social Welfare, Karpagam College of Engineering, Coimbatore Tamilnadu India, 29th February & 1st March 2016。

基于遗传算法的递归MTI自适应滤波器的设计

基于遗传算法的递归MTI自适应滤波器的设计

信息疼术2018卑第7期文章编号:1009 -2552(2018)07 -0090 -04 DOI:10. 13274/j. cn k i. h d z j. 2018. 07. 021基于遗传算法的递归M T I自适应滤波器的设计殷万君\金炜东2(1.四川信息职业技术学院,四川广元628040; 2.西南交通大学,成都610031)摘要:针对自适应滤波器在F P G A上实现结构灵活性的特点,文中提出了一种基于遗传算法的 递归M T I自适应滤波器的设计方法。

根据遗传算法的特点,结合滤波器的性能指标,阐述了设 计思想,通过遗传算法实现了自适应滤波器的权系数寻优,在系数寻优中采用了创新的适应度 函数和惩罚函数,通过场景仿真,验证了文中所提算法的实用性和有效性。

关键词:遗传算法;递归M T I;自适应滤波器;设计中图分类号:T N957.52 文献标识码:ADesign of recursive MTI adaptive filter based on genetic algorithmYIN Wan-jun1,JIN Wei-dong2(1. Sichuan Inform ation Technology College,Guangyuan 628040,Sichuan Province,China;2. Southwest Jiaotong University,Chengdu 610031,China)Abstract :In order to realize the fle x ib ility o f adaptive filte r in F P G A,a design m ethod o f recursive M T I adaptive filte r based on genetic a lgo rithm is proposed in th is p a p e r.A c co rd in g to the cha racteristics o f genetic a lg o rith m,com bined w ith the perform ance o f the f ilt e r,it expounds the design id e a s,through the genetic a lgo rithm to achieve the rig h t of the adaptive filte r co e fficie n t o p tim iz a tio n,op tim iza tio n of the coe fficien ts in the in no vation o f the fitness fu n c tio n and pe na lty fu n c tio n.Through s im u la tio n,it verifies the p ra c tic a lity and effectiveness o f the proposed a lg o rith m.Key words:genetic a lg o rith m;recursive M T I;adaptive f ilt e r;design0引言自适应滤波器使用广泛,可以由训练样本根据某种算法去调节加权系数,使实际输出与理想输出的均方差达到最小。

物流治理外文文献外文翻译英文文献逆向物流运作渠道的决策方式

物流治理外文文献外文翻译英文文献逆向物流运作渠道的决策方式

外文出处:Senthil, S., Srirangacharyulu, B., & Ramesh, A. (2021). A decision making methodology for the selection of reverse logistics operating channels. Procedia Engineering, 38, 4, 418–428.附件1:外文资料翻译译文逆向物流运作渠道的决策方式摘要:产品退货的有效治理是一项战略性的问题。

现在,客户希望厂商能够进展逆向物流系统,为了是返还的产品能够被回收。

随着逆向物流实践的不断进展和进步,逆向物流渠道的选择就显得愈来愈重要。

此刻有三种大体的逆向物流运作渠道:制造商自营,第三方运营和联合运营模式。

本文基于层次分析法(AHP)和技术模糊环境下逼近理想解排序法(TOPSIS)相结合的混合方式,提出了逆向物流运作渠道的选择和评判。

本文利用一个算例验证了该方式。

这种方式帮忙决策者更有效的选择能够知足客户要求的最正确渠道。

关键字:逆向物流多目标决策层次分析法1 引言由于有关环境的法律不断的出台,逆向物流慢慢引发了企业的关注。

逆向物流(RL)是一个计划、实施和操纵原材料能够高效、低本钱的流动的进程,也是为了达到取得更多的价值,关于在制品库存、产成品和相关的从消费者手中回到原生产商的信息进行适当的处置。

关于逆向物流的研究仍然处于探讨时期。

逆向物流使得企业降低本钱成为可能。

逆向物流概念了供给链被设计为有效的治理产品和零部件的流动,使得它们能够进行再制造、循环利用和流程的改良,以便加倍有效的利用这些资源。

逆向物流活动的执行包括各类功能部份:产品质量的把关,紧缩配置循环周期,产品的再制造与翻新,资产回收,谈判,外包和客户效劳。

除产品的存储和运输,增值效劳的价值如:JIT,快速反映和问题方案的解决也都是逆向物流的重要组成部份。

关于有缺点的产品进行再制造,维修和回收能够制造庞大利润的商业机遇。

遗传算法中英文对照外文翻译文献

遗传算法中英文对照外文翻译文献

遗传算法中英文对照外文翻译文献遗传算法中英文对照外文翻译文献(文档含英文原文和中文翻译)Improved Genetic Algorithm and Its Performance AnalysisAbstract: Although genetic algorithm has become very famous with its global searching, parallel computing, better robustness, and not needing differential information during evolution. However, it also has some demerits, such as slow convergence speed. In this paper, based on several general theorems, an improved genetic algorithm using variant chromosome length and probability of crossover and mutation is proposed, and its main idea is as follows : at the beginning of evolution, our solution with shorter length chromosome and higher probability of crossover and mutation; and at the vicinity of global optimum, with longer length chromosome and lower probability of crossover and mutation. Finally, testing with some critical functions shows that our solution can improve the convergence speed of genetic algorithm significantly , its comprehensive performance is better than that of the genetic algorithm which only reserves the best individual.Genetic algorithm is an adaptive searching technique based on a selection and reproduction mechanism found in the natural evolution process, and it was pioneered by Holland in the 1970s. It has become very famous with its global searching,________________________________ 遗传算法中英文对照外文翻译文献 ________________________________ parallel computing, better robustness, and not needing differential information during evolution. However, it also has some demerits, such as poor local searching, premature converging, as well as slow convergence speed. In recent years, these problems have been studied.In this paper, an improved genetic algorithm with variant chromosome length andvariant probability is proposed. Testing with some critical functions shows that it can improve the convergence speed significantly, and its comprehensive performance is better than that of the genetic algorithm which only reserves the best individual.In section 1, our new approach is proposed. Through optimization examples, insection 2, the efficiency of our algorithm is compared with the genetic algorithm which only reserves the best individual. And section 3 gives out the conclusions. Finally, some proofs of relative theorems are collected and presented in appendix.1 Description of the algorithm1.1 Some theoremsBefore proposing our approach, we give out some general theorems (see appendix)as follows: Let us assume there is just one variable (multivariable can be divided into many sections, one section for one variable) x £ [ a, b ] , x £ R, and chromosome length with binary encoding is 1.Theorem 1 Minimal resolution of chromosome isb 一 a2l — 1Theorem 3 Mathematical expectation Ec(x) of chromosome searching stepwith one-point crossover iswhere Pc is the probability of crossover.Theorem 4 Mathematical expectation Em ( x ) of chromosome searching step with bit mutation isE m ( x ) = ( b- a) P m 遗传算法中英文对照外文翻译文献Theorem 2 wi = 2l -1 2 i -1 Weight value of the ith bit of chromosome is(i = 1,2,・・・l )E *)= P c1.2 Mechanism of algorithmDuring evolutionary process, we presume that value domains of variable are fixed, and the probability of crossover is a constant, so from Theorem 1 and 3, we know that the longer chromosome length is, the smaller searching step of chromosome, and the higher resolution; and vice versa. Meanwhile, crossover probability is in direct proportion to searching step. From Theorem 4, changing the length of chromosome does not affect searching step of mutation, while mutation probability is also in direct proportion to searching step.At the beginning of evolution, shorter length chromosome( can be too shorter, otherwise it is harmful to population diversity ) and higher probability of crossover and mutation increases searching step, which can carry out greater domain searching, and avoid falling into local optimum. While at the vicinity of global optimum, longer length chromosome and lower probability of crossover and mutation will decrease searching step, and longer length chromosome also improves resolution of mutation, which avoid wandering near the global optimum, and speeds up algorithm converging.Finally, it should be pointed out that chromosome length changing keeps individual fitness unchanged, hence it does not affect select ion ( with roulette wheel selection) .2.3 Description of the algorithmOwing to basic genetic algorithm not converging on the global optimum, while the genetic algorithm which reserves the best individual at current generation can, our approach adopts this policy. During evolutionary process, we track cumulative average of individual average fitness up to current generation. It is written as1 X G x(t)= G f vg (t)t=1where G is the current evolutionary generation, 'avg is individual average fitness.When the cumulative average fitness increases to k times ( k> 1, k £ R) of initial individual average fitness, we change chromosome length to m times ( m is a positive integer ) of itself , and reduce probability of crossover and mutation, which_______________________________ 遗传算法中英文对照外文翻译文献________________________________can improve individual resolution and reduce searching step, and speed up algorithm converging. The procedure is as follows:Step 1 Initialize population, and calculate individual average fitness f avg0, and set change parameter flag. Flag equal to 1.Step 2 Based on reserving the best individual of current generation, carry out selection, regeneration, crossover and mutation, and calculate cumulative average of individual average fitness up to current generation 'avg ;f avgStep 3 If f vgg0 三k and Flag equals 1, increase chromosome length to m times of itself, and reduce probability of crossover and mutation, and set Flag equal to 0; otherwise continue evolving.Step 4 If end condition is satisfied, stop; otherwise go to Step 2.2 Test and analysisWe adopt the following two critical functions to test our approach, and compare it with the genetic algorithm which only reserves the best individual:sin 2 弋 x2 + y2 - 0.5 [1 + 0.01( 2 + y 2)]x, y G [-5,5]f (x, y) = 4 - (x2 + 2y2 - 0.3cos(3n x) - 0.4cos(4n y))x, y G [-1,1]22. 1 Analysis of convergenceDuring function testing, we carry out the following policies: roulette wheel select ion, one point crossover, bit mutation, and the size of population is 60, l is chromosome length, Pc and Pm are the probability of crossover and mutation respectively. And we randomly select four genetic algorithms reserving best individual with various fixed chromosome length and probability of crossover and mutation to compare with our approach. Tab. 1 gives the average converging generation in 100 tests.In our approach, we adopt initial parameter l0= 10, Pc0= 0.3, Pm0= 0.1 and k= 1.2, when changing parameter condition is satisfied, we adjust parameters to l= 30, Pc= 0.1, Pm= 0.01.From Tab. 1, we know that our approach improves convergence speed of genetic algorithm significantly and it accords with above analysis.2.2 Analysis of online and offline performanceQuantitative evaluation methods of genetic algorithm are proposed by Dejong, including online and offline performance. The former tests dynamic performance; and the latter evaluates convergence performance. To better analyze online and offline performance of testing function, w e multiply fitness of each individual by 10, and we give a curve of 4 000 and 1 000 generations for fl and f2, respectively.(a) onlineFig. 1 Online and offline performance of fl(a) online (b) onlineFig. 2 Online and offline performance of f2From Fig. 1 and Fig. 2, we know that online performance of our approach is just little worse than that of the fourth case, but it is much better than that of the second, third and fifth case, whose online performances are nearly the same. At the same time, offline performance of our approach is better than that of other four cases.3 ConclusionIn this paper, based on some general theorems, an improved genetic algorithmusing variant chromosome length and probability of crossover and mutation is proposed. Testing with some critical functions shows that it can improve convergence speed of genetic algorithm significantly, and its comprehensive performance is better than that of the genetic algorithm which only reserves the best individual.AppendixWith the supposed conditions of section 1, we know that the validation of Theorem 1 and Theorem 2 are obvious.Theorem 3 Mathematical expectation Ec(x) of chromosome searching step with one point crossover isb - a PEc(x) = 21 cwhere Pc is the probability of crossover.Proof As shown in Fig. A1, we assume that crossover happens on the kth locus, i. e. parent,s locus from k to l do not change, and genes on the locus from 1 to k are exchanged.During crossover, change probability of genes on the locus from 1 to k is 2 (“1” to “0” or “0” to “1”). So, after crossover, mathematical expectation of chromosome searching step on locus from 1 to k is1 chromosome is equal, namely l Pc. Therefore, after crossover, mathematical expectation of chromosome searching step isE (x ) = T 1 -• P • E (x ) c l c ckk =1Substituting Eq. ( A1) into Eq. ( A2) , we obtain 尸 11 b - a p b - a p • (b - a ) 1 E (x ) = T • P • — •• (2k -1) = 7c • • [(2z -1) ― l ] = ——— (1 一 )c l c 2 21 — 121 21 — 1 21 21 —1 k =1 lb - a _where l is large,-——-口 0, so E (x ) 口 -——P2l — 1 c 21 c 遗传算法中英文对照外文翻译文献 厂 / 、 T 1 T 1 b — a - 1E (x )="—w ="一• ---------- • 2 j -1 二 •ck2 j 2 21 -1 2j =1 j =1 Furthermore, probability of taking • (2k -1) place crossover on each locus ofFig. A1 One point crossoverTheorem 4 Mathematical expectation E m(")of chromosome searching step with bit mutation E m (x)—(b a)* P m, where Pm is the probability of mutation.Proof Mutation probability of genes on each locus of chromosome is equal, say Pm, therefore, mathematical expectation of mutation searching step is一i i - b —a b b- aE (x) = P w = P•—a«2i-1 = P•—a q2,-1)= (b- a) •m m i m 21 -1 m 2 i -1 mi=1 i=1一种新的改进遗传算法及其性能分析摘要:虽然遗传算法以其全局搜索、并行计算、更好的健壮性以及在进化过程中不需要求导而著称,但是它仍然有一定的缺陷,比如收敛速度慢。

外文文献—遗传算法

外文文献—遗传算法

附录I 英文翻译第一部分英文原文文章来源:书名:《自然赋予灵感的元启发示算法》第二、三章出版社:英国Luniver出版社出版日期:2008Chapter 2Genetic Algorithms2.1 IntroductionThe genetic algorithm (GA), developed by John Holland and his collaborators in the 1960s and 1970s, is a model or abstraction of biolo gical evolution based on Charles Darwin’s theory of natural selection. Holland was the first to use the crossover and recombination, mutation, and selection in the study of adaptive and artificial systems. These genetic operators form the essential part of the genetic algorithm as a problem-solving strategy. Since then, many variants of genetic algorithms have been developed and applied to a wide range of optimization problems, from graph colouring to pattern recognition, from discrete systems (such as the travelling salesman problem) to continuous systems (e.g., the efficient design of airfoil in aerospace engineering), and from financial market to multiobjective engineering optimization.There are many advantages of genetic algorithms over traditional optimization algorithms, and two most noticeable advantages are: the ability of dealing with complex problems and parallelism. Genetic algorithms can deal with various types of optimization whether the objective (fitness) functionis stationary or non-stationary (change with time), linear or nonlinear, continuous or discontinuous, or with random noise. As multiple offsprings in a population act like independent agents, the population (or any subgroup) can explore the search space in many directions simultaneously. This feature makes it ideal to parallelize the algorithms for implementation. Different parameters and even different groups of strings can be manipulated at the same time.However, genetic algorithms also have some disadvantages.The formulation of fitness function, the usage of population size, the choice of the important parameters such as the rate of mutation and crossover, and the selection criteria criterion of new population should be carefully carried out. Any inappropriate choice will make it difficult for the algorithm to converge, or it simply produces meaningless results.2.2 Genetic Algorithms2.2.1 Basic ProcedureThe essence of genetic algorithms involves the encoding of an optimization function as arrays of bits or character strings to represent the chromosomes, the manipulation operations of strings by genetic operators, and the selection according to their fitness in the aim to find a solution to the problem concerned. This is often done by the following procedure:1) encoding of the objectives or optimization functions; 2) defining a fitness function or selection criterion; 3) creating a population of individuals; 4) evolution cycle or iterations by evaluating the fitness of allthe individuals in the population,creating a new population by performing crossover, and mutation,fitness-proportionate reproduction etc, and replacing the old population and iterating again using the new population;5) decoding the results to obtain the solution to the problem. These steps can schematically be represented as the pseudo code of genetic algorithms shown in Fig. 2.1.One iteration of creating a new population is called a generation. The fixed-length character strings are used in most of genetic algorithms during each generation although there is substantial research on the variable-length strings and coding structures.The coding of the objective function is usually in the form of binary arrays or real-valued arrays in the adaptive genetic algorithms. For simplicity, we use binary strings for encoding and decoding. The genetic operators include crossover,mutation, and selection from the population.The crossover of two parent strings is the main operator with a higher probability and is carried out by swapping one segment of one chromosome with the corresponding segment on another chromosome at a random position (see Fig.2.2).The crossover carried out in this way is a single-point crossover. Crossover at multiple points is also used in many genetic algorithms to increase the efficiency of the algorithms.The mutation operation is achieved by flopping the randomly selected bits (see Fig. 2.3), and the mutation probability is usually small. The selection of anindividual in a population is carried out by the evaluation of its fitness, and it can remain in the new generation if a certain threshold of the fitness is reached or the reproduction of a population is fitness-proportionate. That is to say, the individuals with higher fitness are more likely to reproduce.2.2.2 Choice of ParametersAn important issue is the formulation or choice of an appropriate fitness function that determines the selection criterion in a particular problem. For the minimization of a function using genetic algorithms, one simple way of constructing a fitness function is to use the simplest form F = A−y with A being a large constant (though A = 0 will do) and y = f(x), thus the objective is to maximize the fitness function and subsequently minimize the objective function f(x). However, there are many different ways of defining a fitness function.For example, we can use the individual fitness assignment relative to the whole populationwhere is the phenotypic value of individual i, and N is the population size. The appropriateform of the fitness function will make sure that the solutions with higher fitness should be selected efficiently. Poor fitness function may result in incorrect or meaningless solutions.Another important issue is the choice of various parameters.The crossover probability is usually very high, typically in the range of 0.7~1.0. On the other hand, the mutation probability is usually small (usually 0.001 _ 0.05). If is too small, then the crossover occurs sparsely, which is not efficient for evolution. If the mutation probability is too high, the solutions could still ‘jump around’ even if the optimal solution is approaching.The selection criterion is also important. How to select the current population so that the best individuals with higher fitness should be preserved and passed onto the next generation. That is often carried out in association with certain elitism. The basic elitism is to select the most fit individual (in each generation) which will be carried over to the new generation without being modified by genetic operators. This ensures that the best solution is achieved more quickly.Other issues include the multiple sites for mutation and the population size. The mutation at a single site is not very efficient, mutation at multiple sites will increase the evolution efficiency. However, too many mutants will make it difficult for the system to converge or even make the system go astray to the wrong solutions. In reality, if the mutation is too high under high selection pressure, then the whole population might go extinct.In addition, the choice of the right population size is also very important. If the population size is too small, there is not enough evolution going on, and there is a risk for the whole population to go extinct. In the real world, a species with a small population, ecological theory suggests that there is a real danger of extinction for such species. Even the system carries on, there is still a danger of premature convergence. In a small population, if a significantly more fit individual appears too early, it may reproduces enough offsprings so that they overwhelm the whole (small) population. This will eventually drive the system to a local optimum (not the global optimum). On the other hand, if the population is too large, more evaluations of the objectivefunction are needed, which will require extensive computing time.Furthermore, more complex and adaptive genetic algorithms are under active research and the literature is vast about these topics.2.3 ImplementationUsing the basic procedure described in the above section, we can implement the genetic algorithms in any programming language. For simplicity of demonstrating how it works, we have implemented a function optimization using a simple GA in both Matlab and Octave.For the generalized De Jong’s test function where is a positive integer andr > 0 is the half length of the domain. This function has a minimum of at . For the values of , r = 100 and n = 5 as well as a population size of 40 16-bit strings, the variations of the objective function during a typical run are shown in Fig. 2.4. Any two runs will give slightly different results dueto the stochastic nature of genetic algorithms, but better estimates are obtained as the number of generations increases.For the well-known Easom functionit has a global maximum at (see Fig. 2.5). Now we can use the following Matlab/Octave to find its global maximum. In our implementation, we have used fixedlength 16-bit strings. The probabilities of crossover and mutation are respectivelyAs it is a maximization problem, we can use the simplest fitness function F = f(x).The outputs from a typical run are shown in Fig. 2.6 where the top figure shows the variations of the best estimates as they approach while the lower figure shows the variations of the fitness function.% Genetic Algorithm (Simple Demo) Matlab/Octave Program% Written by X S Yang (Cambridge University)% Usage: gasimple or gasimple(‘x*exp(-x)’);function [bestsol, bestfun,count]=gasimple(funstr)global solnew sol pop popnew fitness fitold f range;if nargin<1,% Easom Function with fmax=1 at x=pifunstr=‘-cos(x)*exp(-(x-3.1415926)^2)’;endrange=[-10 10]; % Range/Domain% Converting to an inline functionf=vectorize(inline(funstr));% Generating the initil populationrand(‘state’,0’); % Reset the random generatorpopsize=20; % Population sizeMaxGen=100; % Max number of generationscount=0; % counternsite=2; % number of mutation sitespc=0.95; % Crossover probabilitypm=0.05; % Mutation probabilitynsbit=16; % String length (bits)% Generating initial populationpopnew=init_gen(popsize,nsbit);fitness=zeros(1,popsize); % fitness array% Display the shape of the functionx=range(1):0.1:range(2); plot(x,f(x));% Initialize solution <- initial populationfor i=1:popsize,solnew(i)=bintodec(popnew(i,:));end% Start the evolution loopfor i=1:MaxGen,% Record as the historyfitold=fitness; pop=popnew; sol=solnew;for j=1:popsize,% Crossover pairii=floor(popsize*rand)+1; jj=floor(popsize*rand)+1;% Cross overif pc>rand,[popnew(ii,:),popnew(jj,:)]=...crossover(pop(ii,:),pop(jj,:));% Evaluate the new pairscount=count+2;evolve(ii); evolve(jj);end% Mutation at n sitesif pm>rand,kk=floor(popsize*rand)+1; count=count+1;popnew(kk,:)=mutate(pop(kk,:),nsite);evolve(kk);endend % end for j% Record the current bestbestfun(i)=max(fitness);bestsol(i)=mean(sol(bestfun(i)==fitness));end% Display resultssubplot(2,1,1); plot(bestsol); title(‘Best estimates’); subplot(2,1,2); plot(bestfun); title(‘Fitness’);% ------------- All sub functions ----------% generation of initial populationfunction pop=init_gen(np,nsbit)% String length=nsbit+1 with pop(:,1) for the Signpop=rand(np,nsbit+1)>0.5;% Evolving the new generationfunction evolve(j)global solnew popnew fitness fitold pop sol f;solnew(j)=bintodec(popnew(j,:));fitness(j)=f(solnew(j));if fitness(j)>fitold(j),pop(j,:)=popnew(j,:);sol(j)=solnew(j);end% Convert a binary string into a decimal numberfunction [dec]=bintodec(bin)global range;% Length of the string without signnn=length(bin)-1;num=bin(2:end); % get the binary% Sign=+1 if bin(1)=0; Sign=-1 if bin(1)=1.Sign=1-2*bin(1);dec=0;% floating point.decimal place in the binarydp=floor(log2(max(abs(range))));for i=1:nn,dec=dec+num(i)*2^(dp-i);enddec=dec*Sign;% Crossover operatorfunction [c,d]=crossover(a,b)nn=length(a)-1;% generating random crossover pointcpoint=floor(nn*rand)+1;c=[a(1:cpoint) b(cpoint+1:end)];d=[b(1:cpoint) a(cpoint+1:end)];% Mutatation operatorfunction anew=mutate(a,nsite)nn=length(a); anew=a;for i=1:nsite,j=floor(rand*nn)+1;anew(j)=mod(a(j)+1,2);endThe above Matlab program can easily be extended to higher dimensions. In fact, there is no need to do any programming (if you prefer) because there are many software packages (either freeware or commercial) about genetic algorithms. For example, Matlab itself has an extra optimization toolbox.Biology-inspired algorithms have many advantages over traditional optimization methods such as the steepest descent and hill-climbing and calculus-based techniques due to the parallelism and the ability of locating the very good approximate solutions in extremely very large search spaces.Furthermore, more powerful new generation algorithms can be formulated by combiningexisting and new evolutionary algorithms with classical optimization methods.Chapter 3Ant AlgorithmsFrom the discussion of genetic algorithms, we know that we can improve the search efficiency by using randomness which will also increase the diversity of the solutions so as to avoid being trapped in local optima. The selection of the best individuals is also equivalent to use memory. In fact, there are other forms of selection such as using chemical messenger (pheromone) which is commonly used by ants, honey bees, and many other insects. In this chapter, we will discuss the nature-inspired ant colony optimization (ACO), which is a metaheuristic method.3.1 Behaviour of AntsAnts are social insects in habit and they live together in organized colonies whose population size can range from about 2 to 25 millions. When foraging, a swarm of ants or mobile agents interact or communicate in their local environment. Each ant can lay scent chemicals or pheromone so as to communicate with others, and each ant is also able to follow the route marked with pheromone laid by other ants. When ants find a food source, they will mark it with pheromone and also mark the trails to and from it. From the initial random foraging route, the pheromone concentration varies and the ants follow the route with higher pheromone concentration, and the pheromone is enhanced by the increasing number of ants. As more and more ants follow the same route, it becomes the favoured path. Thus, some favourite routes (often the shortest or more efficient) emerge. This is actually a positive feedback mechanism.Emerging behaviour exists in an ant colony and such emergence arises from simple interactions among individual ants. Individual ants act according to simple and local information (such as pheromone concentration) to carry out their activities. Although there is no master ant overseeing the entire colony and broadcasting instructions to the individual ants, organized behaviour still emerges automatically. Therefore, such emergent behaviour is similar to other self-organized phenomena which occur in many processes in nature such as the pattern formation in animal skins (tiger and zebra skins).The foraging pattern of some ant species (such as the army ants) can show extraordinary regularity. Army ants search for food along some regular routes with an angle of about apart. We do not know how they manage to follow such regularity, but studies show that they could move in an area and build a bivouac and start foraging. On the first day, they forage in a random direction, say, the north and travel a few hundred meters, then branch to cover a large area. The next day, they will choose a different direction, which is about from the direction on the previous day and cover a large area. On the following day, they again choose a different direction about from the second day’s direction. In this way, they cover the whole area over about 2 weeks and they move out to a different location to build a bivouac and forage again.The interesting thing is that they do not use the angle of (this would mean that on the fourth day, they will search on the empty area already foraged on the first day). The beauty of this angle is that it leaves an angle of about from the direction on the first day. This means they cover the whole circle in 14 days without repeating (or covering a previously-foraged area). This is an amazing phenomenon.3.2 Ant Colony OptimizationBased on these characteristics of ant behaviour, scientists have developed a number ofpowerful ant colony algorithms with important progress made in recent years. Marco Dorigo pioneered the research in this area in 1992. In fact, we only use some of the nature or the behaviour of ants and add some new characteristics, we can devise a class of new algorithms.The basic steps of the ant colony optimization (ACO) can be summarized as the pseudo code shown in Fig. 3.1.Two important issues here are: the probability of choosing a route, and the evaporation rate of pheromone. There are a few ways of solving these problems although it is still an area of active research. Here we introduce the current best method. For a network routing problem, the probability of ants at a particular node to choose the route from node to node is given bywhere and are the influence parameters, and their typical values are .is the pheromone concentration on the route between and , and the desirability ofthe same route. Some knowledge about the route such as the distance is often used so that ,which implies that shorter routes will be selected due to their shorter travelling time, and thus the pheromone concentrations on these routes are higher.This probability formula reflects the fact that ants would normally follow the paths with higher pheromone concentrations. In the simpler case when , the probability of choosing a path by ants is proportional to the pheromone concentration on the path. The denominator normalizes the probability so that it is in the range between 0 and 1.The pheromone concentration can change with time due to the evaporation of pheromone. Furthermore, the advantage of pheromone evaporation is that the system could avoid being trapped in local optima. If there is no evaporation, then the path randomly chosen by the first ants will become the preferred path as the attraction of other ants by their pheromone. For a constant rate of pheromone decay or evaporation, the pheromone concentration usually varies with time exponentiallywhere is the initial concentration of pheromone and t is time. If , then we have . For the unitary time increment , the evaporation can beapproximated by . Therefore, we have the simplified pheromone update formula:where is the rate of pheromone evaporation. The increment is the amount of pheromone deposited at time t along route to when an ant travels a distance . Usually . If there are no ants on a route, then the pheromone deposit is zero.There are other variations to these basic procedures. A possible acceleration scheme is to use some bounds of the pheromone concentration and only the ants with the current global best solution(s) are allowed to deposit pheromone. In addition, certain ranking of solution fitness can also be used. These are hot topics of current research.3.3 Double Bridge ProblemA standard test problem for ant colony optimization is the simplest double bridge problem with two branches (see Fig. 3.2) where route (2) is shorter than route (1). The angles of these two routes are equal at both point A and pointB so that the ants have equal chance (or 50-50 probability) of choosing each route randomly at the initial stage at point A.Initially, fifty percent of the ants would go along the longer route (1) and the pheromone evaporates at a constant rate, but the pheromone concentration will become smaller as route (1) is longer and thus takes more time to travel through. Conversely, the pheromone concentration on the shorter route will increase steadily. After some iterations, almost all the ants will move along the shorter route. Figure 3.3 shows the initial snapshot of 10 ants (5 on each route initially) and the snapshot after 5 iterations (or equivalent to 50 ants have moved along this section). Well, there are 11 ants, and one has not decided which route to follow as it just comes near to the entrance.Almost all the ants (well, about 90% in this case) move along the shorter route.Here we only use two routes at the node, it is straightforward to extend it to the multiple routes at a node. It is expected that only the shortest route will be chosen ultimately. As any complex network system is always made of individual nodes, this algorithms can be extended to solve complex routing problems reasonably efficiently. In fact, the ant colony algorithms have been successfully applied to the Internet routing problem, the travelling salesman problem, combinatorial optimization problems, and other NP-hard problems.3.4 Virtual Ant AlgorithmAs we know that ant colony optimization has successfully solved NP-hard problems such asthe travelling salesman problem, it can also be extended to solve the standard optimization problems of multimodal functions. The only problem now is to figure out how the ants will move on an n-dimensional hyper-surface. For simplicity, we will discuss the 2-D case which can easily be extended to higher dimensions. On a 2D landscape, ants can move in any direction or , but this will cause some problems. How to update the pheromone at a particular point as there are infinite number of points. One solution is to track the history of each ant moves and record the locations consecutively, and the other approach is to use a moving neighbourhood or window. The ants ‘smell’ the pheromone concentration of their neighbourhood at any particular location.In addition, we can limit the number of directions the ants can move by quantizing the directions. For example, ants are only allowed to move left and right, and up and down (only 4 directions). We will use this quantized approach here, which will make the implementation much simpler. Furthermore, the objective function or landscape can be encoded into virtual food so that ants will move to the best locations where the best food sources are. This will make the search process even more simpler. This simplified algorithm is called Virtual Ant Algorithm (VAA) developed by Xin-She Yang and his colleagues in 2006, which has been successfully applied to topological optimization problems in engineering.The following Keane function with multiple peaks is a standard test functionThis function without any constraint is symmetric and has two highest peaks at (0, 1.39325) and (1.39325, 0). To make the problem harder, it is usually optimized under two constraints:This makes the optimization difficult because it is now nearly symmetric about x = y and the peaks occur in pairs where one is higher than the other. In addition, the true maximum is, which is defined by a constraint boundary.Figure 3.4 shows the surface variations of the multi-peaked function. If we use 50 roaming ants and let them move around for 25 iterations, then the pheromone concentrations (also equivalent to the paths of ants) are displayed in Fig. 3.4. We can see that the highest pheromoneconcentration within the constraint boundary corresponds to the optimal solution.It is worth pointing out that ant colony algorithms are the right tool for combinatorial and discrete optimization. They have the advantages over other stochastic algorithms such as genetic algorithms and simulated annealing in dealing with dynamical network routing problems.For continuous decision variables, its performance is still under active research. For the present example, it took about 1500 evaluations of the objective function so as to find the global optima. This is not as efficient as other metaheuristic methods, especially comparing with particle swarm optimization. This is partly because the handling of the pheromone takes time. Is it possible to eliminate the pheromone and just use the roaming ants? The answer is yes. Particle swarm optimization is just the right kind of algorithm for such further modifications which will be discussed later in detail.第二部分中文翻译第二章遗传算法2.1 引言遗传算法是由John Holland和他的同事于二十世纪六七十年代提出的基于查尔斯·达尔文的自然选择学说而发展的一种生物进化的抽象模型。

本科毕业论文-基于遗传算法的测试用例生成方法【精品毕业设计】(完整版)

本科毕业论文-基于遗传算法的测试用例生成方法【精品毕业设计】(完整版)

摘要软件测试是保证软件质量和可靠性重要手段,在这方面发挥着其它方法不可替代的作用。

然而,软件测试是一个复杂的过程,需要耗费巨大的人力、物力和时间,约占整个软件开发成本的40%~50%。

因此,提高软件测试工具的自动化程度对于确保软件开发质量、降低软件开发成本非常重要。

而提高测试用例生成的自动化程度又是提高测试工具乃至整个测试过程自动化程度的关键所在,本文主要针对这一问题进行了研究和设计。

本文在分析软件测试和遗传算法基本概念的基础上,提出软件测试用例的设计是软件测试的难点之一。

论文提出了基于遗传算法的测试用例生成的内含是应用遗传算法来求解一组优化的测试用例,其框架包括了测试环境构造、遗传算法及测试运行环境三部分,论文给出了基于遗传算法的测试用例生成的模型。

最后以三角形分类程序为例应用遗传算法进行测试用例生成的模拟,结果显示,应用遗传算法进行测试用例生成可行。

关键词:软件测试测试用例遗传算法ABSTRACTSoftware test is the important means that guarantee software quality and reliability,and in this respect,it plays the role that other method cannot replace. However software test is a complex process , it needs to consume huge manpower,material resources and time,which takes the 40%~50% of entire software development cost approximately . Therefore,raising the automation level of software test tool is very important for ensure software development quality and reduction software development cost . And then,the most important is raising the automation level of the test case generation for raising the automation level of test tool and even entire test process,so this paper study and design mainly according to this problem.Based on the analysis of basic concepts of software testing and genetic algorithm, this article proposes that software test case design is one of the difficulties of software testing. Paper presents the inherent in software test case designing based on genetic algorithm is using genetic algorithm to solve a set of optimization test cases, and the framework includes three parts which are test environment construction, genetic algorithm and the environment for test . Paper presents the model of software test case generation based on genetic algorithm. Finally, we take the triangle categorizer as an example, simulate software test case generation based on genetic algorithm. The results display that software test case generation basing on genetic algorithm is possible.KEY WORDS: software test , test case , genetic algorithm目录摘要 (1)ABSTRACT (2)目录 (3)第一章绪论 (5)1.1 问题的提出 (5)1.2 国内外研究现状 (6)1.3 论文研究内容 (8)第二章软件测试及遗传算法基本概念 (9)2.1 软件测试基本概念 (9)2.1.1 软件测试的目的 (9)2.1.2 软件测试的原则 (9)2.2 软件测试的难点 (10)2.3 遗传算法 (11)2.3.1 遗传算法的思想及流程 (11)2.3.2 遗传算法的特点 (13)2.4本章小结 (14)第三章基于遗传算法的测试用例生成 (15)3.1基于遗传算法的测试用例生成基本内涵 (15)3.1.1 软件测试用例的基本内涵 (15)3.1.2 基于遗传算法的测试用例生成的基本内涵 (16)3.2 基于遗传算法的测试用例生成框架 (16)3.3 基于遗传算法的测试用例生成算法实现 (18)3.3.1 编码策略 (18)3.3.2 适应度函数及程序插桩 (19)3.3.3 遗传策略 (20)3.3.4 参数控制 (21)3.4 本章小结 (22)第四章实验及结果分析 (23)4.1 待测程序分析 (23)4.1.1 待测程序引入 (23)4.1.2 程序流程分析 (23)4.1.3 路径分析 (24)4.2 程序插桩 (24)4.3 参数设定及程序实现 (25)4.3.1 参数设定 (25)4.3.2 部分程序实现 (26)4.4 结果分析 (28)4.5 本章小结 (30)第五章总结与展望 (31)致谢语 (32)参考文献 (33)第一章绪论1.1 问题的提出在信息化普及的今天,计算机在人们的生活和工作中占据着重要地位,使人们的工作效率提高,也使生活更丰富多彩。

Genetic algorithms for rheological parameter estimation of magnetorheological fluids

Genetic algorithms for rheological parameter estimation of magnetorheological fluids

GENETIC ALGORITHMS FOR RHEOLOGICAL PARAMETER ESTIMATION OF MAGNETORHEOLOGICAL FLUIDSAnirban Chaudhuri a, Norman M. Wereley a and R. Radhakrishnan ba Department of Aerospace Engineering, University of Maryland, College Park, MD, USAb Materials Modification Inc., Fairfax, VA, USAABSTRACTThe primary objective of this study is to estimate the parameters of constitutive models characterizing the rheological properties of ferrous and cobalt nanoparticle-based magnetorheological fluids. Constant shear rate rheometer measurements were carried out using suspensions of nanometer sized particles in hydraulic oil. These measurements yielded shear stress vs. shear rate as a function of applied magnetic field. The MR fluid was characterized using both Bingham-Plastic and Herschel-Bulkley constitutive models. Both these models have two regimes: a rigid pre-yield behavior for shear stress less than a field-dependant yield stress, and viscous behavior for higher shear rates. While the Bingham-Plastic model assumes linear post-yield behavior, the Herschel-Bulkley model uses a power law dependent on the dynamic yield shear stress, a consistency parameter and a flow behavior index. Determination of the model parameters is a complex problem due to the non-linearity of the model and the large amount of scatter in the experimentally observed data. Usual gradient-based numerical methods are not sufficient to determine the characteristic values. In order to estimate the rheological parameters, we have used a genetic algorithm and carried out global optimization. The obtained results provide a good fit to the experimental data.Keywords: Magnetorheological fluids, nanoparticles, Bingham-Plastic, Herschel-Bulkley, genetic algorithms1.INTRODUCTIONMagnetorheological (MR) fluids are a class of smart materials whose rheological properties may be varied by application of a magnetic field. These fluids are suspensions of soft magnetic particles (such as iron or cobalt) in a carrier fluid. Each ferrous particle has a dipole, the strength of which is roughly proportional to its diameter. Upon application of a magnetic field, these dipoles align parallel to the magnetic field and form chains. A finite stress must develop to yield these structures. The field-dependent yield stress of these fluids is continuously controllable and this controllability has been the primary reason for use in numerous smart actuation systems.MR Fluids have been produced with different types and sizes of magnetic carrier particles. The overwhelming majority of existing MR fluids are composed of micron-scale particles of iron in a non-magnetic carrier liquid1-5. They have high yield stress (20kPa to 100kPa) due to the strength of the dipoles created by the particles. The comparatively higher yield stress over electrorheological (ER) fluids (2kPa to 5kPa) is one major advantage of MR fluids. However, the density of the iron particles makes them susceptible to settling in the absence of frequent remixing because of the predominance of gravity forces. Once sedimented, residual magnetic attraction between particles makes re-dispersion difficult. The large particles could also lead to unwanted abrasion of the components in contact with the fluid.Ferrofluids, which are suspensions of iron particles of sizes less than 10nm, have also been reported.8, 9 However, there is no formation of elongated chain-like microstructures under the application of a magnetic field and they are unable to provide a significant magnetoviscous effect, especially for yield stresses. Nanometer sized iron particles (10nm to 100nm) have been introduced 10, 11 with an attempt to reduce settling while maintaining useful levels of stresses. The mixture is seen to overcome the settling problem due to the predominance of thermodynamic forces12, 13 but the shear stresses obtained for the same shear rates are also drastically reduced in comparison to fluids with micron-sized particles. However, the shear stresses in these fluids are comparable with shear stresses achieved in ER fluids and the phenomenon is also temperature independent.We use the Herschel-Bulkley (HB) and Bingham-Plastic (BP) constitutive models to characterize the fluid. The BP model has two flow regimes: (1) a rigid pre-yield behavior for shear stresses less than the field-dependant yield stress, and (2) flow with constant viscosity in the post-yield region. The HB model is non-linear and has three164Smart Structures and Materials 2005: Active Materials: Behavior and Mechanics,edited by William D. Armstrong, Proceedings of SPIE Vol. 5761(SPIE, Bellingham, WA, 2005) · 0277-786X/05/$15 · doi: 10.1117/12.600881parameters: the yield stress (y ), the consistency parameter (K ) and the flow index (n ). A Herschel-Bulkley fluid flows only if the local stress is greater than the yield stress. The index n can b e used to classify the fluid; 1>n indicates a shear-thickening fluid and 1<n indicates a shear-thinning flow. The HB model has b een used in several cases to characterize the flow of MR fluids, especially where shear thickening or thinning is seen.15, 16Genetic Algorithms (GA) have b een widely used in applications 23, 24 where a glob ally optimal solution is required. In conventional estimation methods, a model structure is chosen and the parameters of that model are calculated by optimizing an objective function. The methods typically used for minimization of the objective function are based on gradient descent techniques. These are very susceptible to initial guesses and the obtained parameters may be only locally optimal. On the other hand, GA uses a probabilistically guided search procedure which simulates genetic evolution.17, 18 Populations with stronger fitness are identified and retained, while those with weaker fitness are discarded. The process ensures that successive generations are fitter. The algorithm cannot be trapped in local minima since it employs random mutation procedures. The overall search procedure is stab le and rob ust and can identify globally optimal parameters of a system.In this paper, we use the rheological data ob tained from tests with an MR fluid consisting of two different kinds of nanometer sized particles in a suspension of hydraulic oil: (i) iron particles of 28nm mean diameter, and (ii) cobalt particles of 100nm mean diameter. A three-parameter HB model is fitted and a simple genetic algorithm is used to estimate the model parameters. Constraints have b een applied within the algorithm to ensure a monotonically increasing trend of the yield stress with increase in magnetizing current. The obtained parameters are seen to provide a good fit to the experimental data. The parameter variations with change in magnetizing current are smooth and physically more meaningful. Comparison of estimation errors with that of a BP model suggests that the HB model is certainly a better choice.2. SYNTHESIS OF IRON NANOPARTICLES AND MR FLUIDSMaterials Modification Inc. developed a patented microwave-b ased process for efficient synthesis of nanopowders. This technique utilized microwave energy to generate plasma b y ionization, disassociation and recombination of gas molecules. The high temperature vaporized the precursors, which promoted chemical reactions at the molecular level in the presence of microwaves. These vapors were rapidly cooled in an inert atmosphere to form powders. The powders (Figure 1) were synthesized from respective carbonyl precursors according toFe(CO)5 Fe(s) + 5CO (g)(C 7H 5CoO 2) (l) Co (s) + 2CO (g) + C 5H 5 (g)Figure 1 (a) Iron (b) Cobalt Proc. of SPIE Vol. 5761 165To prepare stable MR fluids, hydraulic oil was chosen as a carrier fluid. Mobil DTE20 series is used extensively in high-pressure systems including industrial, marine and mobile services because of their excellent anti-wear properties, multi-metal compatibility and corrosion resistance. Lecithin was used as a surfactant for producing nanofluidic dispersions. It was mixed in hydraulic oil using a hig h-speed emulsifier at nearly 11000 rpm. Iron nanopowders obtained from the microwave plasma synthesis were added to the oil and the mixing continued. All the samples had a solids loading of 40% by weight.3.MAGNETORHEOLOGICAL TESTINGThe rheolog ical results for this study were obtained using a Paar Physica MCR300 parallel disk rheometer (Figure 2). A standard gap of 1mm was used to separate the parallel disks. The magnetic circuit is designed so that the magnetic flux lines are normal to the parallel disks. The MR cell is capable of varying the magnetic field applied to the MR fluid sample. The MR cell also included a water-based heating/cooling system to maintain the temperature at 24 C for all the cases. The top disk rotates while the bottom disk remains stationary. After placing the sample between the plates, the mag netic circuit is closed. As the upper plate rotates, a sensor measures the torque and calculates the corresponding force exerted on the moving plate. The shear stress at a designated point on the plate is then evaluated. A shaft encoder measures the angular rate and the corresponding free strain. The top plate is rotated at constant RPM so that the sample is at a state of equilibrium at a particular shear rate when the measurements are made.Figure 2: Paar-Physica MCR 300 rheometer with magnetorheological cellIn these tests, a 5ml sample of MR fluid was placed between the two parallel disks and rotation of the upper disk was accomplished via shear rate control. The range of shear rates tested was from 0.1s-1 to 1500s-1. The maximum shear rate was limited to 1500s-1 because above this speed the fluid was expelled from between the disks. For each fluid sample, 20 measurements were taken from 0.1s-1 to 10s-1, 20 points between 10s-1 and 100s-1, 20 points between 100s-1 and 1000s-1 and 10 points from 1000s-1 and 1500s-1. The only exception was for a relatively low current of 0.2A, when the fluid was expelled from between the disk for shear rates above 1300s-1. The measurements were taken over a range of currents from 0.2A to 2A, in steps of 0.2A. For each test, the shear rate was held constant for 5 seconds until the measured shear stress reached a steady-state value, in order to maintain consistency in the measurements. From these constant RPM tests, a steady-state flow curve for shear stress ( ) versus shear rate ( ) can be produced by the rheometer. 166 Proc. of SPIE Vol. 57614. RHEOLOGICAL MODELSMR fluids demonstrate non-linear behavior when subjected to external magnetic fields. The rheological behavior of these materials can be separated into distinct pre-yield and post-yield regimes. MR fluids are observed to exhibit a strong field-dependent shear modulus and a yield stress that resists flow until the shear rate reaches a critical value. The Bingham-Plastic model has been used as a constitutive model for these fluids.7 The simplicity of this two-parameter model, with yield stress (y ) and post-yield viscosity (µ), has led to its wide use for representation of field-controllable fluids. This model assumes that the fluid exhibits shear stress proportional to shear rate in the post-yield region and is described by the following equation:However, in cases where the fluid experiences post-yield shear thickening or shear thinning, the behavior becomes non-linear and the assumption of constant plastic viscosity becomes invalid. The Herschel-Bulkley model is more suitable as a constitutive model for MR fluids 14 and has been applied to analysis of MR-based devices.15 The Herschel-Bulkley model is a modification of the power law and has the equation given below:where y (yield stress), K (consistency) and n (flow index) are the model parameters. The model assumes that below the critical value of stress (y ), the suspension behaves as a rigid solid. The flow index number,n , characterizes the post-yield behavior; n > 1 indicates shear thickening and n < 1 indicates shear thinning. The Bingham-Plastic model is a special case (n = 1) of the Herschel-Bulkley model.5. GENETIC ALGORITHM FOR PARAMETER ESTIMATIONThe problem of non-linear parameter estimation has attracted considerable interest. The use of sum of squared error as the objective function leads to a quadratic minimization problem. Most algorithms perform a minimization of the cost function starting at a user-provided initial guess. They make use of additional information, usually function gradients, to approach the minima. However, such techniques only yield a local minimum in the proximity of the initial case. In case of non-linear estimation, there may exist multiple optimal solutions that are physically equally significant and identification of all solution sets is not possible unless the optimizer is run with different initial guesses. The availability of function gradients at all points is also not always possible or is computationally costly.Genetic Algorithms (GAs) are a potential tool for finding global solutions in large parameter spaces since many different solution sets are investigated and refined simultaneously to identify near-optimal solutions rather than a single solution. GAs are different from usual optimization and search procedures 17, 18 as they search from a population of points and use probabilistic transition rules, not deterministic rules. An important consideration is that a GA uses only objective/fitness function information, not derivative or any other auxiliary knowledge. The evolution of a generation in order to obtain a new generation consists in selecting best individuals in order to be a member of the new generation and in adding to this generation the individuals which are the result of crossing over and mutation of the selected individuals. The convergence is guaranteed by the selection that makes the best solution of the new generation better or equal to the best solution of the previous generation. The overall search procedure is stable and robust and can identify globally optimal parameters of a system. Genetic algorithms have the ability to solve highly non-linear functions where other techniques fail.We have used a simple genetic algorithm (SGA) 19, 20 for estimating the parameters of the rheological model. A population of P individuals is generated, each member composed of a binary string of length N . Each individual is mapped to a rheological parameter using maximum and minimum bounds as follows:. µ +=y (1) n y K )(. += (2) Proc. of SPIE Vol. 5761 167The initial population is generated randomly and spread over the entire space of possible parameter values. The model equation (2) is then used to determine the error, and corresponding fitness value, of each population member. For every generation, we apply three genetic operators (reproduction, crossover and mutation) to create a new generation. Reproduction is simulated by a simple roulette wheel based selection scheme. Crossover is carried out at a single point for each parameter of the mod el. In ord er to prevent the algorithm from getting stuck in local minima, new genetic information is period ically injected by mutation. The objective function used is the sum of squared errors and the corresponding fitness is evaluated as the reciprocal of the objective function. For each individual,where e N is the number of experimentally obtained points for each magnetizing current, i ˆis the measured shear stress for a particular strain rate and i is the shear stress at the same strain rate for a particular set of rheological parameters. i w is used as a weighing factor. The search procedure is carried out for each value of magnetizing current. The flow index number (n ) is allowed to vary from 0 to 1. In case of the yield stress (y ), we select the highest measured shear stress as the upper bound and the estimated yield stress at the previous magnetization as the lower bound. This allows us to get a model with monotonically increasing yield stress. This constraint was included because the theory of increasing yield stress with higher magnetization is physically more feasible.Several termination criteria for a genetic search have been proposed. One simple criterion is to stop the search when almost all individuals in the population are identical (or nearly so); the other criterion is to test the improvement in the best fitness score over successive generations. However, the first criterion can lead to extensive search times while the second one is not good for functions characterized by “plateau-type” regions.21 In our work, we stopped the GA after a fixed number of generations, which was chosen as a compromise between constraints of convergence, computing time and accuracy.6. RESULTS The parameters of the constitutive models are obtained after carrying out global optimization using a simple genetic algorithm. The algorithm was run with a population size of 2000 and using 50 bits for encoding. The probabilities of crossover and mutation are chosen as 0.85 and 0.025 respectively. Constraints are applied to the search scheme to ensure monotonically increasing characteristic for the yield stress with increasing magnetization. The cost function is evaluated using equation (4). The weighing factor is adjusted so that the algorithm provides a better fit to the data at the higher shear rates.The parameters estimated for the BP model are shown in Figure 3. The yield stress is seen to vary from 0.3kPa at 0.03T to 2.25kPa at 0.30T for iron, and from 0.05kPa to 1.75kPa for cobalt. The variation in yield stress is smooth and saturation effects are noted for the coefficient of viscosity of the MR fluid as we increase the magnetic field.= =e N i i i i j w E error Squared 12)ˆ( (4) j j E F value Fitness /1= 168 Proc. of SPIE Vol. 5761(a) Nanoiron based fluid(b) Nanocobalt based fluidFigure 3: Parameters of Bingham-Plastic model The obtained results for the HB model are shown in Figure 4. The p arameters change smoothly over the range of magnetizing currents. Yield stress shows an increasing trend and saturates at higher values of magnetization. The field-dep endent yield stresses have a maximum of 1.45kPa and are lower than those obtained from the BP model. The estimated consistency p arameter and flow index show considerable scatter and their variation cannot be p hysically explained.To improve the estimation results, we run the optimizer with a fixed value of n = 0.45 (Figure 5). Both yield stress and consistency vary smoothly with magnetization.Proc. of SPIE Vol. 5761 169Figure 4: HB parameters for nanoiron-based MRFFigure 5: HB parameters for nanocobalt with n = 0.45 170 Proc. of SPIE Vol. 5761Using the estimated p arameters, we fit models to the exp erimentally obtained data (Figure 6). Both the BP and HB models fit the high shear rate data equally well, but the low shear rate regions are better represented by the HB model.(a) Nanoiron based fluid(b) Nanocobalt based fluidFigure 6: Rheological flow curves with fitted modelsFinally, we compare the fitting errors (Figure 7) by using different models (BP and HB) and different schemes (Least squares and GA). The HB model, with errors limited to 2% of the maximum stress, is seen to be more accurate than the BP model. The case with fixed n also has low modeling errors and is more suitable as a constitutive equation for the fluid flow since it results in smoother variation of all the estimated parameters.Proc. of SPIE Vol. 5761 171(a) Nanoiron based fluid(b) Nanocobalt based fluidFigure 7: Errors in model fitting7.CONCLUSIONIn thi s study, we have esti mated the parameters of two consti tuti ve models used to characteri ze the rheologi cal properties of ferrous and cobalt nanoparticle based magnetorheological fluids. Tests were conducted on suspensions of iron and cobalt particles in silicon oil at different levels of magnetizing current. The applied magnetic flux density is vari ed from 0.03T to 0.30T and the rheologi cal measurements are obtai ned. A si mple geneti c algori thm i s used to esti mate the parameters of the consti tuti ve model. Constrai nts are i mposed on the mi ni mi zati on process to ensure monotonic increase of the yield stress with increasing magnetization, while keeping the other parameters unconstrained.The following points are noted:(i)The maximum shear stresses in the fluids are seen to vary between 250Pa and 3000Pa, far lower than the stressesobtai nable i n MR flui ds wi th mi cron-si zed parti cles. The rheologi cal curves show consi derable shear-thi nni ng effect.(ii)For nanoiron based MRF, the dynamic yield stress is seen to vary from about 100Pa at 0.03T to almost 800Pa at0.30T for the HB model, while the same parameter ranges from 250Pa to 2250Pa for the BP model.(iii)The flow index number decreases from 0.36 to 0.23 in the nanoiron based fluid, indicating shear-thinning effects.The cobalt fluid is well represented by the constitutive model if a constant value of n= 0.45 is used.172 Proc. of SPIE Vol. 5761(iv) A notable feature is the presence of saturation at higher values of magnetic flux densities, which implies that we cannot get higher yield stresses simply by raising the magnetizing current.(v)The percentage absolute errors in model fitting are limited to 2% of the peak shear stress observed for a particular level of magnetization when GA is used for the HB model, and are lower than the corresponding errors when an LMS technique is applied.We can conclude that the Herschel-Bulkley model is a better choice as a constitutive equation for describing the behavior of nanoparticle based MR fluids. Genetic algorithms can also be efficiently applied to such rheological parameter estimation problems and it provides results comparable to those obtained from usual gradient-based schemes.REFERENCES1.J.M. Ginder, “Behavior of Magnetorheological Fluids,” MRS Bulletin, pp. 26 - 29, 1998.2.P.P. Phule and J.M. Ginder, “The Materials Science of Field-Responsive Fluids,” MRS Bulletin, pp. 19 - 21, 1998.3.G. Bossis, S. Lacis, A. Meunir and O. Volkova, “Magnetorheological Fluids,” Journal of Magnetism and MagneticMaterials, 252, pp. 224 - 228, 2002.4.M.C. Yang, L.E. Scriven and C.W. Macosko, “Some Rheological Measurements on Magnetic Iron OxideSuspensions in Silicone Oil,” Journal of Rheology, 30(5), pp. 1015 - 1029, 1986.5.G. Bossis and E. Lemaire, “Yield stresses in magnetic suspensions,” Journal of Rheology, 35(7), pp. 1345 - 1354,1991.6. E. Lemaire, A. Meunier, G. Bossis, J. Liu, D. Felt, P. Bashtovoi and N. Matoussevitch, “Influence of the particlesize on the rheology of magnetorheological fluids,” Journal of Rheology, 39(5), pp. 1011-1020, 1995.7.S. Genc and P. Phule, “Rheological properties of magnetorheological fluids,” Smart Material Structures, 11, pp.140 - 146, 2002.8.K. Butter, A.P. Philipse and G.J. Vroege, “Synthesis and properties of iron ferrofluids,” Journal of Mag-netism andMagnetic Materials, 252, pp. 1- 3, 2002.9. A.Y. Zubarev, S. Odenbach and J. Fleischer, “Rheological properties of dense ferrofluids: Effect of chain-likeaggregates,” Journal of Magnetism and Magnetic Materials, 252, pp. 241 - 243, 2002.10. C. Kormann, H.M. Laun and H.J. Richter, “MR Fluids With Nano-Sized Magnetic Particles,” InternationalJournal of Modern Physics B, 10, pp. 3167 - 3172, 1992.11.N. Rosenfeld, N.M. Wereley, R. Radhakrishnan and T.S. Sudarshan, “Behavior of magnetorheological fluidsutilizing nanopowder iron,” International Journal of Modern Physics B, 16, pp. 2392 - 2398, 2002.12.S. John, J.H. Yoo, N.M. Wereley, R. Radhakrishnan and S. Sudarshan, “Magneto-Rheological Fluids ExploitingNanometer Sized Particles," Proc. SPIE, 4699, pp. 473 - 484, 2002.13.J. Trihan, J.H. Yoo, N.M. Wereley, S. Kotha, A. Suggs, R. Radhakrishnan, S. Sudarshan and B.J. Love, “Impact ofvarying concentrations of nanometer-sized particles in a bidisperse magnetorheological fluid,” Proc. SPIE, 5052, pp. 175 - 185, 2003.14.X. Wang and F. Gordaninejad, “Flow Analysis of Field-Controllable, Electro- and Magneto-Rheological FluidsUsing Herschel-Bulkley Model,” Journal of Intelligent Materials, Systems and Structures, 10(8), pp. 601 - 608, 1999.15. D.Y. Lee and N.M. Wereley, “Quasi-steady Herschel-Bulkley Analysis of Electro- and Magneto-rheological FlowMode Dampers,” Journal of Intelligent Materials, Systems and Structures, 10(10), pp. 761 - 769, 1999.16.X. Wang and F. Gordaninejad, “Dynamic Modeling of Semi-Active ER/MR Fluid Dampers,” Proc. of the SPIE,4331, pp. 82 - 91, 2001.17.D.E. Goldberg, Genetic Algorithms in Search, Optimization, and Machine Learning, Addison Wesley, NY, 1989.18.M. Mitchell, An Introduction to Genetic Algorithms, MIT Press, MA, 1998.19.M. Srinivas and L.M. Patnaik, “Genetic Algorithms: A Survey,” Computer, 27(6), pp. 17 - 26, 1994.20.K.F. Man, K.S. Tang and S. Kwong, “Genetic Algorithms: Concepts and Applications,” IEEE Trans. on IndustrialElectronics, 43(5), pp. 519 - 534, 1996.21.J.M. Renders and S.P. Flasse, “Hybrid Methods Using Genetic Algorithms for Global Optimization,” IEEE Trans.on Systems, Man, and Cybernetics - Part B, 26(2), pp. 243 - 258, 1996.22.R. Salomon, “Evolutionary Algorithms and Gradient Search: Similarities and Differences,” IEEE Trans. onEvolutionary Computation, 2(2), pp. 45 - 55, 1998.23.H.H. Weatherford and C.W.B. Brice, “Estimation of Induction Motor Parameters by a Genetic Algorithm,” Pulpand Paper Industry Technical Conference, pp. 21- 28, 2003.Proc. of SPIE Vol. 5761 17324. D. Wolf and R. Moros, “Estimating rate constants of heterogeneous catalytic reactions without supposition of ratedetermining surface steps an application of a genetic algorithm,” Chem. Engg. Science, 52(7), pp. 1189 - 1199, 1997.174 Proc. of SPIE Vol. 5761。

毕业设计论文基于遗传算法的BP神经网络的优化问题研究.doc

毕业设计论文基于遗传算法的BP神经网络的优化问题研究.doc

编号:审定成绩:重庆邮电大学毕业设计(论文)设计(论文)题目:基于遗传算法的BP神经网络的优化问题研究学院名称:学生姓名:专业:班级:学号:指导教师:答辩组负责人:填表时间:2010年06月重庆邮电大学教务处制摘要本文的主要研究工作如下:1、介绍了遗传算法的起源、发展和应用,阐述了遗传算法的基本操作,基本原理和遗传算法的特点。

2、介绍了人工神经网络的发展,基本原理,BP神经网络的结构以及BP算法。

3、利用遗传算法全局搜索能力强的特点与人工神经网络模型学习能力强的特点,把遗传算法用于神经网络初始权重的优化,设计出混合GA-BP算法,可以在一定程度上克服神经网络模型训练中普遍存在的局部极小点问题。

4、对某型导弹测试设备故障诊断建立神经网络,用GA直接训练BP神经网络权值,然后与纯BP算法相比较。

再用改进的GA-BP算法进行神经网络训练和检验,运用Matlab软件进行仿真,结果表明,用改进的GA-BP算法优化神经网络无论从收敛速度、误差及精度都明显高于未进行优化的BP神经网络,将两者结合从而得到比现有学习算法更好的学习效果。

【关键词】神经网络BP算法遗传算法ABSTRACTThe main research work is as follows:1. Describing the origin of the genetic algorithm, development and application, explain the basic operations of genetic algorithm, the basic principles and characteristics of genetic algorithms.2. Describing the development of artificial neural network, the basic principle, BP neural network structure and BP.3. Using the genetic algorithm global search capability of the characteristics and learning ability of artificial neural network model with strong features, the genetic algorithm for neural network initial weights of the optimization, design hybrid GA-BP algorithm, to a certain extent, overcome nerves ubiquitous network model training local minimum problem.4. A missile test on the fault diagnosis of neural network, trained with the GA directly to BP neural network weights, and then compared with the pure BP algorithm. Then the improved GA-BP algorithm neural network training and testing, use of Matlab software simulation results show that the improved GA-BP algorithm to optimize neural network in terms of convergence rate, error and accuracy were significantly higher than optimized BP neural network, a combination of both to be better than existing learning algorithm learning.Key words:neural network back-propagation algorithms genetic algorithms目录第一章绪论 (1)1.1 遗传算法的起源 (1)1.2 遗传算法的发展和应用 (1)1.2.1 遗传算法的发展过程 (1)1.2.2 遗传算法的应用领域 (2)1.3 基于遗传算法的BP神经网络 (3)1.4 本章小结 (4)第二章遗传算法 (5)2.1 遗传算法基本操作 (5)2.1.1 选择(Selection) (5)2.1.2 交叉(Crossover) (6)2.1.3 变异(Mutation) (7)2.2 遗传算法基本思想 (8)2.3 遗传算法的特点 (9)2.3.1 常规的寻优算法 (9)2.3.2 遗传算法与常规寻优算法的比较 (10)2.4 本章小结 (11)第三章神经网络 (12)3.1 人工神经网络发展 (12)3.2 神经网络基本原理 (12)3.2.1 神经元模型 (12)3.2.2 神经网络结构及工作方式 (14)3.2.3 神经网络原理概要 (15)3.3 BP神经网络 (15)3.4 本章小结 (21)第四章遗传算法优化BP神经网络 (22)4.1 遗传算法优化神经网络概述 (22)4.1.1 用遗传算法优化神经网络结构 (22)4.1.2 用遗传算法优化神经网络连接权值 (22)4.2 GA-BP优化方案及算法实现 (23)4.3 GA-BP仿真实现 (24)4.3.1 用GA直接训练BP网络的权值算法 (25)4.3.2 纯BP算法 (26)4.3.3 GA训练BP网络的权值与纯BP算法的比较 (28)4.3.4 混合GA-BP算法 (28)4.4 本章小结 (31)结论 (32)致谢 (33)参考文献 (34)附录 (35)1 英文原文 (35)2 英文翻译 (42)3 源程序 (47)第一章绪论1.1 遗传算法的起源从生物学上看,生物个体是由细胞组成的,而细胞则主要由细胞膜、细胞质、和细胞核构成。

基于改进遗传算法的磁流变阻尼器多目标空间优化布置

基于改进遗传算法的磁流变阻尼器多目标空间优化布置

第50 卷第 5 期2023年5 月Vol.50,No.5May 2023湖南大学学报(自然科学版)Journal of Hunan University(Natural Sciences)基于改进遗传算法的磁流变阻尼器多目标空间优化布置张香成1,徐宏辉1,赵军2†,杨洋1(1.郑州大学力学与安全工程学院,河南郑州 450001;2.郑州大学水利与土木工程学院,河南郑州 450001)摘要:为解决空间结构中阻尼器位置和数量优化问题,基于遗传算法提出一种新型编码方式——“A-B”型数字编码,实现了对阻尼器优化布置的精确定位. 推导了磁流变阻尼器(MRD)附加刚度和附加阻尼矩阵,采取H2范数优化控制理论、代间比较权重等理论提出了改进遗传算法,并采用MATLAB软件开发了多目标空间优化布置改进遗传算法程序. 以10层钢筋混凝土框剪偏心结构为例,依据规范选取7条地震波作为动力时程输入,对优化方案及3种工况下结构位移、加速度、扭转控制进行计算,并分析了不同减震指标随MRD数量变化的发展趋势. 结果表明:优化目标函数值随进化代数迅速收敛;4种工况中优化方案控制效果最佳,顶层88号节点X、Y向减震率分别达39.45%、32.68%,结构扭转得到有效控制. 算例表明了改进遗传算法的有效性,实现了对空间结构阻尼器布置的精确定位,且结构得到最优控制.关键词:磁流变阻尼器;遗传算法;代间比较权重;多目标优化;动力分析中图分类号:TU352.1 文献标志码:AMulti-objective Spatial Optimization Arrangement of Magnetorheological Dampers Based on Improved Genetic AlgorithmZHANG Xiangcheng1,XU Honghui1,ZHAO Jun2†,YANG Yang1(1.School of Mechanics and Safety Engineering, Zhengzhou University, Zhengzhou 450001, China;2.School of Water Resources and Civil Engineering, Zhengzhou University, Zhengzhou 450001, China)Abstract:To solve the optimization problem of the position and quantity of dampers in spatial structure, a new coding method,“A-B”type digital coding, was proposed based on a genetic algorithm, which realizes the precise positioning of the optimal arrangement of dampers. The additional stiffness and damping matrix of the magnetorheo⁃logical damper (MRD) were deduced, the improved genetic algorithm was proposed by adopting the H2 norm opti⁃mal control theory and the intergenerational comparison weight, and the multi-objective spatial optimization arrange⁃ment was used to develop the improved genetic algorithm program using MATLAB software. Taking a ten-story rein⁃forced concrete frame-shear wall eccentric structure as an example, seven seismic waves were selected as dynamic∗收稿日期:2022-03-01基金项目:国家自然科学基金资助项目(51878621), National Natural Science Foundation of China(51878621);中原科技创新领军人才计划项目(ZYQR201912029), Central Plains Technology Innovation Leading Talent Program(ZYQR201912029);河南省重点研发与推广专项(202102310239), Promotion Projects in Henan Province (202102310239)作者简介:张香成(1983—),男,河南漯河人,郑州大学副教授,博士† 通信联系人,E-mail:*************.cn文章编号:1674-2974(2023)05-0085-10DOI:10.16339/ki.hdxbzkb.2023058湖南大学学报(自然科学版)2023 年time history input according to the specification, the structural displacement, acceleration, and torsion control un⁃der an optimization scheme, and three working conditions were calculated, and the development trends of different shock absorption indexes with the number of MRDs were analyzed. The results show that the value of the optimization objective function converged rapidly with the evolutionary algebra. The optimization scheme has the best control ef⁃fect in the four working conditions, the shock absorption rates in the X and Y directions of the No. 88 node on the top floor reached 39.45% and 36.48%, respectively, and the structure torsion was effectively controlled. The numerical example showed the effectiveness of the improved genetic algorithm, the precise positioning of the damper arrange⁃ment of the space structure is realized, and the structure is optimally controlled.Key words:magnetorheological damper;genetic algorithm;generation-compared weight;multi-objective opti⁃mization;dynamic analysis磁流变阻尼器(Magnetorheological Damper,MRD)作为结构振动控制中最具有前景的半主动控制装置之一,因结构简单、响应迅速、阻尼力大且连续顺逆可调等特点而广泛应用于土木结构减震控制中[1-5]. 阻尼器对结构的减震控制效果不仅与阻尼器的数量、阻尼力大小有关,而且与阻尼器在结构中的位置密切相关,为了降低控制成本并且提高控制效率,需要对结构中的阻尼器进行优化配置. 1997年Takewaki[6]和Wu等[7]在结构振动控制领域引入遗传算法,并进行了大量的研究工作,至此,遗传算法在结构阻尼器优化布置中得到普遍应用. 针对具体的工程优化问题,选用适当的编码和相应的遗传算子进行优化,是遗传算法的一个重要研究方向.很多学者采用遗传算法“0-1”编码方式对阻尼器进行优化布置研究,0表示该处不设置阻尼器,1表示设置阻尼器. 贝伟明等[8]基于遗传算法采用等效二次型性能指标对MRD进行优化布置,证明了遗传算法的有效性;閤东东等[9]采用H2范数控制理论和改进遗传算法对相邻结构间阻尼器布置位置进行优化研究,结果表明该方法可有效减小结构的二次型性能指标;孙彤等[10]基于遗传算法对轨道式负刚度装置提出一种优化布置数学模型,并以10层钢筋混凝土(Reinforced Concrete,RC)结构为例研究了该装置优化布置基本原则;燕乐纬等[11]提出一种相对适应度函数,提高了遗传算法的进化效率;金波等[12]基于遗传算法将黏滞阻尼器替换杆件的模态应变能作为优化函数,实现了对网架结构的优化控制. “0-1”编码多将结构简化为层间剪切模型,忽略了阻尼器在结构平面和空间上分布方式的影响;对于大型空间结构,若实现精准定位则会造成“维度灾难”,计算量和计算时间难以承受.实数编码是用具体实数表示每层阻尼器数量,郭勇等[13]采用实数编码方式将遗传算法与劣出优入算法相结合,对输电塔阻尼器的布置方式进行了多目标优化研究. 数字序列编码中每个基因位数字表示楼层号,基因位数表示阻尼器个数. 燕乐纬等[14]基于遗传算法提出数字序列编码,并验证了该方法的有效性;马宏伟等[15]提出粗粒度并行遗传算法,提高了优化结果收敛速度及精度. 实数编码和数字序列编码大大缩短了基因维度,解决了二进制编码不能完备表达求解空间的问题,但无法实现阻尼器的精准定位.为实现空间结构中阻尼器优化布置的精准定位,基于遗传算法提出一种新型编码方式——“A-B”型数字编码,推导了MRD附加刚度和附加阻尼矩阵,采取H2范数优化控制理论、相对适应度函数、多目标优化、代间比较权重等理论提出了改进遗传算法. 采用MATLAB软件开发了改进遗传算法MRD多目标空间优化布置分析程序. 基于文献[16-17]的建模理论,以10层框剪偏心结构为算例验证了本文改进遗传算法的正确性和程序的有效性.1 改进遗传算法1.1 编码方式为实现高层空间结构阻尼器优化布置的精确定位,对遗传算法进行合理改进,提出一种新型编码方式——“A-B”型序列编码. 其中,A对应建筑结构的楼层数,B对应该楼层的具体位置,例如基因型为86第 5 期张香成等:基于改进遗传算法的磁流变阻尼器多目标空间优化布置[2-1,2-4,8-7,5-3,6-10,7-5]的个体对应表现型为该结构共布置6个阻尼器,分别布置在第二层第一个位置、第四个位置,第八层第七个位置等. 假设10层结构拟布置18个阻尼器,共100个可选位置,采用遗传算法对其进行优化布置研究,4种编码方式对比如表1所示.“A-B”型序列编码方式仅需明确定义每层可安设阻尼器位置的编号,相比于实数编码和数字序列编码可精确定位空间结构阻尼器具体安设位置,相比于“0-1”编码大大缩短基因长度,从而使得遗传算法更容易寻找最优解,加快寻优速度.1.2 遗传操作遗传操作包括选择、交叉、变异操作,是遗传算法的主体模块,其运算方法的设计决定了种群进化的方向.采用轮盘赌选择方式对各个体进行优胜劣汰操作,采用单点交叉方式,对A、B基因分开进行交叉操作,分别给予特定的交叉概率,互不影响. 其中交叉位置随机生成. 例如:a1 A:3 5 4 6-8 5 6;B:6-1 9 6 3 8 7.a2 A:3 6 6 5-4 5 8;B:6-5 9 6 3 8 1.a1和a2表示两个不同基因型的个体,其中“-”表示交叉位置,完成交叉操作后得到两个全新个体为:a1 A:3 5 4 6-4 5 8;B:6-5 9 6 3 8 1.a2 A:3 6 6 5-8 6 5;B:6-1 9 6 3 8 7.变异操作和交叉一致,A、B基因互不影响,其中变异基因位、变异基因编码在允许范围内随机生成.1.3 约束性条件及精英保留策略相比于“0-1”编码及数字序列编码方式,“A-B”型编码方式无须考虑交叉、变异操所造成的阻尼器数量变化约束处理问题,但会出现基因重复现象,即在交叉、变异过程中有可能出现两个基因位基因代码相同的情况. 基于“A-B”型编码方式的特点,提出一种基因代码转换方式,将个体各基因位代码转换为十进制数字,每个数字在交叉、变异过程中进行甄别,若出现相同数字则对其进行“变异”操作,直至无重复数字为止.在每代的选择、交叉、变异操作之后,将当代种群中最小适应度值与上述操作前最大适应度值进行对比,保留适应度值高的个体进入下一代,即“末尾淘汰、精英保留”. 随着种群的不断迭代,种群整体适应度值不断提高,即基因优良性不断提高.2 优化控制理论2.1 优化目标函数采用H2范数优化控制理论对MRD进行优化布置研究,MRD受控结构减震运动微分方程如下:M x(t)+C x(t)+K x(t)=-MR x g(t)-HF(t).(1)式中:M、C、K分别是结构的总质量矩阵、阻尼矩阵、总刚度矩阵;x(t)、x(t)、x(t)分别为受控框剪结构的加速度、速度、位移响应;x g(t)为施加在结构上的地震波加速度;R是地震作用列向量;H是MRD的位置矩阵;F(t)是MRD所提供的控制力向量. 阻尼矩阵C采用Rayleigh正交阻尼模型,详见文献[16].对阻尼力进行变形重组,可得等效刚度和等效阻尼,如下:F(t)=GZ=Géëêêùûúúx(t)x(t)=G1x(t)+G2x(t).(2)式中:G为反馈增益矩阵,由线性二次型调节器控制算法求得,G1=G(:,1:m),G2=G(:,m+1:2m),m为结构自由度个数;Z=[x(t) x(t)]T为受控系统状态向量.结合公式(1)、(2)可得:M x(t)+Cˉx(t)+Kˉx(t)=-MR x g(t).(3)式中:Cˉ=C+HG2为结构的总阻尼矩阵;Kˉ=K+ HG1为结构的总刚度矩阵.式(3)的状态空间的状态函数为:z(t)=A z(t)+B w(t).zˉ(t)=C z(t)+D w(t).(4)式中:A=éëêêùûúú0I-M-1Kˉ-M-1Cˉ为受控系统阵(状态阵);I为单位矩阵;B=éëêêùûúú0R为地震波输入阵(控制分布阵);C为输出阵(测量阵),C=[-M-1K-M-1Cˉ]为加速度输出阵,C=[C1C2]为层间位移输出阵,表1 不同编码方式对比Tab.1 Comparison of different encoding methods编码方式“0-1”实数数字序列“A-B”合理性满足满足满足满足优良基因遗传性满足满足满足满足精准定位满足不满足不满足满足基因长度10010181887湖南大学学报(自然科学版)2023 年其中C 1=éëêêêêêêêêùûúúúúúúúú1000-11⋮⋮0⋮⋮000-11m ×m,C 2=zeros (m ,m );D 为前馈阵(输入输出阵),D =0.对受控系统状态方程进行拉普拉斯变换,并求取其传递函数:G (s )=C (s I -A )-1B +D .(5)式中:s 为拉普拉斯算子[18].传递函数的H 2范数可用式(6)计算:G (s )2=tr (C L c C Τ).(6)式中:L c 为Lyapunov 方程AL c +L c A Τ=-BB Τ的非负定解.2.2 多目标优化与代间比较权重多目标优化最优解称为Pareto 最优解,其特点是随着优化进程各目标函数齐头并进,且在无法提升任何目标函数的同时保证不削弱任何目标函数. 多目标优化算法以MRD 受控结构层间位移的H 2范数指标和加速度的H 2范数指标联合控制对MRD 布置位置进行优化计算,优化目标函数如式(7)所示.f =ωd()Zmax d-Z d +γ()Zmax d-Z mind+γ+ωα()Z max α-Z α+γ()Zmax α-Z minα+γ .(7)式中:ωd 与ωa 分别为结构层间位移和加速度的H 2范数指标的代间比较权重;Z max d 与Z max α与Z min d 与Z minα、Z d 与Z α分别为二者在未控、最优控制、当前方案下的指标值;γ为非零小量,避免分母为零.代间比较权重定义如下:ωk =t k ∑k =1n t k .(8)式中:t k =1n ,S =1;t k =Z S k min Z S -1k min ,S ≥2,n 为目标函数数量,S 为遗传代数,Z Sk min为第S 代种群中第k 个指标的最小值.代间比较权重使得进步慢的目标函数将获得较大的权值,以促进各目标函数间的均衡发展. 相比于人为定义权重值以及适应性权重的方法,其不仅排除了人为因素定义两个权重值不同造成的影响,而且提供了种群向最优目标进化的方向和搜索压力,同时又使得这种压力在各指标间均匀地进行分配.2.3 适应度函数适应度函数值的大小影响着个体被遗传到下一代的概率,个体适应度函数值越大,遗传到下一代的概率越高. 为实现目标函数到适应度函数的良性映射,提高优良个体遗传到下一代的概率,采用相对适应度函数进行遗传操作.F ˉ(x )=f (x i )-min {f (x )}.(9)式中:F ˉ(x )为相对适应度函数;f (x i )为个体目标函数;{f (x )}为当代种群目标函数集合.2.4 程序编制基于MRD 受控结构三维计算模型、经典遗传算法、“A-B ”型编码方式、H 2范数优化控制理论、多目标优化与代间比较权重等理论,采用MATLAB 软件开发了改进遗传算法阻尼器空间位置寻优程序. 程序计算流程如图1所示.3 优化模型及地震波选取3.1 优化模型以10层RC 框剪结构为例,结构的混凝土强度等级为C35,弹性模量为3.25×104 MPa ,泊松比为0.2,钢筋混凝土密度为2 500 kg/m 3,楼板厚度为0.12 m ,剪力墙厚度为0.20 m. 结构的三维模型如图2所示,一至三层框架柱的截面尺寸为0.7 m×0.7 m ,四层及以上框架柱的截面尺寸为0.6 m×0.6 m ;跨度为9 m 梁的截面尺寸为0.3 m×0.7 m ,跨度为4.5 m 梁的截面尺寸为0.25 m×0.5 m ,跨度为6.3 m 和6.0 m 梁的截面尺寸为0.25 m×0.6 m. RC 框剪结构的前两阶振型阻尼比假定为0.05,并将底层柱下端视为固结. 图2中图1 改进遗传算法阻尼器空间位置寻优程序流程图Fig.1 The flow chart of the optimization procedure for the spa⁃tial position of the damper in the improved genetic algorithm88第 5 期张香成等:基于改进遗传算法的磁流变阻尼器多目标空间优化布置数字为节点编号值及阻尼器位置编号. 建模理论、程序中所采用的MRD 及其在结构中的设置方式和文献[17]中一致,此处不赘述.3.2 地震波选取根据《建筑抗震设计规范》(GB 50011—2010)[19],拟建场地建筑抗震设防烈度为7(0.1g )度、Ⅲ类场地、设计地震分组为第一组,地震动加速度反应谱特征周期为0.45 s ,水平地震影响系数为0.5. 根据场地类别和设计地震分组,选取ATC-63 FEMA P-695规范[20]推荐的22条远场地震记录中的5条水平分量作为时程分析的实震输入,另外选取2条人工波作为补充,将7条地震波加速度时程最大值均设置为220 gal ,分别绘制加速度响应谱曲线、平均谱曲线与设计谱曲线,如图3所示. 与设计反应谱相比,7组地震波平均反应谱在结构主周期点上误差为6.48%(设计反应谱:0.209 3,平均反应谱:0.223 8),满足误差不超过20%的规范要求.4 优化方案验证结构共100个可选位置(每层10个),拟设18个MRD. 经过程序试算,初始种群大小设为300,交叉概率设置为0.6,A 、B 变异概率均设置为0.1,程序可迅速得出最优解. 程序设置为连续进化20代适应度函数值不发生改变或者进化到50代时程序自动停止搜索. 对于超大型建筑结构可参照文献[15],能提高寻优速度和最终优化结果的准确度.4.1 位置优化结果程序运行235 min 计算完毕,多目标优化进程如图4所示. 图4(a )~(c )分别为以层间位移为输出的H 2范数指标、以加速度为输出的H 2范数指标和以多目标评价函数随进化代数的变化. 从图4(c )中可以看出多目标评价函数指标随着进化进程前期迅速增大,中期缓慢上升,后期趋于稳定. 为验证优化结果的正确性,对4种工况进行对比,即:工况一,不设置MRD ;工况二,随机布置;工况三,底层均匀布置;工况四,优化布置方案. 优化方案中X 向MRD 共12个,Y 向6个,为排除各工况X 、Y 向阻尼器数量不同的影响,工况二、工况三中X 、Y 向阻尼器数量调整为12个、6个,并分别计算各工况下以层间位移为输出结构的H 2范数指标值H 2d 和以加速度为输出结构的H 2范数指标值H 2a ,如表2所示.4.2 时程响应对比为了更为明显地对比4种工况下MRD 对结构的减震控制效果,以顶层88号节点为例,7条地震波激励下的水平双向位移时程响应分别取前30 s 进行绘制(RSN-848地震波总时长28 s ,取全程),并分别在位移峰值处局部放大,如图5所示. 从图5中可以明显地看出,无论是在哪一条地震波激励下,工况二、工况三、工况四对应结构顶层88号节点的X 、Y 向位移均明显小于工况一条件下对应时间点下的位移响应,说明在地震波激励下MRD 可明显减小结构的位移响应. 工况二、工况三、工况四在7条地震波激励下结构顶层88号节点X 向最大位移的平均减震率分别为31.97%、34.81%、39.45%,Y向最大位移的平均图2 三维框剪偏心模型(单位:m )Fig.2 3D frame shear eccentric model (unit : m)图3 输入地震波各时程谱及平均谱与设计谱对比Fig.3 Comparison of each time-history spectrum and average spectrum of the input seismic wave with the design spectrum89湖南大学学报(自然科学版)2023 年减震率分别为22.93%、29.95%、32.68%. 该结果与表2各工况范数指标值相对应,说明了基于范数优化控制理论的改进遗传算法空间位置寻优程序的有效性,实现了对阻尼器最佳布置位置的精确定位.4.3 各层最大位移、加速度对比图6为7条地震波作用下框剪结构各层水平双向位移、加速度平均值包络图. 由图6可知,MRD 受控结构各层最大位移、最大加速度响应均小于未控结构. 其中,工况四X 向各层位移明显小于工况二、工况三,Y 向略小于工况二、工况三. 以中间楼层 第五层为例,7条地震波激励下工况一至工况四X 向平均位移分别为54.52 mm 、36.84 mm 、36.12 mm、(a )层间位移指标优化进程 (b )加速指标优化进程 (c )评价函数指标优化进程图4 改进遗传算法多目标优化进程Fig.4 Improved genetic algorithm multi-objective optimization process(a )RSN-169波作用 (b )RSN-1602波作用 (c )RSN-752波作用(d )RSN-848波作用 (e )RSN-1116波作用 (f )人工波1作用(g )人工波2作用图5 7条地震波激励下结构顶层88号节点水平双向位移时程响应Fig.5 Time history response of horizontal bidirectional displacement of No. 88 node on the top floor of the structure under the excitationof seven seismic waves90第 5 期张香成等:基于改进遗传算法的磁流变阻尼器多目标空间优化布置34.88 mm ,相比于工况一,工况二、工况三、工况四分别减少了32.43%、33.75、36.05%;Y 向平均位移分别为23.18 mm 、18.34 mm 、15.18 mm 、14.96 mm ,相比于工况一,工况二、工况三、工况四分别减少了20.88%、34.51%、35.46%. Y 向一至三层位移略小于其他各层,原因是该结构一至三层在Y 向布置了剪力墙,该位置自身刚度足够大,抗剪能力足够强.在地震波激励下,结构刚度和阻尼的增加均会减小位移响应,对于加速度而言,虽然阻尼的增加会减小结构的加速度响应,但刚度的增加会加大结构加速度响应. 因此,MRD 受控结构的加速度减震效果不如位移减震效果明显,甚至在某些时刻加速度会出现增大的现象. 因结构加速度响应结果的复杂性,单层加速度对比有大有小,故采用式(10)对工况二、工况三、工况四的加速度响应进行综合评价.J 1=1n ∑i =1n ()a ix maxa ix 0max +a iy max a iy 0max.(10)式中:J 1为加速度指标;n 为楼层数;a ix max 、a iy max 、a ix 0max 、a iy 0max 分别为X 、Y 向受控和未控状态下各层各节点最大加速度均值.经过计算,工况二、三、四加速度综合指标值J 1分别为1.794、1.778、1.771,说明3种工况相比,工况四的加速度综合减震率最大,工况三次之,工况二相对最小.4.4 结构扭转控制7条地震波激励下结构各层水平双向最大位移对比如表3所示. 从表3可看出工况二、工况三、工况四与工况一相比,X 向扭转略有增加但不明显,其中工况四各层位移比值更接近于1;Y 向工况二扭转加剧,工况三、工况四明显减小,其中工况四各层位移表2 各工况MRD 布置位置及H 2范数值Tab.2 MRD layout position and H 2 norm value of each scheme工况工况一工况二工况三工况四最优布置位置A BA B A B A B ――541228――352257――1023273――194224――945229――936236――231532――5102563――813523――264522――155531――486539――624725――485771――636767――74410310――8751051――3961053H 2d 1.771.040.980.88H 2a89.1675.4774.5873.82(a )位移包络图 (b )加速度包络图图6 框剪结构各层水平双向位移、加速度包络图Fig.6 Horizontal bidirectional displacement and acceleration envelopes of each layer of frame-shear structure91湖南大学学报(自然科学版)2023 年比值更接近于1,最大位移比值顶层1.064,远远小于工况一顶层最大位移比值1.314. 对比分析结果表明:MRD 布置位置不当会加剧结构的扭转响应;空间位置寻优算法计算结果对结构的扭转控制作用显著.4.5 数量优化研究基于结构安全性和设置MRD 带来的经济支出,本节对安设MRD 数量与结构减震性能的关系进行分析. 提出3种评价指标,分别为加速度指标J 1、层间位移角指标J 2、综合评价指标J 3,从多角度综合分析不同数量的阻尼器对结构整体的减震控制效果.J 2=1n ∑i =1n ()θix maxθix 0max +θiy max θiy 0max.(11)J 3=1néëêê∑i =1n (θix maxθix 0max +θiy max θiy 0max )+∑i =1n()a ix maxa ix 0max +a iy max a iy 0maxùûúú.(12)式中:θix max 、θiy max 、θix 0max 、θiy 0max 分别为X 、Y 向受控和未控状态下各层各节点最大层间位移角均值.为充分说明不同数量的阻尼器对结构综合减震率的影响,基于MRD 受控框剪结构三维框剪计算模型和改进遗传算法,对该结构不同数量的阻尼器布置位置进行优化. 优化程序参数设置和上文一致,分别计算设置12、16、20、24、28、32、36个阻尼器的最优分布位置,并计算在7条地震波激励下各工况以及满置下结构的综合评价指标,并取其平均值绘制阻尼器数量对应综合评价指标影响关系曲线,如图7所示. 从图7中可看出:J 1与J 2相比,J 2即层间位移角指标值较小,说明MRD 对结构的位移减震效果强于加速度的减震效果;3种评价指标均随着MRD 数量的增多总体上逐渐减小,减小幅值趋于平缓,说明随着结构中MRD 的不断增加,结构的层间位移角、加速度减震率虽逐渐增大,但减震性价比逐渐减小;通过对比3种评价指标走势发现,当MRD 数量超过18时,3种指标下降率均趋于平缓,在不考虑其他因素的情况下,说明该结构设置18个MRD 减震控制效果最佳.4.6 阻尼器耗能分析图8为RSN-1116地震波作用下X 向2~4号和Y 向6~7号MRD 的阻尼力-位移滞回曲线. 从图8中可以看出,在地震波的作用下,MRD 的滞回环呈椭圆形,且阻尼力幅值随位移幅值的增大而增大,说明表3 7条地震波作用下各层水平双向最大位移比平均值Tab.3 The average value of the horizontal bidirectional maximum displacement ratio of each layer under the action of sevenseismic wavesX 向位移比值楼层(节点/节点)1(12/16)2(20/24)3(28/32)4(36/40)5(44/48)6(52/56)7(60/64)8(68/72)9(76/80)10(84/88)工况一0.9990.9990.9970.9930.9880.9830.9810.9800.9800.980工况二1.0051.0010.9870.9840.9750.9600.9500.9410.9350.932工况三1.0011.0020.9920.9910.9870.9780.9730.9680.9650.964工况四0.9941.0020.9920.9900.9860.9800.9760.9740.9720.971Y 向位移比值楼层(节点/节点)1(13/16)2(21/24)3(29/32)4(37/40)5(45/48)6(53/56)7(61/64)8(69/72)9(77/80)10(85/88)工况一1.0981.1381.1441.2221.2681.2881.3001.3091.3121.314工况二1.1361.2071.2381.3291.3891.4451.4721.4851.4911.491工况三0.9831.0151.0211.0871.1271.1401.1511.1571.1601.162工况四0.9600.9890.9931.0331.0391.0491.0511.0561.0611.064图7 各减震评价指标随MRD 数量变化趋势图Fig.7 Trend chart of each shock absorption evaluation indexwith the number of MRDs92第 5 期张香成等:基于改进遗传算法的磁流变阻尼器多目标空间优化布置MRD 能够稳定地耗能;此外,位移和阻尼力不会在同一时刻达到最大值. 当滞回环中位移幅值小于2 mm 时,MRD 的阻尼力为10 kN ;当滞回环的位移幅值大于 14 mm 时,滞回环中MRD 的阻尼力最大可以达到200 kN.5 结 论1)基于遗传算法提出了“A-B ”型数字编码,推导了MRD 附加刚度和附加阻尼矩阵,采用H 2范数优化控制、代间比较权重等理论提出了改进遗传算法,并开发了MATLAB 程序,实现了对空间结构中MRD 的精确定位和多目标优化布置.2)基于MRD 受控RC 结构三维计算模型程序,采用该算法对10层框剪结构MRD 的布置进行优化研究,结果表明:改进遗传算法优化结果迅速收敛;4种工况中优化方案控制效果最佳,顶层88号节点X 、Y 向减震率分别达39.45%、32.68%,结构扭转得到有效控制.3)对不同数量MRD 优化布置进行分析,结果表明其综合减震指标虽然随着数量的增加而减小,但降低趋势也逐渐减小,该指标可为阻尼器的数量优化提供依据.4)MRD 的滞回环呈椭圆形,且阻尼力幅值随位移幅值的增大而增大,说明MRD 能够稳定地发挥耗能作用.参考文献[1]LI R ,ZHOU M J ,WU M J ,et al .Semi-active predictive controlof isolated bridge based on magnetorheological elastomer bearing[J ].Journal of Shanghai Jiaotong University (Science ),2019,24(1):64-70.[2]董小闵,王陶,王羚杰,等.旋转式磁流变螺旋流动阻尼器扭矩增强研究[J ].湖南大学学报(自然科学版),2021,48(10):39-47.DONG X M ,WANG T ,WANG L J ,et al .Research on torque enhancement of rotary magnetorheological damper based on helical flow [J ].Journal of Hunan University (Natural Sciences ),2021,48(10):39-47.(in Chinese )[3]梅真,郭子雄.磁流变阻尼器减振结构振动台试验与动力可靠性分析[J ].湖南大学学报(自然科学版),2017,44(7):41-48.MEI Z ,GUO Z X .Shaking table test and dynamic reliability analysis of structures with MR dampers [J ].Journal of HunanUniversity (Natural Sciences ),2017,44(7):41-48.(in Chinese )[4]SEID S ,CHANDRAMOHAN S ,SUJATHA S .Optimal design ofan MR damper valve for prosthetic knee application [J ].Journalof Mechanical Science and Technology ,2018,32(6):2959-2965.[5]XU Z D ,XU F H ,CHEN X .Vibration suppression on a platformby using vibration isolation and mitigation devices [J ].NonlinearDynamics ,2016,83(3):1341-1353.[6]TAKEWAKI I .Optimal damper placement for minimum transferfunctions [J ].Earthquake Engineering & Structural Dynamics ,1997,26(11):1113-1124.[7]WU B ,OU J P ,SOONG T T .Optimal placement of energydissipation devices for three-dimensional structures [J ].Engineering Structures ,1997,19(2):113-125.[8]贝伟明,李宏男.磁流变阻尼器在结构减震控制中的位置优化研究[J ].工程抗震与加固改造,2006,28(3):73-78.BEI W M ,LI H N .Study on the optimal placement of magnetorheological damper in structural control [J ].Earthquake Resistant Engineering and Retrofitting ,2006,28(3):73-78.(inChinese )[9]閤东东,朱宏平,陈晓强.相邻结构间被动控制装置的位置优化设计[J ].振动、测试与诊断,2010,30(1):11-15.GE D D ,ZHU H P ,CHEN X Q .Optimal design of passive damper's positions between two adjacent structures [J ].Journalof Vibration ,Measurement & Diagnosis ,2010,30(1):11-15.(in(a )NO.2~4 MRD(b ) NO.6~7 MRD图8 RSN-1116波作用下MRD 的阻尼力-位移滞回曲线Fig.8 Damping force-displacement hysteresis curve of MRDunder the action of RSN-1116 wave93。

电力系统稳定器PSS参数优化整定的研究

电力系统稳定器PSS参数优化整定的研究

关键词:多机电力系统,低频振荡,遗传算法,免疫算法,混合遗传算 法,一体化优化配置
上海交通大学硕士学位论文
2
《电力系统稳定器(PSS)参数优化整定的研究》
STUDY ON THE OPTIMAL ALGORITHM OF PARAMETERS OF POWER SYSTEM STABILIZER
ABSTRACT
China nationwide power system is at its early stage. Due to weak connections between regional power systems, the damping of the whole system is weak, thus low frequency oscillations are easy to be detected. And this is a threat to the safety operating of the whole system. Currently, power system stabilizers (PSS) are widely used to suppress the low frequency oscillations. PSS is an attached equipment of excitation system, and it uses some signals which have something with oscillation to create some additional signals, and make the generator create an additional damping torque. This torque can add damping of mechanical mode of power system and supress low frequency oscillation, and improve small signal stability. Coordination design of PSS in multi machine power systems is a challenging task. It is very important to the stability of power system. Researchers all over the world show their interests on this point, and their research focus on using optimal algorithms to optimize parameters of PSS.

转向节式轮毂电机壳体的结构优化与设计

转向节式轮毂电机壳体的结构优化与设计

120AUTO TIMEAUTOMOBILE DESIGN | 汽车设计转向节式轮毂电机壳体的结构优化与设计1 引言轮毂电机为整车驱动系统核心部件,具有结构紧凑、传动效率高、整车布置灵活和驱动控制独立等优点。

这些特点在汽车上的应用,使得未来新能源汽车在驱动方面又有了一个新的发展方向。

然而这项技术现阶段仍面临着一些亟待解决的问题,比如轮内空间对于电机尺寸的限制、簧下质量增加[1]对车辆性能造成的不利影响等。

因此,开展轮毂电机壳体结构的集成化设计以及轻量化研究具有重要意义。

现已有众多研究者对轮毂电机进行了轻量化研究。

比如Y. Honkura 等[2]使用了材料减重的方法,将轮毂电机原有的定子磁铁材料替换为稀土永磁材料钕铁硼,使得电机减重50%。

Lidija B 等[3]将遗传算法与拓扑优化相结合,对永磁同步电机进行设计,减少磁钢的用量以达到减重的目的。

程重力等[4]提出了电机壳体与车轮通过悬架系统相连的新型轮内动力吸振悬架构型,并对系统分析优化、提升了车辆稳定性。

雷磊[5]将电机定子支撑架和转向节的复合材料进行多目标优化,最后在满足要求的情况下减轻了支撑架的重量。

翟洪飞等[6]以质量优化为目标,对壳体结构非承载区域进行拓扑优化与结构设计,使壳体结构系统质量降低5.5%。

辛雨等[7]以转向节进行拓扑优化分析,并参考拓扑优化分析结果对转向节进行降重优化,优化方案比原方案重量降低11.05%。

以上研究主要是在轮毂电机材料和设计方面进行轻量化设计,而对轮毂电机壳体结构的集成化设计以及轻量化研究较少,本研究首先建立了轮毂电机壳体模型,并对模型进行静应力分析和模态分析,然后通过拓扑优化对其进行轻量化设计。

2 结构设计及相关参数转向节式轮毂电机外壳是将传统轮毂电机外壳与转向节结合设计而成,是集成化后的产物。

参考某汽车公司K 系列纯电动客车的轮毂电机结构进行初步建模,如图1所示为转向节式轮毂电机壳体的初步建模。

图1 轮毂电机结构模型根据车辆参数226/60R18轮胎,轮胎滚动半径为592.19mm 大致可以确定轮毂电机选型,这里选用Protean 公司生产的PD-18型永磁同步电机,悬架为麦弗逊式独立悬架。

遗传算法综述

遗传算法综述

遗传算法综述尘本是心摘要:遗传算法是一种借鉴生物界自然选择和进化机制发展起来的高度有效的随机搜索算法。

近年来,由于遗传算法求解复杂优化问题的巨大潜力及其在工业工程领域的成功应用,这种算法受到了国内外学者的广泛关注。

本文介绍了遗传算法的基本原理和特点,以及在各个领域的应用情况。

关键词:遗传算法,综述,最优化。

A Review of Genetic AlgorithmsChen BenshixinAbstract:Genetic algorithms are considered as a search used in computing to find exact or a approximate solution for optimization and search problems.This article has a review of the genetic algorithm basic principle and the characteristic and its applications.Keywords:genetic algorithm,review,Optimization0前言在人工智能领域中,有不少问题需要在复杂而庞大的搜索空间中寻找最优解或准最优解。

在计算此类问题时,若不能利用问题的固有知识来缩小搜索空间则会产生搜索的组合爆炸。

因此,研究能在搜索过程中自动获取和积累有关搜索空间的知识并自适应地控制搜索过程从而得到最优解的通用搜索算法一直是令人瞩目的课题。

遗传算是这类特别有效的算法之一,它(GeneticAlgorithm,GA)是一类借鉴生物界的进化规律(适者生存,优胜劣汰遗传机制)演化而来的随机搜索算法。

是由美国Michigan大学的J.Holland教授1975年首先提出,它尤其适用于处理传统搜索方法难以解决的复杂的和非线性的问题。

如著名的TSP、背包问题、排课问题等1遗传算法基本原理遗传算法是建立在自然选择和群众遗传学机理基础上的,具有广泛适应性的搜索方法。

布拉酵母高密度发酵培养基及发酵工艺优化

布拉酵母高密度发酵培养基及发酵工艺优化

yield of S. boulardii reached 51.21 g/L in the large scale experiment.
Keywords: Saccharomyces boulardii; neural network; genetic algorithm; enrichment medium; high cell density fermentation
56 2019, Vol.40, No.08
食品科学
※生物工程
布拉酵母高密度发酵培养基及发酵工艺优化
刘开放,席志文,黄林娜,惠丰立*
(南阳师范学院生命科学与技术学院,河南 南阳 473061)
摘 要:为实现布拉酵母高密度培养,对其高密度发酵培养基和发酵工艺进行优化。采用Plackett-Burman试验筛选 培养基中的显著因素,并进行中心组合设计。通过人工神经网络(artificial neural network,ANN)和响应面试验 建立菌体布拉酵母产量与培养基之间的关系模型,利用遗传算法(genetic algorithm,GA)进行全局寻优。结果表 明,ANN模型有较好的数据拟合能力和预测能力,更适合处理复杂的非线性问题。GA优化获得最佳培养基组合: 葡萄糖40.52 g/L、蛋白胨36.8 g/L、玉米浆17.32 g/L、硝酸钾14 g/L、酵母营养盐1.5 g/L、磷酸二氢钾0.6 g/L、硫酸 镁0.8 g/L。利用该培养基进行摇瓶培养,菌体布拉酵母产量可达到8.21 g/L,比优化前提高1.39 倍。在此基础上利 用1 L发酵罐培养确定最佳发酵工艺:温度30 ℃、接种量10%、pH 5.0、溶氧40%。利用50 L发酵罐进行扩大培养, 流加葡萄糖和蛋白胨控制发酵液中葡萄糖3 g/L、氨氮0.06 g/L,菌体布拉酵母产量达到51.21 g/L。 关键词:布拉酵母;神经网络;遗传算法;增殖培养基;高密度培养

Genetic Algorithms for multiple objective vehicle routing

Genetic Algorithms for multiple objective vehicle routing

a r X i v :0809.0416v 1 [c s .A I ] 2 S e p 2008Genetic Algorithms for multiple objective vehicle routingM.J.Geiger∗∗Production and Operations ManagementInstitute 510-Business AdministrationUniversity of HohenheimEmail:mail@martingeiger.deAbstract The talk describes a general approach of a genetic algorithm for multiple objective optimization problems.A particular dominance relation between the individuals of the population is used to define a fitness operator,enabling the genetic algorithm to adress even problems with efficient,but convex-dominated alternatives.The algorithm is implemented in a multilingual computer program,solving vehicle routing problems with time windows under multiple objectives.The graphical user interface of the program shows the progress of the genetic algorithm and the main parameters of the approach can be easily modified.In addition to that,the program provides powerful decision support to the decision maker.The software has proved it´s excellence at the finals of the European Academic Software Award EASA,held at the Keble college/University of Oxford/Great Britain.1The Genetic Algorithm for multiple objective optimization problems Based on a single objective genetic algorithm,different extensions for multiple objective optimization problems are proposed in literature [1,4,8,10]All of them tackle the multiple objective elements by modifying the evaluation and selection operator of the genetic pared to a single objective problem,more than one evaluation functions are considered and the fitness of the individuals cannot be directly calculated from the (one)objective value.Efficient but convex-dominated alternatives are difficult to obtain by integrating the consideredobjectives to a weighted sum (Figure 1).To overcome this problem,an approach of a selection-operator is presented,using only few information and providing a underlying self-adaption technique.In this approach,we use dominance-information of the individuals of the population by calculating for each individual i the number of alternatives ξi from which this individual is dominated.For a population consisting of n pop alternatives we get values of:0≤ξi ≤n pop −1(1)Individuals that are not being dominated by others should receive a higher fitness value than individuals that are being dominated,i.e.:if ξi <ξj →f (i )>f (j )∀i,j =1,...,n pop(2)if ξi =ξj →f (i )=f (j )∀i,j =1,...,n pop (3)ξmax ∗ξi(5) 2The implementation[7]The approach of the genetic algorithm is implemented in a computer program which solves vehicle routing problems with time windows under multiple objectives[6].The examined objectives are:•Minimizing the total distances traveled by the vehicles.•Minimizing the number of vehicles used.•Minimizing the time window violation.•Minimizing the number of violated time windows.The program illustrates the progress of the genetic algorithm and the parameters of the approach of the can simply be controlled by the graphical user interface(Figure2).In addition to the necessary calculations,the obtained alternatives of the vehicle routing problem can easily be compared,as shown in Figure3.For example the alternative with the shortest routes is compared to the alternative having the lowest time window violations.The windows show the routes,travelled by the vehicles from the depot to the customers.The time window violations are visualized with vertical bars at each customer.Red:The vehicle is too late,green:the truck arrives too early.For a more detailed comparison,inverse radar charts and3D-views are available,showing the trade-offbetween the objective values of the selected alternatives(Figure4).Porto,Portugal,July16-20,2001。

求解作业车间调度问题的改进遗传算法

求解作业车间调度问题的改进遗传算法

求解作业车间调度问题的改进遗传算法①陈金广, 马玲叶, 马丽丽(西安工程大学 计算机科学学院, 西安 710048)通讯作者: 陈金广摘 要: 使用遗传算法求解作业车间调度问题时, 为了获得最优解, 提高算法的收敛速度, 提出了改进遗传算法. 算法以最小化最大完工时间为优化目标, 初始化时将种群规模扩大为原来的两倍以增加种群多样性; 迭代时使用新的适应度函数让染色体间更易区分; 通过轮盘赌法完成染色体选择; 用POX (Precedence Operation Crossover)交叉算子完成交叉操作; 用互换法完成变异操作; 通过具有自我调节能力的交叉和变异概率不断地调整概率值来提高算法寻优能力和收敛速度. 仿真结果表明, 改进后的遗传算法收敛速度快, 寻优能力强, 获得的最优解优于标准遗传算法, 更适用于作业车间的加工生产.关键词: 遗传算法; 作业车间调度; 改进; 轮盘赌; 自适应概率引用格式: 陈金广,马玲叶,马丽丽.求解作业车间调度问题的改进遗传算法.计算机系统应用,2021,30(5):190–195. /1003-3254/7921.htmlImproved Genetic Algorithm for Job Shop Scheduling ProblemCHEN Jin-Guang, MA Ling-Ye, MA Li-Li(School of Computer Science, Xi’an Polytechnic University, Xi’an 710048, China)Abstract : When a genetic algorithm is used to solve job shop scheduling, in order to obtain the optimal solution and increase the convergence speed of the algorithm, we propose an improved genetic algorithm in this study. The goal of the algorithm is to minimize the maximum completion time. First, the population size is doubled during the initialization to increase the diversity of the population and a new fitness function is adopted to make chromosome distinguishing easier in the iteration. Then, chromosomes are selected via roulette. Furthermore, crossover is completed by Precedence Operation Crossover (POX) and mutation by Reciprocal Exchange Mutation (REM). Finally, the optimization ability and convergence speed of the proposed algorithm are improved by adjusting the crossover and mutation probability with self-regulation. The simulation results show that the improved genetic algorithm has faster convergence, stronger optimization ability, and better optimal solution than the traditional one and thus it is more suitable for the processing and production in job shops.Key words : genetic algorithm; job shop scheduling; optimization; roulette; adaptive probability1 引言作业车间调度问题的求解目标是得到一个科学、合理的调度方案. 一个科学、合理的调度方案能够有效提高生产效率、降低加工成本. 调度方案主要是确定各工件的加工次序和加工机器, 这是典型的NP-hard 问题[1]. 现代企业间的竞争日趋激烈, 合理安排作业车间调度至关重要. 此外, 工业工程中车间生产规模逐渐扩大, 作业车间调度越来越复杂, 作业车间调度的计算机系统应用 ISSN 1003-3254, CODEN CSAOBNE-mail: Computer Systems & Applications,2021,30(5):190−195 [doi: 10.15888/ki.csa.007921] ©中国科学院软件研究所版权所有.Tel: +86-10-62661041① 基金项目: 陕西省教育厅科研计划(18JK0349)Foundation item: Scientific Research Program of Education Bureau, Shaanxi Province (18JK0349)收稿时间: 2020-09-13; 修改时间: 2020-10-09, 2020-10-28; 采用时间: 2020-10-30; csa 在线出版时间: 2021-04-28190组合改进问题已成为当今工业工程领域发展研究的热点问题之一[2]. 作业车间调度(JSP)都是凭借着工人的工作经验来安排工件的加工顺序, 然而这种方法不仅对工人要求较高, 且会出现安排不合理的情况. 启发式研究方法可以很好的解决这类问题, 常用的主流求解方法有粒子群优化算法、遗传算法、神经网络算法、禁忌搜索算法等[3–8]. 其中遗传算法(Genetic Algorithm, GA)作为一种群智能算法, 具有隐式并行性和全局搜索特性, 是求解作业车间调度问题的有力工具, 因此遗传算法被很多学者用来解决作业车间调度问题, 其在柔性作业车间(FJSP)的应用最为广泛. 根据FJSP的特点, 刘琼等[9]提出了一种改进的交叉变异方法并设计了一种初始解产生机制. 张国辉等[10]采用一种随机和优化相结合的初始化种群方法. 赵诗奎等[11]运用均匀设计原对遗传算法中的初始种群及适应度函数进行设计并将其应用到FJSP中. 对于上述3篇文献, 交叉和变异概率均是通过多次试验和前人经验给定, 没有采用自适应的方法确定. Kacem等[12]和Zhang等[13]分别提出了基于时间表和机器时间数组的机器指派法,取得了较好的成效, 然而, 这两种方法都是基于单步优化指派机器, 最终的指派结果没有定量的全局性衡量指标, 不能保证最终机器指派结果的质量. 不同类型的作业车间所需的调度方法不同, 对于JSP, 何斌等研究了自适应交叉与变异概率提高了算法的寻优能力和收敛速度, 但其染色体总数仅根据初始种群数决定, 染色体多样性低[14]. 李春廷等通过改变遗传算法编码研究以及遗传算子的设计证明其算法的有效性, 但其实验时交叉、变异概率难以确定[15].综上所述, 对于作业车间调度问题存在着染色体多样性低, 收敛速度慢, 遗传参数难以确定的问题. 对此本文提出了一种改进后的遗传算法来解决作业车间调度问题. 改进后的遗传算法在初始化时能够适当扩大种群, 在迭代过程中运用更易区分染色体的适应度函数计算染色体的适应度值, 并且运用能够自适应改变交叉和变异概率的算子调整概率值. 实验结果表明改进后的遗传算法更适用于作业车间调度.2 车间调度问题描述在作业车间中有一批待加工工件, 这批待加工工件中有n个不同的工件, 每个工件均包含m道工序, 需要在m台机器上加工. 加工这批工件需要同时满足以下几点约束条件:1) 所有工件的工序之间都有顺序约束, 即同一工件的各工序间有先后顺序, 需按照工序顺序进行加工;2) 不同工件的加工工序之间没有顺序约束;3) 每道工序只能在一台机器上加工;4) 各工件工序的加工时间由对应的加工机器确定;5) 在同一时刻车间中的同一机器只能加工一道工序;6) 一道工序同一时刻只能在一台机器上加工, 且不能中途中断;7) 不同工件之间优先级是相同的;8) 不考虑机器故障等随机性因素.本文求解目标为确定每台机器上工序的加工顺序和每个工序的开工时间, 使得最大完工时间 最小. 优化目标函数如式(1)所示:C max C ik式中, 表示最大完成时间, 表示工件i在机器k上的完工时间.3 改进算法设计3.1 染色体编码遗传算法的基因编码方式有很多种, 如浮点数编码、二进制编码、整数编码、符号编码、矩阵编码等[16].基因编码在算法中起着至关重要的作用, 编码的方式直接影响遗传算法的运行速度以及能否找到全局最优解[17]. 对于作业车间问题, 本文采用基于工序的实数编码来表示染色体[18], 一个编码后的染色体代表一个车间调度问题的调度方案.对于n个不同工件在m台机器上加工的作业车间调度问题, 采用基于工序的编码方式编码后, 每条染色体均含有n×m个基因, 染色体的基因顺序对应所有工件工序的加工顺序, 即一条染色体代表一个车间调度问题的调度方案. 每条染色体的基因表示如下: 每个工件号在染色体中只能出现m次; 从染色体的第一个基因位到最后一个基因位依次遍历, 若同一工件号出现第k次则表示为此工件的第k道工序, 如染色体[3 3 2 1 2 1], 其中第一个3代表3号工件的第一道工序, 第二个3代表3号工件的第二道工序, 以此类推.3.2 种群初始化首先给定种群的初始值p; 然后根据作业车间一道工序只在一台机器上加工的特点, 生成一个有n×m个2021 年 第 30 卷 第 5 期计算机系统应用191基因的染色体; 最后调用randperm函数处理生成的染色体, 使其循环p次, 得到一个初始种群.3.3 染色体适应度值本文的优化目标是最小化最大完成时间, 因此最大完成时间越小的染色体越优良. 染色体的适应度值是用来区分染色体间的优劣程度, 染色体越优良适应度值越大, 被选中的概率越大, 染色体越差适应度值越低, 被选中的概率越低. 为了更好的体现遗传算法优胜劣汰的准则, 本文采用新的计算染色体适应度值的方法, 使染色体间的区分度更加明显, 优良染色体被选中的概率大.假设现有4个工件, 其加工完成时间分别为[20, 21, 22, 23], 利用取最大完成时间倒数方法得到的适应度值分别为[0.05, 0.0476, 0.0454, 0.0425], 改进后的算法得到的适应度值分别为[1,0.6308, 0.2923, 0]. 从这两组适应度值可看出, 这样设定适应度值可以让最大完成时间小的染色体被多次选择, 最大完成时间最大的染色体被少选择或者不被选择, 拉开了染色体间差距,保障了对优良染色体的选择, 比前者获得优良染色体的概率更大.适应度函数如式(2)所示, 最大完工时间的倒数如式(3)所示:式(2)、式(3)中, i为初始种群中的任意一条染色体, Max表示h(i)的最大值, Min表示h(i)的最小值.在确定好各染色体的适应度值后在采用轮盘赌[19]的方法选择初始种群中的染色体.3.4 交叉与变异交叉操作可以增加种群的多样性, 提高算法的搜索能力, 有利于产生优秀的染色体, 即有利于产生优秀的作业车间调度方案. 鉴于优先工序交叉法POX (Precedence Operation Crossover)能够很好地继承父代优良特征并且子代总是可行的这一特点, 本文选择POX进行交叉操作[20], 具体步骤如下所述:步骤1. 按顺序依次选择种群中的一条染色体作为父代1即Parent1, 随机选择种群中的一条染色体作为父代2即Parent2;步骤2. 将工件集{1, 2, 3, …, n}随机划分为两个非空子集j1, j2;j1={2}j1={2}步骤3. 将Parent1和Parent2中包含工件号分别按其在染色体中的位置复制到子代1即Children1和子代2即Children2中, 将Parent1和Parent2中包含工件号分别按其在染色体中的顺序复制到Children2和Children1中; Children1和Children2这两条染色体即为交叉后的染色体. 如Parent1={3, 2, 2, 3, 1, 1}, Parent2={1, 1, 3, 2, 2, 3}, 对工件集{1, 2, 3}随机划分生成j1={2}, j2={3,1}, 经过POX交叉后得到Children1={1, 2, 2, 1, 3, 3}, Children2={3, 3, 1, 2, 2, 1}.变异操作是小概率发生的, 它能够对染色体产生较小的扰动来增加种群的多样性, 从而产生更能满足目标函数要求的调度方案. 交叉后的染色体在进行小概率的变异操作, 可得到新的染色体, 保持种群多样性.为了保证新得到的染色体编码是可调度的, 避免将不可行调度转换成可行调度, 减少代码运行时间, 本文采用互换法(Reciprocal Exchange Mutation, REM)进行变异操作[21]. 对一个染色体随机选择两个基因号, 将两个基因号上对应的工件号进行互换, 循环i次后可得到变异后的染色体.3.5 交叉与变异概率交叉和变异概率影响着交叉操作和变异操作的发生, 当交叉和变异概率大于由rand函数在(0, 1)之间随机产生的值时, 染色体发生交叉、变异.标准遗传算法的交叉和变异概率通常都是固定不变的值, 一般根据前人经验给定或者根据实验结果给定, 当给定的值较小时会使搜索范围变小, 不利于寻找更优解; 而当给定值较大时则可能导致已有的优良染色体在交叉和变异操作后变差; 在实验中容易出现早熟问题, 即未成熟收敛. 本文确定交叉和变异概率值时采用文献[22]提出的自适应改变交叉和变异概率的方法, 该算法能够在种群进化初期提高进化能力, 降低陷入局部最优的风险, 避免早熟问题的出现, 解决了参数难以确定的问题. 自适应交叉概率函数如式(4)所示,自适应变异概率函数如式(5)所示:计算机系统应用2021 年 第 30 卷 第 5 期192g max g avg 式(4)、式(5)中, 表示当前种群中所有染色体的最大适应度值; 表示当前种群中所有染色体的平均适应度值; 为两个交叉染色体中适应度值较大的值;g 表示选中的变异染色体的适应度值. 算法中k 1, k 2, k 3,k 4的值在(0, 1)范围中选择即可.4 仿真实验程序运行平台为MacOS10. 13.6操作系统上的Matlab_R2018a 软件, 用标准遗传算法和改进算法分别对测试用例库中的FT06和LA01这两个用例进行实验. FT06是一个6×6的测试用例, 即共有6个工件, 每个工件都有6个加工工序, FT06的工件工序集J =[3, 1,2, 4, 6, 5; 2, 3, 5, 6, 1, 4; 3, 4, 6, 1, 2, 5; 2, 1, 3, 4, 5, 6; 3,2, 5, 6, 1, 4; 2, 4, 6, 1, 5, 3]; 加工FT06各个工序所需时间集T =[1, 3, 6, 7, 3, 6; 8, 5, 10, 10, 10, 4; 5, 4, 8, 9, 1, 7;5, 5, 5, 3, 8, 9; 9, 3, 5, 4, 3, 1; 3, 3, 9, 10, 4, 1]; LA01是一个10×5的测试用例, 即共有10个工件, 每个工件都有5个加工工序, LA01的工件工序集J =[2, 1, 5, 4, 3; 1,4, 5, 3, 2; 4, 5, 2, 3, 1; 2, 1, 5, 3, 4; 1, 4, 3, 2, 5; 2, 3, 5, 1,4; 4, 5, 2, 3, 1; 3, 1, 2, 4, 5; 4, 2, 5, 1, 3; 5, 4, 3, 2, 1]; 加工LA01各个工序所需时间集T =[21, 53, 95, 55, 34;21, 52, 16, 26, 71; 39, 98, 42, 31, 12; 77, 55, 79, 66, 77;83, 34, 64, 19, 37; 54, 43, 79, 92, 62; 69, 77, 87, 87, 93;38, 60, 41, 24, 83; 17, 49, 25, 44, 98; 77, 79, 43, 75, 96].此次实验涉及到标准遗传算法和对标准遗传算法的种群初始化, 适应度函数, 交叉、变异概率的确定进行优化后得到的遗传算法. 根据多次实验以及前人实验结果, 标准遗传算法的参数设置为: 迭代次数为200,种群总大小为100, 交叉概率为0.9, 变异概率为0.05;改进后的遗传算法参数设置为: 迭代次数为200, 种群总大小为100, 在初始化时将种群总大小扩大为原来的2倍, 以增加染色体的多样性, 并且由于改进算法中交叉和变异概率是自适应调节的, 无需直接指定, 由式(4)和式(5)确定, 优化后的遗传算法参数设置为迭代次数为200, 种群总大小为100, k 1=k 2=0.9, k 3=k 4=0.1. 运行20次后, 图1和图2分别为使用标准遗传算法与改进后的遗传算法求解FT06和LA01得到的最优解值.从图1和图2中可知, 在20次实验中, 改进后的遗传算法得到的最优解都优于标准遗传算法得到的最优解, 证明改进后的遗传算法的寻优能力强于标准遗传算法. 分析总结图1、图2中的数据, 结合每次实验得到的迭代过程图, 得到结果对比表如表1所示.图1 FT06基准案例最优解2468101214161820LA01 实验次数传统遗传算法优化后遗传算法图2 LA01基准案例最优解表1 基准案例(FT06, LA01)结果对比表项目FT06LA01标准算法本文算法标准算法本文算法最优解5955740666最优解个数212114最优解均值61.556.2774.35671.3最优迭代次数310418平均迭代次数11.638.058.476.6从表1可看出, 用FT06基准案例验证时, 标准算法求得的最优解为59, 20次实验中有2次求得59, 所得解均值是61.5, 当求得最优解为59时, 最优迭代次数为3, 平均迭代次数为11.6; 改进算法求得的最优解为55, 20次实验中有12次求得55, 所得解均值为56.2, 当求得最优解为55时, 最优迭代次数为10, 平均迭代次数为38.05; 用LA01基准案例验证时, 标准算法求得的最优解为740, 20次实验中有1次求得740,所得解均值为774.35, 当求得最优解为740时, 最优迭代次数为4, 平均迭代次数为8.4; 改进算法求得的最优解为666, 20次实验中有14次求得最优解, 最优解平均值为671.3, 当求得最优解为666时, 最优迭代次数2021 年 第 30 卷 第 5 期计算机系统应用193为18, 平均迭代次数为76.6.由此可以看出, 改进后的遗传算法得到的最优解优于标准遗传算法, 解决了标准算法的早熟问题; 同时在进行20次实验后, 改进后的算法得到最优解的次数分别为12和14次大于标准算法得到最优解的次数,解决了标准算法的解的稳定性差问题.运用标准遗传算法对不同基准案例进行验证时,可能需要不同的交叉和变异参数来提高算法的收敛速度和搜索能力. 而交叉和变异概率难以确定, 一般由实验经验或者参考前人的参数设计给出, 给定后的值固定不变. 对于标准遗传算法只改进适应度函数后进行实验验证, 给定交叉概率为0. 9, 变异概率为0. 05, 实验结果如表2所示.表2 改进适应度函数后的实验结果表项目基准案例FT06LA01最优解55666最优迭代次数30130对比表1, 表2可知, 表2中迭代次数均大于表1中本文算法对应的迭代次数. 由此可知, 改进算法中的自适应交叉和变异概率提高算法的收敛速度.由参考文献[23]可知, FT06的最优解为55, LA01的最优解为666. 结合结果分析可知, 不论是FT06基准案例还是LA01基准案例, 改进算法均能得到与基准案例最优解相同的解, 并且在20次实验中, 改进算法得到最优解的次数分别为12和14次, 均高于标准算法; 改进算法在得到最优解时, 其迭代次数分别为10和18, 相比于只改进寻优能力后得到的最优解时的迭代次数, 改进算法可以提高收敛速度.用FT06和LA01验证改进后的遗传算法, 生成的遗传代数图和甘特图分别如图3~图6所示. 由图4可知每台机器上的工序顺序, 以及加工完所有工件花费的最少加工时间55, 由图3可知得到此调度方案只迭代了10次; 由图6可知每台机器上的工序顺序, 以及加工完所有工件花费的最少加工时间666, 由图5可知得到此调度方案只迭代了18次. 仿真结果表明改进后的遗传算法比标准遗传算法收敛速度快, 所得解更稳定, 遗传参数较易确定. 相较于文献[14,15], 优化后的遗传算法的收敛速度更优, 交叉和变异概率采用自适应交叉、变异函数确定, 解决了参数难以确定的问题,证实了改进后遗传算法的有效性和可靠性.图3 FT06遗传代数图图4 FT06甘特图图5 LA01遗传代数图图6 LA01甘特图计算机系统应用2021 年 第 30 卷 第 5 期1945 结束语以最小化最大完成时间为优化目标, 对标准遗传算法进行改进, 以求解目标问题的最优解. 在初始化时扩大种群数量以增加种群多样性, 采用的适应度函数可以增加染色体区分度, 使用POX算法完成交叉操作,产生的子代可以很好地继承父代优良特征并且子代总是可行, 交叉和变异概率采用自适应交叉和变异概率,概率可根据染色体适应度值自动调整. 通过对FT06和LA01进行仿真实验, 所得的实验结果表明改进后的遗传算法解决了标准遗传算法中参数难以确定, 早熟收敛, 所得解不稳定的问题, 提高算法的寻优能力和收敛速度, 比标准遗传算法更适用于作业车间生产. 对于柔性作业车间调度问题, 其每道工序可以在多台机床上加工, 并且在不同的机床上加工所需时间不同, 因此本文算法不适用于柔性作业车间的调度问题, 下一步将研究能够处理柔性作业车间的调度问题.参考文献徐华, 程冰. 混合遗传蝙蝠算法求解单目标柔性作业车间调度问题. 小型微型计算机系统, 2018, 39(5): 1010–1015.[doi: 10.3969/j.issn.1000-1220.2018.05.026]1曹磊, 叶春明, 黄霞. 变邻域杂草算法在多目标柔性作业车间调度中的应用. 计算机应用研究, 2018, 35(1): 150–154, 165. [doi: 10.3969/j.issn.1001-3695.2018.01.031]2Ariyasingha IDID, Fernando TGI. A performance study for the multi-objective ant colony optimization algorithms on the job shop scheduling problem. International Journal of Computer Applications, 2015, 132(14): 1–8. [doi: 10.5120/ ijca2015907638]3Florez E, Gomez W, Lola B. An ant colony optimization algorithm for job shop scheduling problems. International Journal of Artificial Intelligence & Applications, 2013, 4(4): 53–66.4Peng B, Lu ZP, Cheng TCE. A tabu search/path relinking algorithm to solve the job shop scheduling problem.Computers & Operations Research, 2015, 53: 154–164.5Spanos AC, Ponis ST, Tatsiopoulos IP, et al. A new hybrid parallel genetic algorithm for the job-shop scheduling problem. International Transactions in Operational Research, 2014, 21(3): 479–499. [doi: 10.1111/itor.12056]6Nasiri MM. A modified ABC algorithm for the stage shop scheduling problem. Applied Soft Computing, 2015, 28: 81–89. [doi: 10.1016/j.asoc.2014.12.001]7Karimi-Nasab M, Modarres M, Seyedhoseini SM. A self-8adaptive PSO for joint lot sizing and job shop scheduling with compressible process times. Applied Soft Computing, 2015, 27: 137–147. [doi: 10.1016/j.asoc.2014.10.015]刘琼, 张超勇, 饶运清, 等. 改进遗传算法解决柔性作业车间调度问题. 工业工程与管理, 2009, 14(2): 59–66. [doi:10.3969/j.issn.1007-5429.2009.02.011]9张国辉, 高亮, 李培根, 等. 改进遗传算法求解柔性作业车间调度问题. 机械工程学报, 2009, 45(7): 145–151.10赵诗奎, 方水良, 顾新建. 柔性车间调度的新型初始机制遗传算法. 浙江大学学报(工学版), 2013, 47(6): 1022–1030. 11Kacem I, Hammadi S, Borne P. Approach by localization and multiobjective evolutionary optimization for flexible job-shop scheduling problems. IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), 2002, 32(1): 1–13. [doi: 10.1109/TSMCC.2002.1009117]12Zhang GH, Gao L, Shi Y. An effective genetic algorithm for the flexible job-shop scheduling problem. Expert Systems with Applications, 2011, 38(4): 3563–3573. [doi: 10.1016/ j.eswa.2010.08.145]13何斌, 张接信, 张富强. 一种求解作业车间调度问题的改进遗传算法. 制造业自动化, 2018, 40(8): 113–117. [doi: 10.3969/ j.issn.1009-0134.2018.08.029]14李春廷. 基于遗传算法的作业车间调度问题研究[硕士学位论文]. 秦皇岛: 燕山大学, 2007.15张国辉, 吴立辉. 求解柔性作业车间调度的GATOC混合方法. 计算机工程与应用, 2015, 51(23): 266–270. [doi: 10.3778/j.issn.1002-8331.1502-0171]16王雷, 蔡劲草, 李明. 基于正交试验的遗传算法参数优化.工程技术版, 2016, 16(2): 81–85.17玄登影, 王福林, 高敏慧, 等. 一种改进适应度函数的遗传算法. 数学的实践与认识, 2015, 45(16): 232–238.18李兢尧, 黄媛, 王军强, 等. 求解扩展双资源约束作业车间调度的分支种群遗传算法. 西北工业大学学报, 2016, 34(4): 634–640. [doi: 10.3969/j.issn.1000-2758.2016.04.013]19张雪艳, 梁工谦, 董仲慧. 基于改进自适应遗传算法的柔性作业车间调度问题研究. 机械制造, 2016, 54(6): 1–4, 33.[doi: 10.3969/j.issn.1000-4998.2016.06.001]20黄俊生, 广晓平. 关于生产车间作业优化调度效率仿真研究. 制造业自动化, 2017, 39(10): 95–99. [doi: 10.3969/j.issn.1009-0134.2017.10.022]21郑先鹏, 王雷. 面向作业车间调度问题的遗传算法改进. 河北科技大学学报, 2019, 40(6): 496–502. [doi: 10.7535/hbkd.2019yx06006]22王明. 基于改进遗传算法的作业车间调度问题研究[硕士学位论文]. 芜湖: 安徽工程大学, 2019.232021 年 第 30 卷 第 5 期计算机系统应用195。

A Genetic Algorithm for the Multi-Pickup and Delivery Problem with time windows

A Genetic Algorithm for the Multi-Pickup and Delivery Problem with time windows

The PDPTW is a variant of VRPTW where in addition to the existence of time constraints, this problem implies a set of customers and a set of suppliers geographically located. Every routing must also satisfy the precedence constraints to ensure that a customer should not be visited before his supplier. [Psaraftis, H.N., 1983] A dynamic approach for resolve the 1-PDP without and with time windows was developed by Psaraftis, H.N considering objective function as a minimization weighting of the total travel time and the non-customer satisfaction. [Psaraftis, H.N., 1980] Jih, W and al have developed an approach based on the hybrid genetic algorithms to solve the 1PDPTW, aiming to minimize combination of the total cost and total waiting time. [Jih, W and al., 1999] Another genetic algorithm was developed by Velasco, N and al to solve the 1-PDP bi-objective in which the total travel time must be minimized while satisfy in prioritise the most urgent requests. In this literature, the method proposed to resolve this problem is based on a No dominated Sorting Algorithm (NSGA-II). [Velasco, N and al., 2006] Kammarti, R and al deal the 1-PDPTW, minimizing the compromise between the total travel distance, total waiting time and total tardiness time, using an evolutionary algorithm with Special genetic operators, tabu search to provide a set of viable solutions. [Kammarti, R and al., 2004] [Kammarti, R and al 2005a] This work have been extended, in proposing a new approach based on the use of lower bounds and Pareto dominance method, to minimize the compromise between the total travel distance and total tardiness time. [Kammarti, R and al 2006] [Kammarti, R and al 2007] About the m-PDPTW, Sol, M and al have proposed a branch and price algorithm to solve the mPDPTW, minimizing the vehicles number required to satisfy all travel demands and the total travel distance. [Sol, M and al., 1994] Quan, L and al have presented a construction heuristic based on the integration principle with the objective function, minimizing the total cost, including the vehicles fixed costs and travel expenses that are proportional to the travel distance. [Quan, L and al., 2003] A new metaheuristic based on a tabu algorithm, was developed by Li, H and al to solve the mPDPTW. [Li, H and al., 2001] Li, H and al have developed a “Squeaky wheel” method to solve the m-PDPTW with a local search. [Li, H and al., 2002] A genetic algorithm was developed by Harbaoui Dridi, I and al dealing the m-PDPTW to minimize the total travel distance and the total transport cost. [Harbaoui Dridi, I and al., 2008]

基于遗传算法求解作业车间调度问题本科毕业设计论文

基于遗传算法求解作业车间调度问题本科毕业设计论文

基于遗传算法求解作业车间调度问题摘要作业车间调度问题(JSP)简单来说就是设备资源优化配置问题。

作业车间调度问题是计算机集成制造系统(CIMS)工程中的一个重要组成部分,它对企业的生产管理和控制系统有着重要的影响。

在当今的竞争环境下,如何利用计算机技术实现生产调度计划优化,快速调整资源配置,统筹安排生产进度,提高设备利用率已成为许多加工企业面临的重大课题。

近年来遗传算法得到了很大的发展,应用遗传算法来解决车间调度问题早有研究。

本文在已有算法基础上详细讨论了染色体编码方法并对其进行了改进。

在研究了作业车间调度问题数学模型和优化算法的基础上,将一种改进的自适应遗传算法应用在作业车间调度中。

该算法是将sigmoid函数的变形函数应用到自适应遗传算法中,并将作业车间调度问题中的完工时间大小作为算法的评价指标,实现了交叉率和变异率随着完工时间的非线性自适应调整,较好地克服了标准遗传算法在解决作业车间调度问题时的“早熟”和稳定性差的缺点,以及传统的线性自适应遗传算法收敛速度慢的缺点。

以改进的自适应遗传算法和混合遗传算法为调度算法,设计并实现了作业车间调度系统,详细介绍了各个模块的功能与操作。

最后根据改进的编码进行遗传算法的设计,本文提出了一种求解车间作业调度问题的改进的遗传算法,并给出仿真算例表明了该算法的有效性。

关键词:作业车间调度;遗传算法;改进染色体编码;生产周期Solving jopshop scheduling problem based ongenetic algorithmAbstractSimply speaking, the job shop scheduling problem(JSP) is the equipment resources optimization question. Job Shop Scheduling Problem as an important part of Computer IntegratedManufacturing System (CIMS) engineering is indispensable, and has vital effect onproduction management and control system. In the competion ecvironment nowadays, how touse the assignments quickly and to plan production with due consideration for all concernedhas become a great subject for many manufactory.In recent years,the genetic algorithms obtained great development it was used to solve the job shop scheduling problem early.This paper discusses the chromosome code method in detail based on the genetic algorithms and make the improvement on it. Through the research on mathematics model of JSP and optimized algorithm, theimproved adaptive genetic algorithm (IAGA) obtained by applying the improved sigmoidfunction to adaptive genetic algorithm is proposed. And in IAGA for JSP, the fitness ofalgorithm is represented by completion time of jobs. Therefore, this algorithm making thecrossover and mutation probability adjusted adaptively and nonlinearly with the completiontime, can avoid such disadvantages as premature convergence, low convergence speed andlow stability. Experimental results demonstrate that the proposed genetic algorithm does notget stuck at a local optimum easily, and it is fast in convergence, simple to be implemented. the job shop scheduling system based on IAGA and GASH is designed andrealized, and the functions and operations of the system modules are introduced detailedly. In the end ,according to the code with improved carries on the genetic algorithms desing, this paper offer one improved genetic algorithms about soloving to the job shop scheduling problem, and the simulated example has indicated that this algorithm is valid.Keywords: jop shop scheduling; genetic algorithm; improvement chromosome code; production cycl毕业设计(论文)原创性声明和使用授权说明原创性声明本人郑重承诺:所呈交的毕业设计(论文),是我个人在指导教师的指导下进行的研究工作及取得的成果。

利用遗传算法进一步优化CBR案例推理模型

利用遗传算法进一步优化CBR案例推理模型
[3 ]
和综合权重的 CBR 案例预测算法 , 并应用到企业 财务危机预警 ( Financial Distress Prediction,FDP ) 系 统中, 实验结果表明该算法有效避免了非关键特征对 案例推理的干扰, 提高了预测效率。 在后续研究中通过实验和论证发现 , 灰色关联度 分析只考虑了各特征属性与案例推理结果之间的相 关性, 却忽略了现实中存在的一种情况, 即有些特征 虽然单独来看对推理结果的贡献度并不高 , 很难作为 关键指标被选中, 但当其与其他指标结合后, 对案例 推理结果的贡献度却完全达到关键指标选择的要求 。 因此, 在计算案例相似度时有必要采用其他手段对案 例特征遴选步骤做进一步优化, 从全局出发选择搜索 出最优特征组合, 继而提高整个案例推理模型的预测 效率。
Optimizing CBR Model Using Genetic Algorithm
2 SHEN Qi1,
( 1. School of Information Technology,Jinling Institute of Technology,Nanjing 211169 ,China; 2. Jiangsu Information Analysis Engineering Laboratory,Nanjing 211169 ,China) Abstract: Case based reasoning ( CBR ) is a kind of reasoning technology in the field of artificial intelligence in recent years. Feature selection is the hot topic and the difficulty in CBR technology. In order to get optimal feature subset in feature selection process,this paper combines gray correlation degree analysis with genetic algorithm ( GA ) ,taking the gray correlation analysis result as the initial population for GA heuristic search,and proposes a new GACBR case reasoning optimization model. The test results show this model is effective to improve the CBR forecast accuracy. Key words: case based reasoning; genetic algorithm; feature selection; gray correlation analysis; optimization

A Genetic Algorithm for database query optimization

A Genetic Algorithm for database query optimization

Query optimization has been an active area of research ever since the beginning of the development of relational DBMSs. Good surveys on query optimization and other related issues can be found elsewhere 9, 10]. In the relational model, data is organized in relations, i.e., collections of similar pieces of information called tuples. Relations are the data units that are referenced by queries and processed internally. A strategy to answer a query q is a sequence of relational algebra operators applied to the relations in the database that eventually produces the answer to q. The cost of a strategy is the sum of the costs of processing each individual operator. Among these operators, the most di cult one to process and optimize is the join, denoted by 1. It essentially takes as input two relations, combines their tuples one-by-one based on certain criteria, and produces a new relation as output. Join is associative and commutative, so the number of alternative strategies to answer a query grows exponentially with the number of joins in it. Moreover, a DBMS usually supports a variety of join methods (algorithms) for processing individual joins and a variety of indices (data structures) for accessing individual relations, which increase the options even further. Thus, all query optimization algorithms primarily deal with join queries. These are the focus of this paper as well. In current applications, each query usually involves a small number of relations, e.g., less than 10. Hence, although exponential in the number of joins, the size of the strategy space is manageable. Most commercial database systems use variations of the same query optimization algorithm, which performs an exhaustive search over the space of alternative strategies, and whenever possible, uses heuristics to reduce the size of that space. This algorithm was rst proposed for the System{R prototype DBMS 14], so we refer to it as the System{R algorithm. Current query optimization techniques are inadequate

pde计算里的f4取值的解释

pde计算里的f4取值的解释

PDE计算里的F4取值的解释随着科技和数学的发展,偏微分方程(PDE)在自然科学和工程科学的研究中扮演着日益重要的角色。

PDE的求解过程中,F4参数的取值对结果有着重要的影响。

1. F4参数的定义F4参数是PDE求解器中的一个重要参数,它通常用于控制数值计算的精度和稳定性。

F4参数的取值范围通常为0到1之间,其中0代表低精度但计算速度较快,1代表高精度但计算速度较慢。

2. F4参数对计算精度的影响在PDE求解过程中,F4参数的取值直接影响着计算的精度。

当F4参数取值较小(接近0)时,计算过程中会采用较大步长,导致计算结果的精度较低。

相反,当F4参数取值较大(接近1)时,计算过程中会采用较小步长,从而提高计算的精度。

3. F4参数对计算稳定性的影响除了计算精度外,F4参数的取值还会影响计算的稳定性。

一般来说,当F4参数取值较小时,计算过程可能更容易发散或产生数值不稳定的情况;而当F4参数取值较大时,计算过程则更容易保持稳定。

4. F4参数的最佳取值针对不同的求解问题,F4参数的最佳取值可能会有所不同。

在实际应用中,通常需要进行一定的试验和调整,才能找到最适合具体问题的F4参数取值。

5. 总结F4参数作为PDE求解过程中的重要控制参数,其取值直接影响着计算的精度和稳定性。

在实际应用中,需要根据具体问题的特点和要求来合理选择F4参数的取值,以获得满足精度和稳定性要求的计算结果。

对F4参数的理解和优化,也是提高PDE求解效率和准确性的重要途径。

本文简要介绍了PDE计算里的F4参数的取值及其影响,希望能对相关领域的研究和应用有所启发,提高PDE求解的效率和可靠性。

6. F4参数在实际工程中的应用除了对计算精度和稳定性有直接影响外,F4参数在实际工程中还扮演着重要的角色。

在工程领域的PDE求解中,通常需要综合考虑计算时间、精度要求和计算资源的限制,以找到最适合的F4参数取值。

在流体动力学的仿真计算中,针对不同的流场问题,可能会选择不同的F4参数取值来平衡计算速度和精度。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Using Genetic Algorithm for High-Level SynthesisSoheil AminzadehSchool of Electrical and Computer Engineering, University of TehranTehran, Irans.aminzadeh@ece.ut.ac.irAbstractThe main contribution of this paper is using bio-inspired algorithms for high-level synthesis. There are number of heuristic algorithms for digital circuit synthesis, which can solve scheduling and binding problems, but these algorithms are time consuming for large designs and they cannot consider several constraints simultaneously. In this paper three genetic algorithms (GA) are developed to solve scheduling, module binding and register allocation problems, and then a co-evolutionary strategy merges the result of these three solutions, targeting improvement of design parameters.1. IntroductionAdvances in VLSI technology and proceeding to deep sub-micron technologies, have complicated the synthesis parameters. Conventional synthesis algorithms were designed to optimize the area and delay of synthesized circuit. Today some new design parameters optimization such as power consumption and testability optimization are of importance.High-level synthesis is concerned with the design and implementation of circuits from a behavioral description subject to a set of goals and constraints [1]. Two main tasks perform in high level synthesis, scheduling and mapping. Scheduling assigns operations to clock cycles and resources allocation or mapping is concerned with assigning operations and variables to hardware. During allocation, registers are allocated to store variables, operations assigned to functional units, and connections which are multiplexers, busses, or a combination of both, are used for interconnection [2]. As scheduling and mapping are co.-related problems, the methods which solve them sequentially may not always provide the optimal solutions. For optimal results, these two problems must be considered simultaneously. Several optimization techniques can be used for this purpose such as integer.-linear programming (ILP) formulation, simulated annealing, and stochastic evolution. These solutions may not be optimal and the runtime become unacceptable as the problem size increases [3].Bio-inspired algorithms such as ant colony, neural network and genetic algorithms are the other approaches that can be used as synthesis techniques. This paper uses genetic algorithm to provide the ability of solving both problems concurrently. One of the advantages of genetic algorithm is reduction in the time to obtain optimal solution. It is also a general purpose solving method that can be used in a wide class of problems. Although genetic algorithm is not guarantee that always gives the optimum solution but it usually gives an approximately good solution in surprisingly short time.Next part will be overview of some basic concepts such as, high-level synthesis and genetic algorithms. Section 3 introduces the proposed genetic-based scheduling, module binding, and registers allocation. Section 4 presents some experimental results, and finally the last section concludes the work.2. Basic Concepts2.1. High-Level SynthesisThe behavior of a circuit can be specified using a high-level hardware description language, and it should be translated into a suitable intermediate format, e.g. a flow graph. In the behavioral specification, a basic block is defined as a straight line sequence of statements that contains no branches [4]. Hence, a data flow graph (DFG) can be derived from the basic block where each node is associated with an operation and each arc is associated with a variable. Data dependency is implied by the direction of an arc. Figure 1(a) shows a simple example of a basic block with three statements, and figure 1(b) shows its corresponding DFG.As mentioned before, there are two major tasks in high.-level synthesis, i.e. scheduling and allocation. Scheduling determines the execution order of operations, while allocation assigns hardware to perform the operations. In general, both scheduling and binding are plete problems. Therefore, there are a number ofheuristics developed to obtain optimal or nearly optimal solutions by coping with each of themseparately.(a) (b)Figure 1. (a) Sample of behavioral code, (b)Corresponding DFGA. SchedulingScheduling assigns each operation to one ormore clock cycles, and specifies cycle-by-cyclebehavior of a circuit. The result of scheduling iscalled scheduled DFG (SDFG). For an operationo in DFG, o-earliest and o-latest denotes theearliest and latest possible cycle time, which ocan executed in, respectively. The number ofpredecessors in DFG determines the o-earliest,but o-latest depends on user defined maximumlatency. Figure 2(a), shows a sample DFG,suppose that each operation has one cycle delayand the maximum desired latency is four clockcycles. Table in figure 2(b) shows the earliestand the latest time for scheduling of eachoperation. As mentioned before, there arenumber of heuristic deterministic algorithms forscheduling, such as ASAP (As Soon AsPossible), ALAP (As Late As Possible), ListScheduling and Force-Directed Scheduling.These algorithms are described completely in[4].B. Resource AllocationGiven a scheduled DFG, resource allocationassigns hardware elements like registers to storevalues, functional unit to perform operations, andinterconnections to carry signals, to produce aregister transfer level architecture [4].A constructive algorithm proposed by Kurdahi[4] showed that greedy Left Edge Algorithm(LEA) originally used for the channel routingproblem can be applied to allocate the minimumnumber of registers and functional units for anacyclic SDFG. There are also number of graphtheoretic approaches to solve the resourceallocation problem, such as clique partitioningand bipartite matching. Some of these problemsare originally NP-complete, but somepolynomial heuristic algorithms exist for solvingthem approximately [4].(a)(b)Figure 2. (a) Sample DFG, (b) earliest and latest possibletime for scheduling2.2. Genetic AlgorithmThis part, introduce genetic algorithm as anevolutionary computation technique. Geneticalgorithm is a class of probabilistic optimizationalgorithms, which are inspired by biologicalevolution process, and use the concepts ofNatural selection and genetic inheritance ofDarwin (1859). These algorithms wereintroduced first time by John Holland [5].Genetic algorithm is particularly useful for hardproblems where little is known about theunderlying search space. Although geneticalgorithm is not guarantee that always gives theoptimum solution but it usually gives anapproximately good solution in a short time.For solving problems using genetic algorithm, aset of possible solutions are forming initialchromosomes population. Specification of howoptimum of each solution is done by giving anumerical amount, called fitness, to eachmember of population. A Genetic algorithmmaintains a population of candidate solutions forthe problem at hand, and makes it evolve byapplying a set of stochastic operators [5]. Someof these stochastic operators are described below.•Selection: replicates the mostsuccessful solutions found inpopulation at the rate proportional totheir relative quality.•Recombination: decompose twodistinct solutions and then randomlymixes their parts to form novelsolutions.•Mutation: randomly perturbs acandidate solution.Genetic Algorithm Nature Optimization problem EnvironmentFeasible solutions Individuals living in thatenvironmentSolutions quality (fitness function) Individual’s degree of adaptation to its surrounding environmentA set of feasible solution A population of organisms(species)Stochastic operators Selection, recombinationand mutation in natureevolutionary processIteratively applying a set of stochastic operators on a set of feasible solutions Evolutions of populations to suit their environmentTable 1. A Metaphor between genetic algorithm and nature[5]3. Using Genetic Algorithm in High-Level SynthesisAs pointed before, first step in solving a problem, using genetic algorithm, is modeling solutions with a population of chromosomes, and then defining fitness to each chromosome according to its closeness to optimum solution. Next step is applying stochastic operators to this population and creating new generations of chromosomes. It has proved that generations gradually converge to optimum solutions [5].In this paper for solving synthesis problem with genetic algorithm, three genetic algorithms are implemented.One of these genetic algorithms is used for DFG scheduling. In this genetic algorithm, chromosomes are integer arrays, such that the length of arrays is equal to the number of DFG nodes and S[i] = j means, the i th node is scheduled at j th cycle. The initial population for this problem is the number of chromosomes of genes. Each gene is a random integer value between ASAP and ALAP time of corresponding node.In this problem, fitness evaluator gives better fitness to the chromosome with better latency, so the last generation contains numbers of SDFG1s, which are good from the latency point of view. Other genetic algorithms are used for hardware allocation for a given SDFG. One of them allocates functional units for each node and the other one, maps each variable of SDFG to a register. Chromosomes of both genetic algorithms are integer arrays. The lengths of module allocation chromosomes are equal to the number of nodes of SDFG, and this length in register allocation problem is equal to number of variables. In these problems fitness evaluator defines fitness of the chromosomes according to their area overhead, which means the lower the area overhead, the larger the fitness is.The results of these three problems contain the number of possible synthesis results, which are all optimum from the point of view of delay and area overhead.As mentioned before, the best synthesis result from the delay and area point of view may not be the best result for low power consumption, testability or other synthesis parameters.Here we propose a co-evolutionary algorithm to merge the results of evolutionary problems to each other, targeting improvement of synthesis parameters. This algorithm gets a number of the results of scheduling and hardware allocation, which are all suboptimum. Co-Evolutionary algorithms choose one of each that maximizes Equation 1.F = ∑λi(pi)αi (Equation 1)Where pi is a synthesis parameter. With the proper choice of λis and αis, the proper weight can be provided for pi, according to the synthesis target.4. Experimental ResultsThis section reports the results of our experiments on effect of changing some of genetic algorithm parameters such as mutation rate and crossover rate on the synthesis result. Our results based on “UTS” [6] a new synthesis tool, which is designed and implemented by students of University of Tehran.UTS is implemented in JAVA platform. It builds DFG from Verilog input files and then it performs scheduling and binding with selected algorithms. Some of the heuristic algorithms for scheduling and binding are implemented in UTS.It also contains a built-in GA package which can be used to solve the optimization problems.1 Scheduled Data Flow GraphMutation: Standard mutation operators randomly modify the individual genes in the chromosome to produce genes with a different value [2]. UTS GA Package implements such a mutation. In our experiment the mutation isperformed in each five generations period, which means in after each five generations a random number of chromosomes between 0 to 30% of the population can be mutate.Crossover : Conventional evolutionary crossover combines the characteristics of two parent chromosomes to produce child chromosomes with different, hopefully better characteristics. The crossover operation can be performed in three models. In the first model, one gene is selected from two chromosomes randomly and values are exchanged. In the second model, two chromosomes from a randomly selected position are combined. In the third model, values of all peer.to.peer genes in two chromosomes are exchanged. In fact, to ensure randomness of the operation, first, the chromosomes of the population are shuffled and then crossover operator is performed on every two chromosomes of population. UTS GA package one point crossover is implemented (second model) and in each generation, a random number of chromosomes, between 0 and 40% of population are selected to perform crossover. Selection: UTS performs fitness proportionate selection with roulette wheel method. It means that individual i has a probabilityto be chosen. Figure 3 shows this method. ∑jj f i f )(/)(Figure 3. roulette wheel method for selection in UTSFigure 4, 5, and 6, shows the diagrams of population average fitness for scheduling, module binding and register binding in some ofthe run samples of genetic algorithms.Figure 4. Convergence of average fitness for GAschedulingFigure 5. Convergence of average fitness for GA modulebindingFigure 6. Convergence of average fitness for GA registersAllocationFigure 6 shows that register binding was trapped in a local optimum but a mutation reclaim it and then it converged to actual global optimum.5. Conclusion and Future WorkThis paper introduced genetic algorithm and gives a new approach to use this technique in high-level synthesis. It also offers the use of co-evolutionary strategy to improve other parameter of synthesis.Researchers at University of Tehran are working on improvement of other parameters of synthesis, such as testability.AcknowledgementEspecial thanks to Dr. Saeed Safari for helpful discussion and comments on this work.References[1] M. C. McFarland, A. C. Parker, and R. Camposano, “The High.Level Synthesis of Digital Systems,” Proc. of the IEEE, vol. 78, No. 2, pp.310.318, Feb 1990.[2] A. Banaiyan, H. Esmaeelzadeh, and S. Safari, “Co.Evolutionary Scheduling and Mapping for High.Level Test Synthesis”, IEEE ICEIS’06, Islamabad, Pakistan, pp. 269.273, Apr. 2006.[3] S. Devadas and A. Richard Newton, “Algorithms for hardware allocation in data path synthesis,” IEEE Transactions on Computer.Aided Design, pp. 768.781, 1989.[4] Mike Tien, Chien Lee, High Level Test Synthesis of Digital VLSI Circuits, Artech House Press, 1997.[5] “Introduction to Genetic Algorithms”, available on http://ece.ut.ac.ir/classpages/[6] University of Tehran Synthesis Tool (Version 0.9) design and implement by Soheil Aminzadeh in University of Tehran, Tehran.Iran (s.aminzadeh@ece.ut.ac.ir )。

相关文档
最新文档