蚁群算法外文翻译

蚁群算法外文翻译
蚁群算法外文翻译

本科毕业设计(论文) 外文翻译(附外文原文)

学院:信息科学与工程学院

课题名称:蚁群优化算法研究

专业(方向):网络工程

班级:网络工程10-1班

学生:梁绍仲

指导教师:董明刚

日期: 2014年4月6日

蚁群算法外文翻译

中文:

起源

蚁群算法(ant colony optimization, ACO),又称蚂蚁算法,是一种用来在图中寻找优化路径的机率型算法。它由Marco Dorigo于1992年在他的博士论文中提出,其灵感来源于蚂蚁在寻找食物过程中发现路径的行为。蚁群算法是一种模拟进化算法,初步的研究表明该算法具有许多优良的性质.针对PID控制器参数优化设计问题,将蚁群算法设计的结果与遗传算法设计的结果进行了比较,数值仿真结果表明,蚁群算法具有一种新的模拟进化优化方法的有效性和应用价值。

原理

各个蚂蚁在没有事先告诉他们食物在什么地方的前提下开始寻找食物。当一只找到食物以后,它会向环境释放一种信息素,吸引其他的蚂蚁过来,这样越来越多的蚂蚁会找到食物!有些蚂蚁并没有象其它蚂蚁一样总重复同样的路,他们会另辟蹊径,如果令开辟的道路比原来的其他道路更短,那么,渐渐地更多的蚂蚁被吸引到这条较短的路上来。最后,经过一段时间运行,可能会出现一条最短的路径被大多数蚂蚁重复着。

为什么小小的蚂蚁能够找到食物?他们具有智能么?设想,如果我们要为蚂蚁设计一个人工智能的程序,那么这个程序要多么复杂呢?首先,你要让蚂蚁能够避开障碍物,就必须根据适当的地形给它编进指令让他们能够巧妙的避开障碍物,其次,要让蚂蚁找到食物,就需要让他们遍历空间上的所有点;再次,如果要让蚂蚁找到最短的路径,那么需要计算所有可能的路径并且比较它们的大小,而且更重要的是,你要小心翼翼的编程,因为程序的错误也许会让你前功尽弃。这是多么不可思议的程序!太复杂了,恐怕没人能够完成这样繁琐冗余的程序。

然而,事实并没有你想得那么复杂,上面这个程序每个蚂蚁的核心程序编码不过100多行!为什么这么简单的程序会让蚂蚁干这样复杂的事情?答案是:简单规则的涌现。事实上,每只蚂蚁并不是像我们想象的需要知道整个世界的信息,他们其实只关心很小范围内的眼前信息,而且根据这些局部信息利用几条简单的规则进行决策,这样在蚁群这个集体里,复杂性的行为就会凸现出来。这就是人工生命、复杂性科学解释的规律!那么,这些简单规则是什么呢?

1、范围:

蚂蚁观察到的范围是一个方格世界,蚂蚁有一个参数为速度半径(一般是3),那么它能观察到的范围就是3*3个方格世界,并且能移动的距离也在这个范围之内。

2、环境:

蚂蚁所在的环境是一个虚拟的世界,其中有障碍物,有别的蚂蚁,还有信息素,信息素有两种,一种是找到食物的蚂蚁洒下的食物信息素,一种是找到窝的蚂蚁洒下的窝的信息素。每个蚂蚁都仅仅能感知它范围内的环境信息。环境以一定的速率让信息素消失。

3、觅食规则:

在每只蚂蚁能感知的范围内寻找是否有食物,如果有就直接过去。否则看是否有信息素,并且比较在能感知的范围内哪一点的信息素最多,这样,它就朝信息素多的地方走,并且每只蚂蚁都会以小概率犯错误,从而并不是往信息素最多的点移动。蚂蚁找窝的规则

和上面一样,只不过它对窝的信息素做出反应,而对食物信息素没反应。

4、移动规则:

每只蚂蚁都朝向信息素最多的方向移,并且,当周围没有信息素指引的时候,蚂蚁会按照自己原来运动的方向惯性的运动下去,并且,在运动的方向有一个随机的小的扰动。为了防止蚂蚁原地转圈,它会记住最近刚走过了哪些点,如果发现要走的下一点已经在最近走过了,它就会尽量避开。

5、避障规则:

如果蚂蚁要移动的方向有障碍物挡住,它会随机的选择另一个方向,并且有信息素指引的话,它会按照觅食的规则行为。

6、播撒信息素规则:

每只蚂蚁在刚找到食物或者窝的时候撒发的信息素最多,并随着它走远的距离,播撒的信息素越来越少。

根据这几条规则,蚂蚁之间并没有直接的关系,但是每只蚂蚁都和环境发生交互,而通过信息素这个纽带,实际上把各个蚂蚁之间关联起来了。比如,当一只蚂蚁找到了食物,它并没有直接告诉其它蚂蚁这儿有食物,而是向环境播撒信息素,当其它的蚂蚁经过它附近的时候,就会感觉到信息素的存在,进而根据信息素的指引找到了食物。

问题:

说了这么多,蚂蚁究竟是怎么找到食物的呢?在没有蚂蚁找到食物的时候,环境没有有用的信息素,那么蚂蚁为什么会相对有效的找到食物呢?这要归功于蚂蚁的移动规则,尤其是在没有信息素时候的移动规则。首先,它要能尽量保持某种惯性,这样使得蚂蚁尽量向前方移动(开始,这个前方是随机固定的一个方向),而不是原地无谓的打转或者震动;其次,蚂蚁要有一定的随机性,虽然有了固定的方向,但它也不能像粒子一样直线运动下去,而是有一个随机的干扰。这样就使得蚂蚁运动起来具有了一定的目的性,尽量保持原来的方向,但又有新的试探,尤其当碰到障碍物的时候它会立即改变方向,这可以看成一种选择的过程,也就是环境的障碍物让蚂蚁的某个方向正确,而其他方向则不对。这就解释了为什么单个蚂蚁在复杂的诸如迷宫的地图中仍然能找到隐蔽得很好的食物。

当然,在有一只蚂蚁找到了食物的时候,大部分蚂蚁会沿着信息素很快找到食物的。但不排除会出现这样的情况:在最初的时候,一部分蚂蚁通过随机选择了同一条路径,随着这条路径上蚂蚁释放的信息素越来越多,更多的蚂蚁也选择这条路径,但这条路径并不是最优(即最短)的,所以,导致了迭代次数完成后,蚂蚁找到的不是最优解,而是次优解,这种情况下的结果可能对实际应用的意义就不大了。

蚂蚁如何找到最短路径的?这一是要归功于信息素,另外要归功于环境,具体说是计算机时钟。信息素多的地方显然经过这里的蚂蚁会多,因而会有更多的蚂蚁聚集过来。假设有两条路从窝通向食物,开始的时候,走这两条路的蚂蚁数量同样多(或者较长的路上蚂蚁多,这也无关紧要)。当蚂蚁沿着一条路到达终点以后会马上返回来,这样,短的路蚂蚁来回一次的时间就短,这也意味着重复的频率就快,因而在单位时间里走过的蚂蚁数目就多,洒下的信息素自然也会多,自然会有更多的蚂蚁被吸引过来,从而洒下更多的信息素……;而长的路正相反,因此,越来越多地蚂蚁聚集到较短的路径上来,最短的路径就近似找到了。也许有人会问局部最短路径和全局最短路的问题,实际上蚂蚁逐渐接近全局最短路的,为什么呢?这源于蚂蚁会犯错误,也就是它会按照一定的概率不往信息素高

的地方走而另辟蹊径,这可以理解为一种创新,这种创新如果能缩短路途,那么根据刚才叙述的原理,更多的蚂蚁会被吸引过来。

引申

跟着蚂蚁的踪迹,你找到了什么?通过上面的原理叙述和实际操作,我们不难发现蚂蚁之所以具有智能行为,完全归功于它的简单行为规则,而这些规则综合起来具有下面两个方面的特点:

1、多样性

2、正反馈

多样性保证了蚂蚁在觅食的时候不置走进死胡同而无限循环,正反馈机制则保证了相对优良的信息能够被保存下来。我们可以把多样性看成是一种创造能力,而正反馈是一种学习强化能力。正反馈的力量也可以比喻成权威的意见,而多样性是打破权威体现的创造性,正是这两点小心翼翼的巧妙结合才使得智能行为涌现出来了。

引申来讲,大自然的进化,社会的进步、人类的创新实际上都离不开这两样东西,多样性保证了系统的创新能力,正反馈保证了优良特性能够得到强化,两者要恰到好处的结合。如果多样性过剩,也就是系统过于活跃,这相当于蚂蚁会过多的随机运动,它就会陷入混沌状态;而相反,多样性不够,正反馈机制过强,那么系统就好比一潭死水。这在蚁群中来讲就表现为,蚂蚁的行为过于僵硬,当环境变化了,蚂蚁群仍然不能适当的调整。

既然复杂性、智能行为是根据底层规则涌现的,既然底层规则具有多样性和正反馈特点,那么也许你会问这些规则是哪里来的?多样性和正反馈又是哪里来的?我本人的意见:规则来源于大自然的进化。而大自然的进化根据刚才讲的也体现为多样性和正反馈的巧妙结合。而这样的巧妙结合又是为什么呢?为什么在你眼前呈现的世界是如此栩栩如生呢?答案在于环境造就了这一切,之所以你看到栩栩如生的世界,是因为那些不能够适应环境的多样性与正反馈的结合都已经死掉了,被环境淘汰了!

蚁群算法的特点

1) 蚁群算法是一种自组织的算法。在系统论中,自组织和它组织是组织的两个基本分类,其区别在于组织力或组织指令是来自于系统的内部还是来自于系统的外部,来自于系统内部的是自组织,来自于系统外部的是他组织。如果系统在获得空间的、时间的或者功能结构的过程中,没有外界的特定干预,我们便说系统是自组织的。在抽象意义上讲,自组织就是在没有外界作用下使得系统墒增加的过程(即是系统从无序到有序的变化过程)。蚁群算法充分休现了这个过程,以蚂蚁群体优化为例子说明。当算法开始的初期,单个的人工蚂蚁无序的寻找解,算法经过一段时间的演化,人工蚂蚁间通过信息激素的作用,自发的越来越趋向于寻找到接近最优解的一些解,这就是一个无序到有序的过程。

2) 蚁群算法是一种本质上并行的算法。每只蚂蚁搜索的过程彼此独立,仅通过信息激素进行通信。所以蚁群算法则可以看作是一个分布式的多agent系统,它在问题空间的多点同时开始进行独立的解搜索,不仅增加了算法的可靠性,也使得算法具有较强的全局搜索能力。

3) 蚁群算法是一种正反馈的算法。从真实蚂蚁的觅食过程中我们不难看出,蚂蚁能够最终找到最短路径,直接依赖于最短路径上信息激素的堆积,而信息激素的堆积却是一个正反馈的过程。对蚁群算法来说,初始时刻在环境中存在完全相同的信息激素,给予系统一个微小扰动,使得各个边上的轨迹浓度不相同,蚂蚁构造的解就存在了优劣,算法采用的

反馈方式是在较优的解经过的路径留下更多的信息激素,而更多的信息激素又吸引了更多的蚂蚁,这个正反馈的过程使得初始的不同得到不断的扩大,同时又引导整个系统向最优解的方向进化。因此,

正反馈是蚂蚁算法的重要特征,它使得算法演化过程得以进行。

(4) 蚁群算法具有较强的鲁棒性。相对于其它算法,蚁群算法对初始路线要求不高,即蚁群算法的求解结果不依赖子初始路线的选择,而且在搜索过程中不需要进行人工的调整。其次,蚁群算法的参数数目少,设置简单,易于蚁群算法应用到其它组合优化问题的求解。

蚁群优化算法最初用于解决TSP问题,经过多年的发展,已经陆续渗透到其他领域中,如,图着色问题、大规模集成电路设计、通讯网络中的路由问题以及负载平衡问题、车辆调度问题等。蚁群算法在若干领域己获得成功的应用,其中最成功的是在组合优化问题中的应用。

在网络路由处理中,网络的流量分布不断变化,网络链路或结点也会随机地失效或重新加入。蚁群的自身催化与正向反馈机制正好符合了这类问题的求解特点,因而,蚁群算法在网络领域得到一定应用。蚁群觅食行为所呈现出的并行与分布特性使得算法特别适合于并行化处理。因而,实现算法的并行化执行对于大量复杂的实际应用问题的求解来说是极具潜力的。

在某群体中若存在众多无智能的个体,它们通过相互之间的简单合作所表现出来的智能行为即称为集群智能(Swarm Intelligence)。互联网上的交流,不过是更多的神经元连接(人脑)通过互联网相互作用的结果,光缆和路由器不过是轴突和突触的延伸。从自组织现象的角度上看,人脑的智能和蚁群也没有本质上的区别,单个神经元没有智能可言,单个蚂蚁也没有,但是通过连接形成的体系,是一个智能体。

英文:

Origin

Ant colony algorithm (ant colony optimization, ACO), also known as ant algorithm is a probability -based algorithm is used to find the optimal path in the graph . It in his doctoral thesis proposed by Marco Dorigo in 1992 , inspired by the behavior of the path of the ants found in the process of looking for food . Ant colony algorithm is a simulated evolutionary algorithm , preliminary studies show that the algorithm has many excellent properties. Optimization design for PID controller parameters , the results of the results of the ant colony algorithm design and genetic algorithm are compared , the numerical simulation the results show that ant colony algorithm is a new kind of simulated evolutionary optimization effectiveness and value.

Principle

Individual ants do not tell them in advance what the food in the context of local start looking for food. When one find food after it is released into the environment of a pheromone to attract other ants to come , so the ants will find more and more food ! Some ants and other ant not as total repeating the same way, they will open a way , so that if the open road original shorter than the other way , then gradually more ants are attracted to a shorter path to this . Finally , after a period of time to run , there may be a shortest path is repeated most of the ants.

Why tiny ants to find food ? They have the intelligence it? Imagine if we want to design an artificial ant program , then this program how complicated you want it? First, you have to let the ants can avoid obstacles , we must give it compiled into the terrain under the appropriate instructions so that they can cleverly avoiding obstacles , and secondly, to make the ants find food , they need to get them to traverse space on all points ; again, if you want the ants to find the shortest path , then you need to calculate all possible paths and compare their size, but more importantly, you have to careful programming , because the wrong procedure may make you come to naught. This is such an incredible program ! Too complicated , I am afraid that no one can accomplish this tedious redundancy program .

However , the truth is not as complicated as you think , at the core of this program , but the program code for each of more than 100 lines of ants ! Why make such a simple procedure ants do such complicated things ? The answer is: the emergence of simple rules. In fact, each ant is not as we imagine the whole world need to know the information , they are actually only interested in the immediate

information within a small range , and make decisions based on partial information on the use of these few simple rules , so in this colony collectively , the complexity of behavior will stand out . This is artificial life , complexity science to explain the law ! So, what are these simple rules be?

1 range:

Ants observed range is a square in the world , there is an argument for the speed of ants radius ( usually 3 ) , then it is observed in the range of 3 * 3 grid world, and is also able to move from this range inside .

2 Environment:

Ants where the environment is a virtual world , where there are obstacles , there are other ants , as well as pheromones, information known two types of ants to find food food shed pheromones , one is to find the nest ant nest shed pheromone . Each ant is only able to perceive environmental information within its range. Environment at a rate to allow pheromone disappears.

3 foraging rules:

Looking at the range of each ant can sense whether there is food , if there is direct in the past. Otherwise, see if there are pheromones , and compare within the scope of what point can perceive pheromones at most , so it toward the pheromone many places to go, and the ants are a small probability of making mistakes , which is not to information Su moved up to a point . Ant nest to find the rules and the same as above , but its nest react to pheromones , pheromone and food did not respond .

NOTE 3: This small probability of mistakes is critical, ie ant pheromones have less likely to move toward the place , which makes the ants have the opportunity to develop new path , thereby making it possible to find a shorter path than the current path. The mistake in the algorithm implemented by the wheel choice .

4 mobile rules

Each ant pheromones direction toward shifting up , and when no pheromone guidelines around when the ants in the direction of movement of the inertia of their original motion continues , and there is a small random perturbations in the direction of movement. To prevent ants standing around , it will remember what has recently gone through a point , if we find the next point to go has gone through recently, it will try to avoid .

5 obstacle avoidance rules

If you ant to be moving in the direction obstructions blocking , it will randomly choose another direction, and there are pheromones guidelines , then it will follow the rules of foraging behavior .

6 sowing pheromone rules

Each ant nest at just the time to find food or pheromones send up to Caesar , and with it go far away , sow less pheromone .

According to several of these rules, and there is no direct relationship between the ants , but each ant and environmental interaction occurs , and through this link pheromone , in fact, the correlation between individual ants up . For example, when an ant find food , it does not directly tell the other ants have food here , but to spread the pheromone environment , while other ants pass near it, will feel the presence of pheromones , then according to guidelines pheromone found food.

Problem:

Having said that , what is how ants find food for it? In the absence of ants find food when the environment is not useful pheromone , then why would a relatively effective ants find food? This is attributed to the ants move rules , especially in the absence of pheromone when moving rules. First, it can be possible to maintain a certain inertia , such that the ants moved forward as far as possible ( starting direction of the front of a stationary random ) , and not place unnecessary vibration or spin ; secondly , have a certain randomness ant , even with a fixed direction, but it can not go on like particles as linear motion , but there is a random disturbance . This makes the ants in motion with a certain purpose, try to keep the original direction , but there are new temptations , especially when it comes to an obstacle when it will instantly change direction, which can be seen as a process of selection , but also environment so that an obstacle ant right direction , while the other direction is not right. This explains why a single ant on the map , such as complex maze of hidden still be able to find very good food .

Of course, there is an ant to find food when most ants will soon find food along the pheromone . But do not rule out such a situation : In the beginning, part of the ants by randomly selecting the same path , this path as the ant pheromone release more and more, more ants choose this path , but this is not the best path ( i.e., the shortest) , and therefore , resulted in the completion of iterations , the ants found is not the optimal solution, but sub-optimal solution in this case may be the result of the practical significance of the insignificant.

Ants how to find the shortest path ? This is thanks to the pheromone , the other thanks to the environment , specifically the computer clock . Pheromone many places where ants apparently after many ants gathered thus there will be more to come . Suppose there are two paths leading to food from the nest , the beginning, the number of ants walking two roads as much ( or more than a long way ants , it does not matter ) . When the ants along a road to reach the terminal will immediately returned, so that a short round-trip one -way ants short of time , this also means that the frequency of repeated soon , and thus the number of ants in the unit of time , the more traveled ,

pheromones naturally shed more naturally have more ants are attracted, thus shed more pheromones ...... ; rather a long way on the contrary, therefore , more and more ants gathered over the short path up, shortest path found on the approximation . Maybe someone will ask questions of local and global shortest path shortest , in fact, the ants gradually approaching global shortest , and why ? This stems from the ants will make mistakes , that is, it will not go to high places pheromone and another way to go according to a certain probability , which can be understood as a kind of innovations that if we can shorten the road , then in accordance with the principles just described , more ants are attracted.

Extended

Follow the trail of ants you find what ? Through narrative and practice the principles of the above , we find that the reason why the ants with intelligent behavior , entirely due to its simple rules of behavior , and these rules together with the characteristics of the following two areas:

1,diversity

2,the positive feedback

Diversity ensures that when foraging ants did not mention a dead end and an infinite loop , positive feedback mechanism will ensure a relatively good information can be saved. We can diversity be seen as a creative ability, and positive feedback is an enhanced ability to learn . Positive feedback can also be likened to the power of authoritative opinion , but diversity is reflected in the creative authority to break , it is the unique combination of these two makes intelligent behavior cautiously emerged out.

Extended in terms of evolution, social progress, human nature is actually innovation are inseparable from these two things , the diversity of the system to ensure the ability to innovate, to ensure that the excellent characteristics of positive feedback can be strengthened, both to be just right combined . If diversity surplus , which is the system is too active, which is equivalent to the random movement of ants too much , it will fall into chaos ; By contrast , diversity is not enough positive feedback mechanism is too strong , then the system is like a backwater. In terms of this colony on the performance of the ant 's behavior is too stiff , when the environment changes , the ants are still not properly adjusted .

Given the complexity of the underlying intelligent behavior is based on the emergence of the rule , since the underlying rules of the diversity and characteristics of positive feedback , then maybe you will ask where these rules come from? Diversity and positive feedback is where they come from ? My own opinion : the rules of nature and evolution . The evolutionary nature of the basis of the speakers also reflected in the diversity and unique combination of positive feedback . This ingenious combination is why? Why in the world presented in front of you is so lifelike it? The answer lies in the environment created all of this,

the reason why you see the life of the world , because the combination of positive feedback and those who can not adapt to the diversity of the environment are already dead, the environment has to be eliminated !

Characteristics of ant colony algorithm

(1) ant colony algorithm is a self-organizing algorithms. In systems theory, self- organization and its organization is the organization 's two basic categories , the difference is that the organization is an internal force or organizational instruction from the system or from outside the system, from within the system is self-organization, from the his organization is external to the system . If the system or to obtain a functional structure of the process space of time, there is no specific interventions outside , we say the system is self- organized . In an abstract sense, since no outside organization is in effect making the system entropy increases under the process ( that is, the system change process from disorder to order ) . Ant colony algorithm is now fully off this process to ant colony optimization examples. When the algorithm starts early , to find a single solution disorderly artificial ants , the algorithm through evolution over time, between artificial ants through the action of hormones , spontaneous growing tendency to find some solution close to the optimal solution , which is a disorder to order process.

(2) ant colony algorithm is an inherently parallel algorithms. Each ant search process independent of each other and only communicate through pheromones . So the ant colony algorithm can be seen as a distributed multi-agent system , it also began to conduct independent multi-point solution to search the problem space , not only increases the reliability of the algorithm, but also makes the algorithm has strong global search capability .

(3) ant colony algorithm is an algorithm positive feedback . Real ants from foraging process , we can easily see that the ants can finally find the shortest path , the shortest path is directly dependent on the accumulation of pheromones , hormones and the accumulation of information but it is a process of positive feedback . Ant colony algorithm , the initial time the same pheromones exist in the environment , giving the system a tiny perturbations , making each side of the track is not the same concentration , the solution structure of ants on the merits of the existence of a feedback manner algorithm used after the solution is in the optimum path leaving more pheromones , hormones and more information and attract more ants, the positive feedback process allows different initial constantly expanding , while guiding the whole system evolution toward the optimal solution . Therefore ,

Positive feedback is an important feature of ant algorithm , which makes the algorithm evolution to proceed.

(4)ant colony algorithm has strong robustness. Compared with other algorithms ,

ant colony algorithm for the initial route less demanding that the results of the ant colony algorithm for solving the child does not depend on the initial route selection , but also in the search process does not require manual adjustments. Second, the small number of parameters ant colony algorithm , set up a simple , easy-to- colony algorithm is applied to solve other combinatorial optimization problems .

Ant colony optimization algorithm for solving TSP problem initially , after years of development, has gradually penetrated into other areas , such as graph coloring problem, LSI design , communication network routing problems , and load balancing issues , vehicle scheduling problem and so on. Ant colony algorithm has been a success in several areas of application , which is the most successful application of combinatorial optimization problems.

In the network routing process, changing the distribution of network traffic , network link or node failure or will randomly re- join. Autocatalytic and positive feedback mechanisms colony fits the characteristics of this kind of problem solving , and therefore , the ant colony algorithm applied in a certain network area . Parallel and distributed characteristics exhibited by ant foraging behavior makes the algorithm is particularly suitable for parallel processing . Thus, the parallel execution of algorithms for a large number of practical applications to solve complex problems is highly promising .

In a group , if there are many non- intelligent individuals , they cooperate with each other by simply demonstrated between intelligent behavior is called swarm intelligence (Swarm Intelligence). Exchanges on the Internet , but is more neuronal connections ( the brain ) results , cable and router interaction via the Internet , but is an extension of axons and synapses . From the point of view of self-organization , intelligence and ant brain is also no difference in essence , a single neuron is no intelligence at all, there is no single ant , but the system is connected via the formation of an agent .

银行家算法例题——四步走解题

银行家算法例题 系统中原有三类资源A、B、C和五个进程P1、P2、P3、P4、P5,A资源17,B资源5,C资源20。当前(T0时刻)系统资源分配和进程最大需求如下表。 1、现在系统T0时刻是否处于安全状态? 2、是否可以允许以下请求? (1)T1时刻:P2 Request2=(0,3,4) (2)T2时刻:P4 Request4=(2,0,1) (3)T3时刻:P1 Request1=(0,2,0) 注:T0 T1 T2 T3时刻是前后顺序,后一时刻是建立在前一时刻的基础上。

解:由题设可知Need=Max-Allocation AvailableA=17-(2+4+4+2+3)=2(原有-分配) 同理AvailableB=3,AvailableC=3 可得T0时刻资源分配表如下所示(表中数据顺序均为A B C): 1、判断T0时刻是否安全,需要执行安全算法找安全序列,过程如下表: T0时刻能找到一个安全序列{P4,P3,P2,P5,P1},故T0时刻系统处于安全状态。

2、判断T1 T2 T3时刻是否满足进程请求进行资源分配。 (1)T1时刻,P2 Request2=(0,3,4) //第一步判断条件 ①满足Request2=(0,3,4)<=Need2(1,3,4) ②不满足Request2=(0,3,4)<=Available(2,3,3) 故系统不能将资源分配给它,此时P2必须等待。 (2)T2时刻,P4 Request4=(2,0,1) //第一步判断条件①满足Request4=(2,0,1)<=Need4(2,2,1) ②满足Request4=(2,0,1)<=Available(2,3,3) //第二步修改Need、Available、Allocation的值 Available=Available-Request4= (0,3,2) Allocation4=Allocation4+Request4=(4,0,5) Need4=Need4-Request4=(0,2,0) //第三步执行安全算法,找安全序列 (注解:先写上work,其初值是系统当前进行试分配后的Available(0,3,2) ,找五个进程中Need小于work的进程,比如Need4<=Work满足,则将P4写在第一行的最前面,同时写出P4的Need和Allocation,以此类推)

施工组织设计外文翻译

摘要: 建筑工程在施工过程中,施工组织方案的优劣不仅直接影响工程的质量,对工期及施工过程中的人员安全也有重要影响。施工组织是项目建设和指导工程施工的重要技术经济文件。能调节施工中人员、机器、原料、环境、工艺、设备、土建、安装、管理、生产等矛盾,要对施工组织设计进行监督和控制,才能科学合理的保证工程项目高质量、低成本、少耗能的完成。 关键词: 项目管理施工组织方案重要性 施工组织设计就是对工程建设项目整个施工过程的构思设想和具体安排,是施工组织管理工作的核心和灵魂。其目的是使工程速度快、质量好、效益高。使整个工程在施工中获得相对的最优效果。 1.编制施工组织设计重要性的原因 建筑工程及其施工具有固定性与流动性、多样性与单件性、形体庞大与施工周期长这三对特点。所以,每一建筑工程的施工都必须进行施工组织设计。这是因为:其它一般工业产品的生产都有着自己固定的、长期适用的工厂。而建筑施工具有流动性的特点,不可能建立这样的工厂,只能是当每一个建筑工程施工时,建立一个相应的、临时性的,如同工厂作用性质的施工现场准备,即工地。施工单件性特点与施工流动性特点,决定了每一建筑工程施工都要选择相应的机具和劳动力组织。选择施工方法、拟定施工技术方案及其劳动力组织和机具配置,统称为施工作业能力配置。施工周期的特点,决定了各种劳动力、机具和众多材料物资技术的供应时间也比较长,这就产生了与施工总进度计划相适应的物资技术的施工组织设计内容。由此可见,施工组织设计在项目管理中是相当重要的。 2.施工组织设计方案的重要性 建筑产品作为一种商品,在项目管理中工程质量在整个施工过程中起着极其重要的作用。工程建设项目的施工组织设计与其工程造价有着密切的关系。施工组织设计基本的内容有:工程概况和施工条件的分析、施工方案、施工工艺、施工进度计划、施工总平面图。还有经济分析和施工准备工作计划。其中,施工方案及施工工艺的确定更为重要,如:施工机械的选择、水平运输方法的选择、土方的施工方法及主体结构的施工方法和施工工艺的选择等等,均直接影响着工程预算价格的变化。在保证工程质量和满足业主使用要求及工期要求的前提下,优化施工方案及施工工艺是控制投资和降低工程项目造价的重要措施和手段。 2.1施工组织方案在很大程度上影响着工程质量,因此合理的施工组织方案不仅是确保工程顺利完成的基础,也是工程安全的依据。施工组织设计是建筑工

外文翻译---采用遗传算法优化加工夹具定位和加紧位置

附录 Machining fixture locating and clamping position optimization using genetic algorithms Necmettin Kaya* Department of Mechanical Engineering, Uludag University, Go¨ru¨kle, Bursa 16059, Turkey Received 8 July 2004; accepted 26 May 2005 Available online 6 September 2005 Abstract Deformation of the workpiece may cause dimensional problems in machining. Supports and locators are used in order to reduce the error caused by elastic deformation of the workpiece. The optimization of support, locator and clamp locations is a critical problem to minimize the geometric error in workpiece machining. In this paper, the application of genetic algorithms (GAs) to the fixture layout optimization is presented to handle fixture layout optimization problem. A genetic algorithm based approach is developed to optimise fixture layout through integrating a finite element code running in batch mode to compute the objective function values for each generation. Case studies are given to illustrate the application of proposed approach. Chromosome library approach is used to decrease the total solution time. Developed GA keeps track of previously analyzed designs; therefore the numbers of function evaluations are decreased about 93%. The results of this approach show that the fixture layout optimization problems are multi-modal problems. Optimized designs do not have any apparent similarities although they provide very similar performances. Keywords: Fixture design; Genetic algorithms; Optimization 1. Introduction Fixtures are used to locate and constrain a workpiece during a machining operation, minimizing workpiece and fixture tooling deflections due to clamping and cutting forces are critical to ensuring accuracy of the machining operation. Traditionally, machining fixtures are designed and manufactured through trial-and-error, which prove to be both expensive and time-consuming to the manufacturing process. To ensure a workpiece is manufactured according to specified dimensions and tolerances, it must be appropriately located and clamped, making it imperative to develop tools that will eliminate costly and time-consuming trial-and-error designs. Proper

银行家算法例题

银行家算法例题 假定系统中有五个进程{P0,P1,P2,P3,P4} 和三类资源{A ,B,C},各种资源的数量分别为10、5、7,在T0 时刻的资源分配情况 (1)T0时刻的安全性 利用安全性算法对T0时刻的资源分配情况进行分析 (2)P1请求资源:P1发出请求向量Request1(1,0,2),系统按银行家算法进行检查 ①Request1(1,0,2)≤Need1(1,2,2) ②Request1(1,0,2)≤Available1(3,3,2) ③系统先假定可为P1分配资源,并修改Available ,Allocation1和Need1向量,由此形成 资源情况 进程 Max Allocation Need Available A B C A B C A B C A B C P0 7 5 3 0 1 0 7 4 3 3 3 2 P1 3 2 2 2 0 0 1 2 2 P2 9 0 2 3 0 2 6 0 0 P3 2 2 2 2 1 1 0 1 1 P4 4 3 3 0 0 2 4 3 1 资源情况 进程 Work A B C Need A B C Allocation A B C Work+Allocatio n A B C Finish P1 3 3 2 1 2 2 2 0 0 5 3 2 TRUE P3 5 3 2 0 1 1 2 1 1 7 4 3 TRUE P4 7 4 3 4 3 1 0 0 2 7 4 5 TRUE P2 7 4 5 6 0 0 3 0 2 10 4 7 TRUE P0 10 4 7 7 4 3 0 1 0 10 5 7 TRUE

土木工程外文文献翻译

专业资料 学院: 专业:土木工程 姓名: 学号: 外文出处:Structural Systems to resist (用外文写) Lateral loads 附件:1.外文资料翻译译文;2.外文原文。

附件1:外文资料翻译译文 抗侧向荷载的结构体系 常用的结构体系 若已测出荷载量达数千万磅重,那么在高层建筑设计中就没有多少可以进行极其复杂的构思余地了。确实,较好的高层建筑普遍具有构思简单、表现明晰的特点。 这并不是说没有进行宏观构思的余地。实际上,正是因为有了这种宏观的构思,新奇的高层建筑体系才得以发展,可能更重要的是:几年以前才出现的一些新概念在今天的技术中已经变得平常了。 如果忽略一些与建筑材料密切相关的概念不谈,高层建筑里最为常用的结构体系便可分为如下几类: 1.抗弯矩框架。 2.支撑框架,包括偏心支撑框架。 3.剪力墙,包括钢板剪力墙。 4.筒中框架。 5.筒中筒结构。 6.核心交互结构。 7. 框格体系或束筒体系。 特别是由于最近趋向于更复杂的建筑形式,同时也需要增加刚度以抵抗几力和地震力,大多数高层建筑都具有由框架、支撑构架、剪力墙和相关体系相结合而构成的体系。而且,就较高的建筑物而言,大多数都是由交互式构件组成三维陈列。 将这些构件结合起来的方法正是高层建筑设计方法的本质。其结合方式需要在考虑环境、功能和费用后再发展,以便提供促使建筑发展达到新高度的有效结构。这并

不是说富于想象力的结构设计就能够创造出伟大建筑。正相反,有许多例优美的建筑仅得到结构工程师适当的支持就被创造出来了,然而,如果没有天赋甚厚的建筑师的创造力的指导,那么,得以发展的就只能是好的结构,并非是伟大的建筑。无论如何,要想创造出高层建筑真正非凡的设计,两者都需要最好的。 虽然在文献中通常可以见到有关这七种体系的全面性讨论,但是在这里还值得进一步讨论。设计方法的本质贯穿于整个讨论。设计方法的本质贯穿于整个讨论中。 抗弯矩框架 抗弯矩框架也许是低,中高度的建筑中常用的体系,它具有线性水平构件和垂直构件在接头处基本刚接之特点。这种框架用作独立的体系,或者和其他体系结合起来使用,以便提供所需要水平荷载抵抗力。对于较高的高层建筑,可能会发现该本系不宜作为独立体系,这是因为在侧向力的作用下难以调动足够的刚度。 我们可以利用STRESS,STRUDL 或者其他大量合适的计算机程序进行结构分析。所谓的门架法分析或悬臂法分析在当今的技术中无一席之地,由于柱梁节点固有柔性,并且由于初步设计应该力求突出体系的弱点,所以在初析中使用框架的中心距尺寸设计是司空惯的。当然,在设计的后期阶段,实际地评价结点的变形很有必要。 支撑框架 支撑框架实际上刚度比抗弯矩框架强,在高层建筑中也得到更广泛的应用。这种体系以其结点处铰接或则接的线性水平构件、垂直构件和斜撑构件而具特色,它通常与其他体系共同用于较高的建筑,并且作为一种独立的体系用在低、中高度的建筑中。

操作系统之调度算法和死锁中的银行家算法习题答案

操作系统之调度算法和死锁中的银行家算法习 题答案 集团文件发布号:(9816-UATWW-MWUB-WUNN-INNUL-DQQTY-

1. 有三个批处理作业,第一个作业 10:00 到达,需要执行 2 小时;第二个作业在10:10到达,需要执行 1 小时;第三个作业在 10:25 到达,需要执行 25 分钟。分别采用先来先服 务,短作业优先和最高响应比优先三种调度算法,各自的平均周转时间是多少?解: 先来先服务: (结束时间=上一个作业的结束时间+执行时间 周转时间=结束时间-到达时间=等待时间+执行时间) 按到达先后,执行顺序:1->2->3 短作业优先: 1)初始只有作业1,所以先执行作业1,结束时间是12:00,此时有作业2和3; 2)作业3需要时间短,所以先执行; 3)最后执行作业2 最高响应比优先:

高响应比优先调度算法既考虑作业的执行时间也考虑作业的等待时间,综合了先来先服务和最短作业优先两种算法的特点。 1)10:00只有作业1到达,所以先执行作业1; 2)12:00时有作业2和3, 作业2:等待时间=12:00-10:10=110m;响应比=1+110/60=2.8; 作业3:等待时间=12:00-10:25=95m,响应比=1+95/25=4.8; 所以先执行作业3 3)执行作业2 2. 在一单道批处理系统中,一组作业的提交时刻和运行时间如下表所示。试计算一下三种 作业调度算法的平均周转时间 T 和平均带权周转时间 W。 ( 1)先来先服务;( 2)短作业优先( 3)高响应比优先 解: 先来先服务: 作业顺序:1,2,3,4 短作业优先: 作业顺序:

蚁群算法蚂蚁算法中英文对照外文翻译文献

蚁群算法蚂蚁算法中英文对照外文翻译文献(文档含英文原文和中文翻译)

翻译: 蚁群算法 起源 蚁群算法(ant colony optimization, ACO),又称蚂蚁算法,是一种用来在图中寻找优化路径的机率型算法。它由Marco Dorigo于1992年在他的博士论文中提出,其灵感来源于蚂蚁在寻找食物过程中发现路径的行为。蚁群算法是一种模拟进化算法,初步的研究表明该算法具有许多优良的性质.针对PID 控制器参数优化设计问题,将蚁群算法设计的结果与遗传算法设计的结果进行了比较,数值仿真结果表明,蚁群算法具有一种新的模拟进化优化方法的有效性和应用价值。 原理 各个蚂蚁在没有事先告诉他们食物在什么地方的前提下开始寻找食物。当一只找到食物以后,它会向环境释放一种信息素,吸引其他的蚂蚁过来,这样越来越多的蚂蚁会找到食物!有些蚂蚁并没有象其它蚂蚁一样总重复同样的路,他们会另辟蹊径,如果令开辟的道路比原来的其他道路更短,那么,渐渐地更多的蚂蚁被吸引到这条较短的路上来。最后,经过一段时间运行,可能会出现一条最短的路径被大多数蚂蚁重复着。 为什么小小的蚂蚁能够找到食物?他们具有智能么?设想,如果我们要为蚂蚁设计一个人工智能的程序,那么这个程序要多么复杂呢?首先,你要让蚂蚁能够避开障碍物,就必须根据适当的地形给它编进指令让他们能够巧妙的避开障碍物,其次,要让蚂蚁找到食物,就需要让他们遍历空间上的所有点;再次,如果要让蚂蚁找到最短的路径,那么需要计算所有可能的路径并且比

较它们的大小,而且更重要的是,你要小心翼翼的编程,因为程序的错误也许会让你前功尽弃。这是多么不可思议的程序!太复杂了,恐怕没人能够完成这样繁琐冗余的程序。 然而,事实并没有你想得那么复杂,上面这个程序每个蚂蚁的核心程序编码不过100多行!为什么这么简单的程序会让蚂蚁干这样复杂的事情?答案是:简单规则的涌现。事实上,每只蚂蚁并不是像我们想象的需要知道整个世界的信息,他们其实只关心很小范围内的眼前信息,而且根据这些局部信息利用几条简单的规则进行决策,这样在蚁群这个集体里,复杂性的行为就会凸现出来。这就是人工生命、复杂性科学解释的规律!那么,这些简单规则是什么呢? 1、范围: 蚂蚁观察到的范围是一个方格世界,蚂蚁有一个参数为速度半径(一般是3),那么它能观察到的范围就是3*3个方格世界,并且能移动的距离也在这个范围之内。 2、环境: 蚂蚁所在的环境是一个虚拟的世界,其中有障碍物,有别的蚂蚁,还有信息素,信息素有两种,一种是找到食物的蚂蚁洒下的食物信息素,一种是找到窝的蚂蚁洒下的窝的信息素。每个蚂蚁都仅仅能感知它范围内的环境信息。环境以一定的速率让信息素消失。 3、觅食规则: 在每只蚂蚁能感知的范围内寻找是否有食物,如果有就直接过去。否则看是否有信息素,并且比较在能感知的范围内哪一点的信息素最多,这样,它就朝信息素多的地方走,并且每只蚂蚁都会以小概率犯错误,从而并不是往信

银行家算法习题1

银行家算法流程

安全性算法流程图

银行家算法例题 1.假定系统中有4个进程1P ,2P ,3P ,4P , 3种类型的资源1R ,2R ,3R ,数量分别为9,3,6, 0T 时刻的资源分配情况如表2-1所示。 表2-1 T 0时刻的资源分配情况 试问: (1) T 0时刻是否安全? (2) T 0时刻以后,若进程P 2发出资源请求Request 2(1,0,1), 系统能否将资源分配给它? (3) 在进程P 2申请资源后,若P1发出资源请求Request 1(1,0,1), 系统能否将资源分配 给它? (4) 在进程P 1申请资源后,若P3发出资源请求Request 3(0,0,1), 系统能否将资源分配 给它? 2. 在银行家算法中,出现以下资源分配情况(见表2-2) 系统剩余资源数量=(3,3,2) (1) 该状态是否安全(给出详细的检查过程) (2) 如果进程依次有如下资源请求: P1:资源请求request (1,0,2) P2:资源请求request (3,3,0) P3:资源请求request (0,1,0) 则系统该如何进行资源分配才能避免死锁?

3.设系统中有3种类型的资源(A、B、C)和5个进程P1、P2、P3、P4、P5,A资源的数量为17,B资源的数量为5,C资源的数量为20。在T0时刻,系统状态见表2-3。系统采用银行家算法实现死锁避免。 (1)T0时刻是否为安全状态?若是,请给出安全序列 (2)在T0时刻,若进程P2请求资源(0,3,4),是否能实施资源分配?为什么? (3)在(2)的基础上,若进程P4请求资源(2,0,1),是否能实施资源分配? (4)在(3)的基础上,若进程P1请求资源(0,2,0),是否能实施资源分配? 4.某系统有R1、R2、R3共三种资源,在T0时刻P1、P2、P3、P4这四个进程对资源的占用和需求情况见表2-24,此时系统的可用资源矢量为(2,1,2)。试问: 1)将系统中各种资源总数和此刻各进程对各资源的需求数目用矢量或矩阵表示出来。2)如果此时进程P1和进程P2均发出资源请求矢量Request(1,0,1),为了保证系统的安全性,应如何分配资源给这两个进程?说明所采用策略的原因。 3)如果2)中两个请求立即得到满足后,系统此刻是否处于死锁状态? 5.考虑某个系统在表2-25时刻的状态

施工组织设计外文翻译

XXXXXXXXX 毕业设计(论文)外文翻译 学生姓名: 院(系): 专业班级: 指导教师: 完成日期:

施工组织设计的重要性 摘要: 建筑工程在施工过程中,施工组织方案的优劣不仅直接影响工程的质量,对工期及施工过程中的人员安全也有重要影响。施工组织是项目建设和指导工程施工的重要技术经济文件。能调节施工中人员、机器、原料、环境、工艺、设备、土建、安装、管理、生产等矛盾,要对施工组织设计进行监督和控制,才能科学合理的保证工程项目高质量、低成本、少耗能的完成。 关键词: 项目管理施工组织方案重要性 施工组织设计就是对工程建设项目整个施工过程的构思设想和具体安排,是施工组织管理工作的核心和灵魂。其目的是使工程速度快、质量好、效益高。使整个工程在施工中获得相对的最优效果。 1.编制施工组织设计重要性的原因 建筑工程及其施工具有固定性与流动性、多样性与单件性、形体庞大与施工周期长这三对特点。所以,每一建筑工程的施工都必须进行施工组织设计。这是因为:其它一般工业产品的生产都有着自己固定的、长期适用的工厂。而建筑施工具有流动性的特点,不可能建立这样的工厂,只能是当每一个建筑工程施工时,建立一个相应的、临时性的,如同工厂作用性质的施工现场准备,即工地。施工单件性特点与施工流动性特点,决定了每一建筑工程施工都要选择相应的机具和劳动力组织。选择施工方法、拟定施工技术方案及其劳动力组织和机具配置,统称为施工作业能力配置。施工周期的特点,决定了各种劳动力、机具和众多材料物资技术的供应时间也比较长,这就产生了与施工总进度计划相适应的物资技术的施工组织设计内容。由此可见,施工组织设计在项目管理中是相当重要的。 2.施工组织设计方案的重要性 建筑产品作为一种商品,在项目管理中工程质量在整个施工过程中起着极其重要的作用。工程建设项目的施工组织设计与其工程造价有着密切的关系。施工组织设计基本的内容有:工程概况和施工条件的分析、施工方案、施工工艺、施工进度计划、施工总平面图。还有经济分析和施工准备工作计划。其中,施工方案及施工工艺的确定更为重要,如:施工机械的选择、水平运输方法的选择、土方的施工方法及主体结构的施工方法和施工工艺的选择等等,均直接影响着工程预算价格的变化。在保证工程质量和满足业主使用要求及工期要求的前提下,优化施工方案及施工工艺是控制投资和降低工程项目造价的重要措施和手段。 2.1施工组织方案在很大程度上影响着工程质量,因此合理的施工组织方案 不仅是确保工程顺利完成的基础,也是工程安全的依据。施工组织设计是建筑工程设计文件的重要组成部分,是编制工程投资概预算的主要依据和编制招投标文件的

外文翻译-遗传算法

What is a genetic algorithm? ●Methods of representation ●Methods of selection ●Methods of change ●Other problem-solving techniques Concisely stated, a genetic algorithm (or GA for short) is a programming technique that mimics biological evolution as a problem-solving strategy. Given a specific problem to solve, the input to the GA is a set of potential solutions to that problem, encoded in some fashion, and a metric called a fitness function that allows each candidate to be quantitatively evaluated. These candidates may be solutions already known to work, with the aim of the GA being to improve them, but more often they are generated at random. The GA then evaluates each candidate according to the fitness function. In a pool of randomly generated candidates, of course, most will not work at all, and these will be deleted. However, purely by chance, a few may hold promise - they may show activity, even if only weak and imperfect activity, toward solving the problem. These promising candidates are kept and allowed to reproduce. Multiple copies are made of them, but the copies are not perfect; random changes are introduced during the copying process. These digital offspring then go on to the next generation, forming a new pool of candidate solutions, and are subjected to a second round of fitness evaluation. Those candidate solutions which were worsened, or made no better, by the changes to their code are again deleted; but again, purely by chance, the random variations introduced into the population may have improved some individuals, making them into better, more complete or more efficient solutions to the problem at hand. Again these winning individuals are selected and copied over into the next generation with random changes, and the process repeats. The expectation is that the average fitness of the population will increase each round, and so by repeating this process for hundreds or thousands of rounds, very good solutions to the problem can be discovered. As astonishing and counterintuitive as it may seem to some, genetic algorithms have proven to be an enormously powerful and successful problem-solving strategy, dramatically demonstrating

《银行家算法的模拟实现》—实验报告

《银行家算法的模拟实现》 --实验报告 题目: 银行家算法的模拟实现 专业: 班级: 组员: 指导老师:

一、实验目的 死锁会引起计算机工作僵死,因此操作系统中必须防止。本实验的目的在于让学生独立的使用高级语言编写和调试一个系统动态分配资源的简单模拟程序,了解死锁产生的条件和原因,并采用银行家算法有效地防止死锁的发生,以加深对课堂上所讲授的知识的理解。 二、实验内容 模拟实现银行家算法实现死锁避免。要求:初始数据(如系统在T0时刻的资源分配情况、每一种资源的总数量)从文本文件读入,文件中给出最大需求矩阵Max、分配矩阵Allocation,在程序中求得需求矩阵Need和可利用资源向量Available。 三、实验分析过程 1、整个银行家算法的思路。 先对用户提出的请求进行合法性检查,再进行预分配,利用安全性检查算法进行安全性检查。 1)进程一开始向系统提出最大需求量. 2)进程每次提出新的需求(分期贷款)都统计是否超出它事先提出的最大需求量. 3)若正常,则判断该进程所需剩余剩余量(包括本次申请)是否超出系统所掌握的 剩余资源量,若不超出,则分配,否则等待 2、算法用到的主要数据结构和C语言说明。 (1)、可利用资源向量INT A V AILABLE[M] M为资源的类型。 (2)、最大需求矩阵INT MAX[N][M] N为进程的数量。 (3)、已分配矩阵INT ALLOCA TION[N][M] (4)、还需求矩阵INT NEED[N][N] (5)、申请各类资源数量int Request[x]; // (6)、工作向量int Work[x]; (7)、int Finish[y]; //表示系统是否有足够的资源分配给进程,0为否,非0为是 3、银行家算法(主程序) (1)、系统初始化。输入进程数量,资源种类,各进程已分配、还需求各资源数量,各资源可用数量等 (2)、输入用户的请求三元组(I,J,K),为进程I申请K个J类资源。 (3)、检查用户的请求是否小于还需求的数量,条件是K<=NEED[I,J]。如果条件不符则提示重新输入,即不允许索取大于需求量 (4)、检查用户的请求是否小于系统中的可利用资源数量,条件是K<=A V ALIABLE[I,J]。 如果条件不符则申请失败,阻塞该进程,重新进行进程动态资源申请(使用goto语句) (5)、进行资源的预分配,语句如下: A V ALIBLE[I][J]= A V ALIBLE[I][J]-K; ALLOCATION[I][J]= ALLOCATION[I][J]+K; NEED[I][J]=NEED[I][J]-K;

工业工程英文文献及外文翻译

附录 附录1:英文文献 Line Balancing in the Real World Abstract:Line Balancing (LB) is a classic, well-researched Operations Research (OR) optimization problem of significant industrial importance. It is one of those problems where domain expertise does not help very much: whatever the number of years spent solving it, one is each time facing an intractable problem with an astronomic number of possible solutions and no real guidance on how to solve it in the best way, unless one postulates that the old way is the best way .Here we explain an apparent paradox: although many algorithms have been proposed in the past, and despite the problem’s practical importance, just one commercially available LB software currently appears to be available for application in industries such as automotive. We speculate that this may be due to a misalignment between the academic LB problem addressed by OR, and the actual problem faced by the industry. Keyword:Line Balancing, Assembly lines, Optimization

(完整版)操作系统课后题答案

2.OS的作用可表现在哪几个方面? 答:(1)OS作为用户与计算机硬件系统之间的接口;(2)OS作为计算机系统资源的管理者; (3)OS实现了对计算机资源的抽象。 5.何谓脱机I/O和联机I/O? 答:脱机I/O 是指事先将装有用户程序和数据的纸带或卡片装入纸带输入机或卡片机,在外围机的控制下,把纸带或卡片上的数据或程序输入到磁带上。该方式下的输入输出由外围机控制完成,是在脱离主机的情况下进行的。而联机I/O方式是指程序和数据的输入输出都是在主机的直接控制下进行的。 11.OS有哪几大特征?其最基本的特征是什么? 答:并发性、共享性、虚拟性和异步性四个基本特征;最基本的特征是并发性。 20.试描述什么是微内核OS。 答:(1)足够小的内核;(2)基于客户/服务器模式;(3)应用机制与策略分离原理;(4)采用面向对象技术。 25.何谓微内核技术?在微内核中通常提供了哪些功能? 答:把操作系统中更多的成分和功能放到更高的层次(即用户模式)中去运行,而留下一个尽量小的内核,用它来完成操作系统最基本的核心功能,称这种技术为微内核技术。在微内核中通常提供了进程(线程)管理、低级存储器管理、中断和陷入处理等功能。 第二章进程管理 2. 画出下面四条语句的前趋图: S1=a:=x+y; S2=b:=z+1; S3=c:=a – b;S4=w:=c+1; 答:其前趋图为: 7.试说明PCB 的作用,为什么说PCB 是进程存在的惟一标志? 答:PCB 是进程实体的一部分,是操作系统中最重要的记录型数据结构。作用是使一个在多道程序环境下不能独立运行的程序,成为一个能独立运行的基本单位,成为能与其它进程并发执行的进程。OS是根据PCB对并发执行的进程进行控制和管理的。 11.试说明进程在三个基本状态之间转换的典型原因。 答:(1)就绪状态→执行状态:进程分配到CPU资源;(2)执行状态→就绪状态:时间片用完;(3)执行状态→阻塞状态:I/O请求;(4)阻塞状态→就绪状态:I/O完成. 19.为什么要在OS 中引入线程?

外文翻译---遗传算法在非线性模型中的应用

英文翻译 2011 届电气工程及其自动化专业 0706073 班级 题目遗传算法在非线性模型中的应用 姓名学号070607313

英语原文: Application of Genetic Programming to Nonlinear Modeling Introduction Identification of nonlinear models which are based in part at least on the underlying physics of the real system presents many problems since both the structure and parameters of the model may need to be determined. Many methods exist for the estimation of parameters from measures response data but structural identification is more difficult. Often a trial and error approach involving a combination of expert knowledge and experimental investigation is adopted to choose between a number of candidate models. Possible structures are deduced from engineering knowledge of the system and the parameters of these models are estimated from available experimental data. This procedure is time consuming and sub-optimal. Automation of this process would mean that a much larger range of potential model structure could be investigated more quickly. Genetic programming (GP) is an optimization method which can be used to optimize the nonlinear structure of a dynamic system by automatically selecting model structure elements from a database and combining them optimally to form a complete mathematical model. Genetic programming works by emulating natural evolution to generate a model structure that maximizes (or minimizes) some objective function involving an appropriate measure of the level of agreement between the model and system response. A population of model structures evolves through many generations towards a solution using certain evolutionary operators and a “survival-of-the-fittest”selection scheme. The parameters of these models may be estimated in a separate and more conventional phase of the complete identification process.

银行家算法

实验十银行家算法 一、实验目的 1、通过实验,加深对多实例资源分配系统中死锁避免方法——银行家算法的理解,掌握Windows环境下银行家算法的实现方法。 2、掌握进程安全性检查的方法及资源分配的方法。 二、实验内容 1、下面给出模拟银行家算法的部分代码,试补全安全性检查算法,实现程序基本功能。要求:若系统是安全的,则在屏幕上输出,并且在屏幕上输出系统安全序列。 2、通过以上程序回答下面给出的例子的问题,并验证所编写程序的正确性。 例:某系统有A、B、C、D 4类共5个进程(P0、P1、P2、P3、P4)共享,各进程对资源的需求和分配情况如表1所示。 表1 各进程对资源的需求和分配情况表 现在系统中A、B、C、D 4类资源分别还剩1、5、2、0个,请按银行家算法回答下列问题: 1)现在系统是否处于安全状态? 2)如果现在进程P1提出需要(0、4、2、0)个资源的请求,系统能否满足它的请求? 2、安全序列输出不完整,请修改代码; 3、当进程输入请求资源数,系统假如同意分配(即当下是安全的),增加显示当下剩余资源、已分配资源(矩阵)的功能;

4、将手动输入的矩阵信息保存于文件中,程序能够将矩阵自动读出,不用手动输入; 5、当申请资源反馈不安全的时候系统能为该进程重新计算资源数目,并且打印出此时若达到安全状态应该申请的最多资源为多少。 程序实现的界面如下图所示: 三、设计理论基础 银行家算法.顾名思义是来源于银行的借贷业务,一定数量的本金要应多个客户的借贷周转,为了防止银行加资金无法周转而倒闭,对每一笔贷款,必须考察其是否能限期归还。在操作系统中研究资源分配策略时也有类似问题,系统中有限的资源要供多个进程使用,必须保证得到的资源的进程能在有限的时间内归还资源,以供其他进程使用资源。如果资源分配不得到就会发生进程循环等待资源,则进程都无法继续执行下去的死锁现象。 把一个进程需要和已占有资源的情况记录在进程控制中,假定进程控制块PCB其中“状态”有就绪态、等待态和完成态。当进程在处于等待态时,表示系统不能满足该进程当前的资源申请。“资源需求总量”表示进程在整个执行过程

相关文档
最新文档