当前位置: 首页 > news >正文

什么叫页面价格东营优化网站

什么叫页面价格,东营优化网站,网站建设目标概括,深圳百度网站优化《基于智能优化与RRT算法的无人机任务规划方法研究》博士论文《基于改进人工势场法的路径规划算法研究》硕士论文import matplotlib.pyplot as pltimport randomimport mathimport copyshow_animation Trueclass Node(object):《基于智能优化与RRT算法的无人机任务规划方法研究》博士论文《基于改进人工势场法的路径规划算法研究》硕士论文import matplotlib.pyplot as pltimport randomimport mathimport copyshow_animation Trueclass Node(object):RRT Nodedef __init__(self, x, y):self.x xself.y yself.parent Noneclass RRT(object):Class for RRT Planningdef __init__(self, start, goal, obstacle_list, rand_area):Setting Parameterstart:Start Position [x,y]goal:Goal Position [x,y]obstacleList:obstacle Positions [[x,y,size],...]randArea:random sampling Area [min,max]self.start Node(start[0], start[1])self.end Node(goal[0], goal[1])self.min_rand rand_area[0]self.max_rand rand_area[1]self.expandDis 1.0self.goalSampleRate 0.05 # 选择终点的概率是0.05self.maxIter 500self.obstacleList obstacle_listself.nodeList [self.start]def random_node(self):产生随机节点:return:node_x random.uniform(self.min_rand, self.max_rand)node_y random.uniform(self.min_rand, self.max_rand)node [node_x, node_y]return nodestaticmethoddef get_nearest_list_index(node_list, rnd)::param node_list::param rnd::return:d_list [(node.x - rnd[0]) ** 2 (node.y - rnd[1]) ** 2 for node in node_list]min_index d_list.index(min(d_list))return min_indexstaticmethoddef collision_check(new_node, obstacle_list):a 1for (ox, oy, size) in obstacle_list:dx ox - new_node.xdy oy - new_node.yd math.sqrt(dx * dx dy * dy)if d size:a 0 # collisionreturn a # safedef planning(self):Path planninganimation: flag for animation on or offwhile True:# Random Samplingif random.random() self.goalSampleRate:rnd self.random_node()else:rnd [self.end.x, self.end.y]# Find nearest nodemin_index self.get_nearest_list_index(self.nodeList, rnd)# print(min_index)# expand treenearest_node self.nodeList[min_index]# 返回弧度制theta math.atan2(rnd[1] - nearest_node.y, rnd[0] - nearest_node.x)new_node copy.deepcopy(nearest_node)new_node.x self.expandDis * math.cos(theta)new_node.y self.expandDis * math.sin(theta)new_node.parent min_indexif not self.collision_check(new_node, self.obstacleList):continueself.nodeList.append(new_node)# check goaldx new_node.x - self.end.xdy new_node.y - self.end.yd math.sqrt(dx * dx dy * dy)if d self.expandDis:print(Goal!!)breakif True:self.draw_graph(rnd)path [[self.end.x, self.end.y]]last_index len(self.nodeList) - 1while self.nodeList[last_index].parent is not None:node self.nodeList[last_index]path.append([node.x, node.y])last_index node.parentpath.append([self.start.x, self.start.y])return pathdef draw_graph(self, rndNone):Draw Graphprint(aaa)plt.clf() # 清除上次画的图if rnd is not None:plt.plot(rnd[0], rnd[1], ^g)for node in self.nodeList:if node.parent is not None:plt.plot([node.x, self.nodeList[node.parent].x], [node.y, self.nodeList[node.parent].y], -g)for (ox, oy, size) in self.obstacleList:plt.plot(ox, oy, sk, ms10*size)plt.plot(self.start.x, self.start.y, ^r)plt.plot(self.end.x, self.end.y, ^b)plt.axis([self.min_rand, self.max_rand, self.min_rand, self.max_rand])plt.grid(True)plt.pause(0.01)def draw_static(self, path):画出静态图像:return:plt.clf() # 清除上次画的图for node in self.nodeList:if node.parent is not None:plt.plot([node.x, self.nodeList[node.parent].x], [node.y, self.nodeList[node.parent].y], -g)for (ox, oy, size) in self.obstacleList:plt.plot(ox, oy, sk, ms10*size)plt.plot(self.start.x, self.start.y, ^r)plt.plot(self.end.x, self.end.y, ^b)plt.axis([self.min_rand, self.max_rand, self.min_rand, self.max_rand])plt.plot([data[0] for data in path], [data[1] for data in path], -r)plt.grid(True)plt.show()def main():print(start RRT path planning)obstacle_list [(5, 1, 1),(3, 6, 2),(3, 8, 2),(1, 1, 2),(3, 5, 2),(9, 5, 2)]# Set Initial parametersrrt RRT(start[0, 0], goal[8, 9], rand_area[-2, 10], obstacle_listobstacle_list)path rrt.planning()print(path)# Draw final pathif show_animation:plt.close()rrt.draw_static(path)if __name__ __main__:main()
http://www.zqtcl.cn/news/54287/

相关文章:

  • 网站建设时间计划图quot 网站建设话术 quot
  • 做自媒体关注的网站访问不了服务器网站吗
  • 湿地公园网站开发招标安徽省建设工程信息网怎么打不开了
  • 化工网站建设推广html静态网页首页模板
  • 深圳公司设计网站wordpress 产品展示主题
  • 站中站网站案例郴州新网交友信息
  • 济南正规网站建设公司网站建设和维护实训
  • 网站定制网页设计遵义住房和城乡建设局官方网站
  • wordpress制作主题教程邯郸哪里做网站优化
  • 上海网站建设公司兴田德润放心百度搜索指数1000是什么
  • 企业国际网站建设平谷网站建设服务
  • server2008 iis 网站做啪啪网站
  • 网站开发最强工具深圳网站建设哪家好
  • 一步一步教你做网站成都有名的建筑公司有哪些
  • 响应式网站和传统网站异同wordpress商品分销
  • 免费建网站赚钱网站开发会用到的框架
  • 网站建设 数据归属asp网站系统
  • 莆田外贸建站趣乐码少儿编程加盟
  • 广西新农村建设指导员网站广州 竞价托管
  • 做影视网站侵权不大连做网站软件
  • 建设通是不是官方网站教人做窗帘的视频网站
  • 网站门户建设酒泉网站建设与制作
  • 服装网站建设方案摘要app运营方式
  • 网站建设专属名词展示型网站包含哪些模块
  • vs怎么做网站的首页应用开发需要学什么
  • 电子商务网站推广的意义朝阳 手机网站 建设
  • 怎么建设商城网站东莞工程建设交易中心网
  • 成都网站设计报告书咨询公司排名前十
  • 网站安全软件心理咨询网站开发
  • 青岛仿站定制模板建站移动端网站制作的有哪些要求