首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 854 毫秒
1.
二叉树的先序遍历和中序遍历的非递归算法   总被引:2,自引:0,他引:2  
黄霞 《电脑开发与应用》2010,23(1):53-54,59
从二叉树先序遍历递归算法的执行过程的分析入手,总结出二叉树先序遍历的实质,从而得出利用栈的二叉树的非递归算法。最后,再从分析二叉树中序遍历与先序遍历过程实质的不同之处,得出了二叉树中序遍历的非递归算法。重点在于对二叉树先序和中序遍历过程实质的分析。  相似文献   

2.
二叉树的遍历操作和其它操作的算法实现,都必须先创建二叉树。分析常规创建二叉树方法的特点和不足,给出利用中序遍历和后序遍历结果还原二叉树的算法,利用这一方法,给出由前序遍历和后序遍历还原二叉树的算法,最后,提供利用次层遍历和中序遍历还原二叉树的算法。  相似文献   

3.
基于蚁群算法的机器人路径规划   总被引:2,自引:0,他引:2  
针对移动机器人规避障碍和寻找最优路径问题,提出了在复杂环境下移动机器人的一种路径规划方法.采用了栅格法建立了机器人工作平面的坐标系,整个系统由全局路径规划和局部避碰规划两部分组成.在全局路径规划中,用改进蚁群算法规划出初步全局优化路径;局部避碰规划是在跟踪全局优化路径的过程中,通过基于滚动窗口的环境探测和碰撞预测,对动态障碍物实施有效的局部避碰策略,从而使机器人能够安全顺利的到达目标点.仿真实验的结果表明了所述方法能在较短时间内找到最佳路径并规避障碍.  相似文献   

4.
对二叉树的遍历过程进行了深入的分析,根据二叉树三种遍历的内在关系给出了求先序序列、中序序列和后序序列的非递归算法,该算法只需对二叉树遍历一次即可求出三种遍历序列。  相似文献   

5.
对二叉树的遍历过程进行了深入的分析,根据二叉树三种遍历的内在关系给出了求先序序列、中序序列和后序序列的非递归算法,该算法只需对二叉树遍历一次即可求出三种遍历序列。  相似文献   

6.
对二叉树先序遍历、中序遍历和后序遍历递归算法进行了分析,给出了三种遍历方法的通用递归算法。该算法只需对二叉树遍历一次,对每个结点的值域(Data)访问三次即可求出三种遍历序列。  相似文献   

7.
对二叉树先序遍历、中序遍历和后序遍历递归算法进行了分析,给出了三种遍历方法的通用递归算法。该算法只需对二叉树遍历一次,对每个结点的值域(Data)访问三次即可求出三种遍历序列。  相似文献   

8.
二叉树是数据结构中最常见的一种存储形式,而遍历二叉树又是二叉树中最重要的操作.该文分别以递归和非递归两种不同的算法来分析遍历二叉树的过程,旨在用简单明了的方法来实现二叉树的遍历,且先序、中序、后序三种遍历方式都可通过这两种算法实现.  相似文献   

9.
受全遍历环境影响, 现有方法规划得出的路径长度过长, 为提高路径规划性能, 获取最优路径, 提出基于改进蚁群算法的全向移动机器人全遍历路径规划方法. 在拓扑建模示意图的基础上, 依据移动机器人在原坐标系下的位置信息, 利用角度转换建立新的环境模型. 考虑蚁群算法存在的问题, 将递减系数引入到启发函数中, 更新局部信息素, 通过设定迭代阈值, 调节信息素的挥发系数. 最后通过路径规划流程设计, 实现对全向移动机器人全遍历路径的规划. 实验结果表明, 所设计方法不仅可以缩短全遍历路径长度, 还可以缩短路径规划时间, 获取最优路径, 从而提高了全向移动机器人的全遍历路径规划性能.  相似文献   

10.
二叉树是数据结构中最常见的一种存储形式,而遍历二叉树又是二叉树中最重要的操作。该文分别以递归和非递归两种不同的算法来分析遍历二叉树的过程,旨在用简单明了的方法来实现二叉树的遍历,且先序、中序、后序三种遍历方式都可通过这两种算法实现。  相似文献   

11.
为了实现在多移动机器人和多窄通道的复杂动态环境中机器人的节能运动规划,提出异构多目标差分-动态窗口法(heterogeneous multi-objective differential evolution-dynamic window algorithm,HMODE-DWA).首先,建立行驶时间、执行器作用力和平滑度的3目标优化模型,设计具有碰撞约束的异构多目标差分进化算法来获得3个目标函数的最优解,进而在已知的静态环境中获得帕累托前沿,利用平均隶属度函数获得起点与终点间最优的全局路径;其次,定义基于环境缓冲区域的模糊动态窗口法使机器人完成动态复杂环境中避障,利用所提出的HMODE-DWA算法动态避障的同时实现节能规划.仿真和实验结果表明,所提出的混合路径规划控制策略能够有效降低移动机器人动态避障过程中的能耗.  相似文献   

12.
Two articulated robots working in a shared workspace can be programmed by planning the tip trajectory of each robot independently. To account for collision avoidance between links, a real-time velocity alteration strategy based on fast and accurate collision detection is proposed in this paper to determine the step of next motion of slave (low priority) robot for collision-free trajectory planning of two robots with priorities. The effectiveness of the method depends largely on a newly developed method of accurate estimate of distance between links. By using the enclosing and enclosed ellipsoids representations of polyhedral models of links of robots, the minimum distance estimate and collision detection between the links can be performed more efficiently and accurately. The proposed strategy is implemented in an environment where the geometric paths of robots are pre-planned and the preprogrammed velocities are piecewise constant but adjustable. Under the control of the proposed strategy, the master robot always moves at a constant speed. The slave robot moves at the selected velocity, selected by a tradeoff between collision trend index and velocity reduction in one collision checking time, to keep moving as far as possible and as fast as possible while avoid possible collisions along the path. The collision trend index is a fusion of distance and relative velocity between links of two robots to reflect the possibility of collision at present and in the future. Graphic simulations of two PUMA560 robot arms working in common workspace but with independent goals are conducted. Simulations demonstrate the collision avoidance capability of the proposed approach as compared to the approach based on bounding volumes. It shows that advantage of our approach is less number of speed alterations required to react to potential collisions.  相似文献   

13.
Global Navigation in Dynamic Environments Using Case-Based Reasoning   总被引:1,自引:0,他引:1  
This paper presents a global navigation strategy for autonomous mobile robots in large-scale uncertain environments. The aim of this approach is to minimize collision risk and time delays by adapting to the changes in a dynamic environment. The issue of obstacle avoidance is addressed on the global level. It focuses on a navigation strategy that prevents the robot from facing the situations where it has to avoid obstacles. To model the partially known environment, a grid-based map is used. A modified wave-transform algorithm is described that finds several alternative paths from the start to the goal. Case-based reasoning is used to learn from past experiences and to adapt to the changes in the environment. Learning and adaptation by means of case-based reasoning permits the robot to choose routes that are less risky to follow and lead faster to the goal. The experimental results demonstrate that using case-based reasoning considerably increases the performance of the robot in a difficult uncertain environment. The robot learns to take actions that are more predictable, minimize collision risk and traversal time as well as traveled distances.  相似文献   

14.
屈立成  吕娇  赵明  王海飞  屈艺华 《计算机应用》2020,40(12):3499-3507
针对当前多机器人路径规划策略中存在的路径耦合性高、总路径长、避碰等待时间长等缺点,以及由此导致的系统鲁棒性低、机器人利用率低等问题,提出了基于三维时空地图和运动分解的多机器人路径规划算法。首先,根据已有路径集和当前机器人的位置生成时间维度上的动态临时障碍物,将其与静态障碍物一并拓展为三维搜索空间;其次,在三维搜索空间内,将路径运动总时间拆分为运动时间、转向时间和原地停留时间这三个参数,并使用条件深度优先搜索策略计算出从起始节点到达目标节点的所有符合参数要求的路径集合;最后,遍历路径集合中的所有路径,对于每条路径,计算其实际总耗时。如果某一路径的实际总耗时和理论总耗时之间的差距小于规定的最大误差,则可认为该路径为最短路径,否则,继续遍历剩下的其余路径;而如果路径集合中所有路径的实际总耗时和理论总耗时之差全都大于最大误差,则需要动态调整参数,然后继续执行算法的初始步骤。实验结果表明,所提算法规划的路径具有总长短、运行时间少、系统无碰撞、鲁棒性高等优点,解决了多机器人系统完成持续随机任务的问题。  相似文献   

15.
屈立成  吕娇  赵明  王海飞  屈艺华 《计算机应用》2005,40(12):3499-3507
针对当前多机器人路径规划策略中存在的路径耦合性高、总路径长、避碰等待时间长等缺点,以及由此导致的系统鲁棒性低、机器人利用率低等问题,提出了基于三维时空地图和运动分解的多机器人路径规划算法。首先,根据已有路径集和当前机器人的位置生成时间维度上的动态临时障碍物,将其与静态障碍物一并拓展为三维搜索空间;其次,在三维搜索空间内,将路径运动总时间拆分为运动时间、转向时间和原地停留时间这三个参数,并使用条件深度优先搜索策略计算出从起始节点到达目标节点的所有符合参数要求的路径集合;最后,遍历路径集合中的所有路径,对于每条路径,计算其实际总耗时。如果某一路径的实际总耗时和理论总耗时之间的差距小于规定的最大误差,则可认为该路径为最短路径,否则,继续遍历剩下的其余路径;而如果路径集合中所有路径的实际总耗时和理论总耗时之差全都大于最大误差,则需要动态调整参数,然后继续执行算法的初始步骤。实验结果表明,所提算法规划的路径具有总长短、运行时间少、系统无碰撞、鲁棒性高等优点,解决了多机器人系统完成持续随机任务的问题。  相似文献   

16.
This work investigates adaptive stiffness control and motion optimization of a snake-like robot with variable stiffness actuators. The robot can vary its stiffness by controlling magnetorheological fluid(MRF) around actuators. In order to improve the robot's physical stability in complex environments, this work proposes an adaptive stiffness control strategy. This strategy is also useful for the robot to avoid disturbing caused by emergency situations such as collisions. In addition, to obtain optimal stiffness and reduce energy consumption, both torques of actuators and stiffness of the MRF braker are considered and optimized by using an evolutionary optimization algorithm. Simulations and experiments are conducted to verify the proposed adaptive stiffness control and optimization methods for a variable stiffness snake-like robots.  相似文献   

17.
When a battery-powered robot needs to operate for a long period of time, optimizing its energy consumption becomes critical. Driving motors are a major source of power consumption for mobile robots. In this paper, we study the problem of finding optimal paths and velocity profiles for car-like robots so as to minimize the energy consumed during motion. We start with an established model for energy consumption of DC motors. We first study the problem of finding the energy optimal velocity profiles, given a path for the robot. We present closed form solutions for the unconstrained case and for the case where there is a bound on maximum velocity. We then study a general problem of finding an energy optimal path along with a velocity profile, given a starting and goal position and orientation for the robot. Along the path, the instantaneous velocity of the robot may be bounded as a function of its turning radius, which in turn affects the energy consumption. Unlike minimum length paths, minimum energy paths may contain circular segments of varying radii. We show how to efficiently construct a graph which generalizes Dubins’ paths by including segments with arbitrary radii. Our algorithm uses the closed-form solution for the optimal velocity profiles as a subroutine to find the minimum energy trajectories, up to a fine discretization. We investigate the structure of energy-optimal paths and highlight instances where these paths deviate from the minimum length Dubins’ curves. In addition, we present a calibration method to find energy model parameters. Finally, we present results from experiments conducted on a custom-built robot for following optimal velocity profiles.  相似文献   

18.
Detecting collisions for planning collision-free motion of the wrists of two robot arms in a common workspace is discussed in this paper. A collision-free motion can be obtained by detecting collisions along the preplanned trajectories using a sphere model for the wrist of each robot and then modifying the paths and/or trajectories of one or both robots to avoid the collision. In this paper, a collision detection algorithm is described and its role in collision avoidance is discussed. Collision detection is based on the premise that (1) the wrists of robots move monotonically on their preplanned straight line trajectories and (2) collisions never occur between the two wrists at the beginning points or end points.Research supported by the NASA-Langley Research Center under Grants #NAG-1-632 and #NAG-1-772 and the AT&T Foundation.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号