555555555555

555555555
#!/usr/bin/env python -- coding: UTF-8 -- --------------------------------------------------------- Copyright (C), 2025, Lianzhou International Co.,Ltd. description: TS887553__nd_detection_basic_test.py Author: dengshudan@tp-link.com.hk history: 2025/8/26 13:48, dengshudan@tp-link.com.hk, Created. --------------------------------------------------------- import time from pysat.sat_test import TestCase, CaseInfo from pysat.sat_result import ResultInfo from testbed_init.un_bvt_switch import testbed_util as testbed from pysat.testbeds_def import UN_BVT_SWITCH from pysat import sat_conf from PyLogger import logging from PySwitchCtrl import * import stc_ctrl as stc import special_frame_global as db import random import network_security_global_config logging handle logger = logging.getLogger(name) class NdDetectionBasicTest(TestCase): def __init__(self): TestCase.__init__(self) self.logger = logging.getLogger(self.__class__.__name__) # define the case info self.case_info = CaseInfo() self.case_info.name = 'nd_detection_basic_test' self.case_info.id = 'TS887553' # the id of the test case in 'Testlink' self.case_info.version = '20250827' # test case version self.case_info.auther = 'dengshudan@tp-link.net' # auther of the test case self.case_info.testbeds = [UN_BVT_SWITCH] # testbeds in which the case could run self.case_info.description = ''' ''' def add_task(self): # register the class self.register_case(self.nd_detection_basic_test, self.case_info) def nd_detection_basic_test(self): result = ResultInfo() test_comment = '' stc_ip = db.get_config('stc_ip') stc_port1 = db.get_config('STC_PORT1') stc_port2 = db.get_config('STC_PORT2') stc_port3 = db.get_config('STC_PORT3') stc_port4 = db.get_config('STC_PORT4') stc_port5 = db.get_config('STC_PORT5') self.logger.info('stc_ip is %s' % stc_ip) self.logger.info('stc_port1 is %s' % stc_port1) self.logger.info('stc_port2 is %s' % stc_port2) self.logger.info('stc_port3 is %s' % stc_port3) self.logger.info('stc_port4 is %s' % stc_port4) self.logger.info('stc_port5 is %s' % stc_port5) try: # [Pre-condition]: Login in DUT self.logger.info('[Pre-condition]: Login in DUT...') client1 = testbed.Client1() client1.dut_iface.open() client1.dut_iface.login() dut_port_type_list, dut_port_list, dut_port_type_short_list = network_security_global_config.get_port_id(client1) # [Pre-condition]: reserve STC cards self.logger.info('[Pre-condition]: start to reserve STC ports...') port1 = stc.Port.Port(stc_ip, stc_port1, 0, 0, 0) port2 = stc.Port.Port(stc_ip, stc_port2, 0, 0, 0) port3 = stc.Port.Port(stc_ip, stc_port3, 0, 0, 0) port4 = stc.Port.Port(stc_ip, stc_port4, 0, 0, 0) port5 = stc.Port.Port(stc_ip, stc_port5, 0, 0, 0) # [Pre-condition]: init STC ports self.logger.info('[Pre-condition]: STC ports initializing...') port1.SubscribeGenerator() port1.SubscribeAnalyzer() port2.SubscribeGenerator() port2.SubscribeAnalyzer() port3.SubscribeGenerator() port3.SubscribeAnalyzer() port4.SubscribeGenerator() port4.SubscribeAnalyzer() port5.SubscribeGenerator() port5.SubscribeAnalyzer() # [Step 1.1]: Configure the DUT try: self.logger.info('[Step 1.1]: Configure the DUT') client1.dut_iface.set_configure_mode() client1.dut_iface.exec_command('#') client1.dut_iface.exec_command('vlan 4094') client1.dut_iface.exec_command('name "4094"') client1.dut_iface.exec_command('#') client1.dut_iface.exec_command('ipv6 source binding %s %s %s vlan %s interface %s %s %s' % ('1', '2001::1', '00:00:00:00:00:01', '1', dut_port_type_list[1], dut_port_list[1], 'nd-detection')) client1.dut_iface.exec_command('ipv6 source binding %s %s %s vlan %s interface %s %s %s' % ('2', '2001::2', '00:00:00:00:00:02', '4094', dut_port_type_list[1], dut_port_list[1], 'nd-detection')) client1.dut_iface.exec_command('ipv6 source binding %s %s %s vlan %s interface %s %s %s' % ('3', 'fe80::200:ff:fe00:1', '00:00:00:00:00:01', '1', dut_port_type_list[1], dut_port_list[1], 'nd-detection')) client1.dut_iface.exec_command('#') client1.dut_iface.exec_command('ipv6 nd detection') client1.dut_iface.exec_command('ipv6 nd detection vlan 1,4094') client1.dut_iface.exec_command('ipv6 nd detection vlan 1,4094 logging') client1.dut_iface.exec_command('#') client1.dut_iface.exec_command('interface %s %s' % (dut_port_type_list[1], dut_port_list[1])) client1.dut_iface.exec_command('switchport general allowed vlan 4094 tagged') client1.dut_iface.exec_command('#') client1.dut_iface.exec_command('interface %s %s' % (dut_port_type_list[2], dut_port_list[2])) client1.dut_iface.exec_command('switchport general allowed vlan 4094 tagged') client1.dut_iface.exec_command('interface %s %s' % (dut_port_type_list[5], dut_port_list[5])) client1.dut_iface.exec_command('ipv6 nd detection trust') client1.dut_iface.exec_command('#') except Exception, e: self.logger.debug('[Step 1.1]: Failed to Configure the DUT') self.break_test('[Step 1.1]: %s' % (e)) # [Step 1.2]: delete default streamblocks self.logger.info('[Step 1.2]: deleting default streamblocks...') stc.Create.Delete('stc', port1.streamblock.getstreamblockhandle()) stc.Create.Delete('stc', port2.streamblock.getstreamblockhandle()) stc.Create.Delete('stc', port3.streamblock.getstreamblockhandle()) stc.Create.Delete('stc', port4.streamblock.getstreamblockhandle()) stc.Create.Delete('stc', port5.streamblock.getstreamblockhandle()) # [Step 1.2]: create streamblock1 NS_match self.logger.info('[Step 1.2]: creating streamblock1...') frame_1 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:11</dstMac><srcMac>00:00:00:00:00:01</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::1</sourceAddr><destAddr>FF02::1:FF00:11</destAddr></pdu><pdu name="NeighborSolicitation_1" pdu="icmpv6:NeighborSolicitation"><targetAddress>2001::11</targetAddress></pdu></pdus></config></frame>' streamblock1 = port1.addstreamblock() streamblock1.SetAutoFrameLength_ratebased() streamblock1.SetInsertSig_ratebased('TRUE') streamblock1.SetFrameConfig_ratebased(frameconfig=frame_1) # [Step 1.2]: create streamblock2 NS_mac_not_match self.logger.info('[Step 1.2]: creating streamblock2...') frame_2 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:11</dstMac><srcMac>00:00:00:00:00:0A</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::1</sourceAddr><destAddr>FF02::1:FF00:11</destAddr></pdu><pdu name="NeighborSolicitation_1" pdu="icmpv6:NeighborSolicitation"><targetAddress>2001::11</targetAddress></pdu></pdus></config></frame>' streamblock2 = port1.addstreamblock() streamblock2.SetAutoFrameLength_ratebased() streamblock2.SetInsertSig_ratebased('TRUE') streamblock2.SetFrameConfig_ratebased(frameconfig=frame_2) # [Step 1.2]: create streamblock3 NS_ip_not_match self.logger.info('[Step 1.2]: creating streamblock3...') frame_3 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:11</dstMac><srcMac>00:00:00:00:00:01</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::a</sourceAddr><destAddr>FF02::1:FF00:11</destAddr></pdu><pdu name="NeighborSolicitation_1" pdu="icmpv6:NeighborSolicitation"><targetAddress>2001::11</targetAddress></pdu></pdus></config></frame>' streamblock3 = port1.addstreamblock() streamblock3.SetAutoFrameLength_ratebased() streamblock3.SetInsertSig_ratebased('TRUE') streamblock3.SetFrameConfig_ratebased(frameconfig=frame_3) # [Step 1.2]: create streamblock4 NS_vlan_not_match self.logger.info('[Step 1.2]: creating streamblock4...') frame_4 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:11</dstMac><srcMac>00:00:00:00:00:01</srcMac><vlans name="anon_20694"><Vlan name="Vlan"><pri>000</pri><id>4094</id></Vlan></vlans></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::1</sourceAddr><destAddr>FF02::1:FF00:11</destAddr></pdu><pdu name="NeighborSolicitation_1" pdu="icmpv6:NeighborSolicitation"><targetAddress>2001::11</targetAddress></pdu></pdus></config></frame>' streamblock4 = port1.addstreamblock() streamblock4.SetAutoFrameLength_ratebased() streamblock4.SetInsertSig_ratebased('TRUE') streamblock4.SetFrameConfig_ratebased(frameconfig=frame_4) # [Step 1.2]: create streamblock5 IP_match self.logger.info('[Step 1.2]: creating streamblock5...') frame_5 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble>fb555555555555d5</preamble><dstMac>00:00:00:00:00:99</dstMac><srcMac>00:00:00:00:00:01</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::1</sourceAddr><destAddr>2001::11</destAddr></pdu></pdus></config></frame>' streamblock5 = port1.addstreamblock() streamblock5.SetAutoFrameLength_ratebased() streamblock5.SetInsertSig_ratebased('TRUE') streamblock5.SetFrameConfig_ratebased(frameconfig=frame_5) # [Step 1.2]: create streamblock6 IP_not_match self.logger.info('[Step 1.2]: creating streamblock6...') frame_6 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble>fb555555555555d5</preamble><dstMac>00:00:00:00:00:99</dstMac><srcMac>00:00:00:00:00:0A</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::1</sourceAddr><destAddr>2001::11</destAddr></pdu></pdus></config></frame>' streamblock6 = port1.addstreamblock() streamblock6.SetAutoFrameLength_ratebased() streamblock6.SetInsertSig_ratebased('TRUE') streamblock6.SetFrameConfig_ratebased(frameconfig=frame_6) # [Step 1.2]: create streamblock7 NA_match self.logger.info('[Step 1.2]: creating streamblock7...') frame_7 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:22</dstMac><srcMac>00:00:00:00:00:02</srcMac><vlans name="anon_20703"><Vlan name="Vlan"><pri>000</pri><id>4094</id></Vlan></vlans></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::2</sourceAddr><destAddr>2001::22</destAddr></pdu><pdu name="NeighborAdvertisement_1" pdu="icmpv6:NeighborAdvertisement"><targetAddress>2001::22</targetAddress></pdu></pdus></config></frame>' streamblock7 = port1.addstreamblock() streamblock7.SetAutoFrameLength_ratebased() streamblock7.SetInsertSig_ratebased('TRUE') streamblock7.SetFrameConfig_ratebased(frameconfig=frame_7) # [Step 1.2]: create streamblock8 NA_mac_not_match self.logger.info('[Step 1.2]: creating streamblock8...') frame_8 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:22</dstMac><srcMac>00:00:00:00:00:0B</srcMac><vlans name="anon_20712"><Vlan name="Vlan"><pri>000</pri><id>4094</id></Vlan></vlans></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::2</sourceAddr><destAddr>2001::22</destAddr></pdu><pdu name="NeighborAdvertisement_1" pdu="icmpv6:NeighborAdvertisement"><targetAddress>2001::22</targetAddress></pdu></pdus></config></frame>' streamblock8 = port1.addstreamblock() streamblock8.SetAutoFrameLength_ratebased() streamblock8.SetInsertSig_ratebased('TRUE') streamblock8.SetFrameConfig_ratebased(frameconfig=frame_8) # [Step 1.2]: create streamblock9 NA_ip_not_match self.logger.info('[Step 1.2]: creating streamblock9...') frame_9 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:22</dstMac><srcMac>00:00:00:00:00:02</srcMac><vlans name="anon_20721"><Vlan name="Vlan"><pri>000</pri><id>4094</id></Vlan></vlans></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::b</sourceAddr><destAddr>2001::22</destAddr></pdu><pdu name="NeighborAdvertisement_1" pdu="icmpv6:NeighborAdvertisement"><targetAddress>2001::22</targetAddress></pdu></pdus></config></frame>' streamblock9 = port1.addstreamblock() streamblock9.SetAutoFrameLength_ratebased() streamblock9.SetInsertSig_ratebased('TRUE') streamblock9.SetFrameConfig_ratebased(frameconfig=frame_9) # [Step 1.2]: create streamblock10 NA_vlan_not_match self.logger.info('[Step 1.2]: creating streamblock10...') frame_10 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>33:33:FF:00:00:22</dstMac><srcMac>00:00:00:00:00:02</srcMac><vlans name="anon_20730"><Vlan name="Vlan"><pri>000</pri><id>1</id></Vlan></vlans></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::2</sourceAddr><destAddr>2001::22</destAddr></pdu><pdu name="NeighborAdvertisement_1" pdu="icmpv6:NeighborAdvertisement"><targetAddress>2001::22</targetAddress></pdu></pdus></config></frame>' streamblock10 = port1.addstreamblock() streamblock10.SetAutoFrameLength_ratebased() streamblock10.SetInsertSig_ratebased('TRUE') streamblock10.SetFrameConfig_ratebased(frameconfig=frame_10) # [Step 1.2]: create streamblock11 IP_match self.logger.info('[Step 1.2]: creating streamblock11...') frame_11 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>00:00:00:00:00:22</dstMac><srcMac>00:00:00:00:00:02</srcMac><vlans name="anon_20739"><Vlan name="Vlan"><pri>000</pri><id>4094</id></Vlan></vlans></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::2</sourceAddr><destAddr>2001::22</destAddr></pdu></pdus></config></frame>' streamblock11 = port1.addstreamblock() streamblock11.SetAutoFrameLength_ratebased() streamblock11.SetInsertSig_ratebased('TRUE') streamblock11.SetFrameConfig_ratebased(frameconfig=frame_11) # [Step 1.2]: create streamblock12 IP_not_match self.logger.info('[Step 1.2]: creating streamblock12...') frame_12 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble minByteLength="8" >fb555555555555d5</preamble><dstMac>00:00:00:00:00:22</dstMac><srcMac>00:00:00:00:00:0A</srcMac><vlans name="anon_20746"><Vlan name="Vlan"><pri>000</pri><id>4094</id></Vlan></vlans></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>2001::2</sourceAddr><destAddr>2001::22</destAddr></pdu></pdus></config></frame>' streamblock12 = port1.addstreamblock() streamblock12.SetAutoFrameLength_ratebased() streamblock12.SetInsertSig_ratebased('TRUE') streamblock12.SetFrameConfig_ratebased(frameconfig=frame_12) # [Step 1.2]: create streamblock13 RS_match self.logger.info('[Step 1.2]: creating streamblock13...') frame_13 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble>fb555555555555d5</preamble><dstMac>33:33:00:00:00:02</dstMac><srcMac>00:00:00:00:00:01</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>FE80::0200:00FF:FE00:0001</sourceAddr><destAddr>FF02::2</destAddr></pdu><pdu name="RouterSolicitation_1" pdu="icmpv6:RouterSolicitation"><linkLayerOption name="anon_22242"><LinkLayerAddress name="LinkLayerAddress_0"><value>000000000001</value></LinkLayerAddress></linkLayerOption></pdu></pdus></config></frame>' streamblock13 = port1.addstreamblock() streamblock13.SetAutoFrameLength_ratebased() streamblock13.SetInsertSig_ratebased('TRUE') streamblock13.SetFrameConfig_ratebased(frameconfig=frame_13) # [Step 1.2]: create streamblock14 RS_not_match self.logger.info('[Step 1.2]: creating streamblock14...') frame_14 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble>fb555555555555d5</preamble><dstMac>33:33:00:00:00:02</dstMac><srcMac>00:00:00:00:00:11</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>FE80::0200:00FF:FE00:0011</sourceAddr><destAddr>FF02::2</destAddr></pdu><pdu name="RouterSolicitation_1" pdu="icmpv6:RouterSolicitation"><linkLayerOption name="anon_22373"><LinkLayerAddress name="LinkLayerAddress_0"><value>000000000011</value></LinkLayerAddress></linkLayerOption></pdu></pdus></config></frame>' streamblock14 = port1.addstreamblock() streamblock14.SetAutoFrameLength_ratebased() streamblock14.SetInsertSig_ratebased('TRUE') streamblock14.SetFrameConfig_ratebased(frameconfig=frame_14) # [Step 1.2]: create streamblock15 RA_MATCH_not_pass self.logger.info('[Step 1.2]: creating streamblock15...') frame_15 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble>fb555555555555d5</preamble><dstMac>33:33:00:00:00:01</dstMac><srcMac>00:00:00:00:00:01</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>FE80::0200:00FF:FE00:0001</sourceAddr><destAddr>FF02::1</destAddr></pdu><pdu name="RouterAdvertisement_1" pdu="icmpv6:RouterAdvertisement"><routerLifetime>3600</routerLifetime><reachableTime>3600</reachableTime><prefixOption name="anon_23046"><PrefixInformation name="PrefixInformation_0"><validLifetime>3600</validLifetime><preferredLifetime>3600</preferredLifetime><prefix>3001::</prefix></PrefixInformation></prefixOption></pdu></pdus></config></frame>' streamblock15 = port1.addstreamblock() streamblock15.SetAutoFrameLength_ratebased() streamblock15.SetInsertSig_ratebased('TRUE') streamblock15.SetFrameConfig_ratebased(frameconfig=frame_15) # [Step 1.2]: create streamblock16 RR_MATCH_not_pass self.logger.info('[Step 1.2]: creating streamblock16...') frame_16 = '<frame><config><pdus><pdu name="eth1" pdu="ethernet:EthernetII"><preamble>fb555555555555d5</preamble><dstMac>33:33:00:00:00:01</dstMac><srcMac>00:00:00:00:00:01</srcMac></pdu><pdu name="proto1" pdu="ipv6:IPv6"><payloadLength>0</payloadLength><sourceAddr>FE80::0200:00FF:FE00:0001</sourceAddr><destAddr>FF02::1</destAddr></pdu><pdu name="Redirect_1" pdu="icmpv6:Redirect"></pdu></pdus></config></frame>' streamblock16 = port1.addstreamblock() streamblock16.SetAutoFrameLength_ratebased() streamblock16.SetInsertSig_ratebased('TRUE') streamblock16.SetFrameConfig_ratebased(frameconfig=frame_16) # [Step 1.2]: save stc config self.logger.info('[Step 1.2]: saving stc config...') stc.StcControl.Apply('stc') stc.StcControl.SaveToTcc('stc', 'ts887553.tcc') ########################################################发流测试############################################################ step_2 = 'Step 2. glabal : disable, vlan_1: disable, vlan_1_log: disable, vlan_4094: disable, vlan_4094_log: disable, send: S1-12' self.logger.info(step_2) client1.dut_iface.exec_command('no ipv6 nd detection') client1.dut_iface.exec_command('no ipv6 nd detection vlan 1,4094') client1.dut_iface.exec_command('no ipv6 nd detection vlan 1,4094 logging') network_security_global_config.send_streamblock_and_check(stc, result, [streamblock1, streamblock2, streamblock3, streamblock4, streamblock5, streamblock6, streamblock7, streamblock8, streamblock9, streamblock10, streamblock11, streamblock12], port1, port2,{port2.port: '12'}, step_2) # log check step_3 = 'Step 3. glabal : disable, vlan_1: disable, vlan_1_log: disable, vlan_4094: enable, vlan_4094_log: enable, send: S1-12' self.logger.info(step_2) client1.dut_iface.exec_command('no ipv6 nd detection') client1.dut_iface.exec_command('no ipv6 nd detection vlan 1') client1.dut_iface.exec_command('no ipv6 nd detection vlan 1 logging') client1.dut_iface.exec_command('ipv6 nd detection vlan 4094') client1.dut_iface.exec_command('ipv6 nd detection vlan 4094 logging') network_security_global_config.send_streamblock_and_check(stc, result, [streamblock1, streamblock2, streamblock3, streamblock4, streamblock5, streamblock6, streamblock7, streamblock8, streamblock9, streamblock10, streamblock11, streamblock12], port1, port2, {port2.port: '12'}, step_2) # log check except Exception as e: # break test by exception result.add_result(passfail=ResultInfo.FAIL, test_comment='Test fail: %s' % e) finally: return result def clean_test(self): try: self.logger.info('[clean_test] start to clean test...') except Exception as e: self.logger.error('[clean_test] clean test failed: %s' % e) raise e 下发完输入2中的CLI,我们应该可以创流发流了,我给的这个参考代码是一个standalone代码,但是这个代码的流和我的用例中的16条流一致,而且创流发流这个操作controller和standalone应该没有区别,你参考这个来帮我接着写吧,写到输入2中发完16条流为止,从step3下发完CLI开始
09-01
【无人机】基于改进粒子群算法的无人机路径规划研究[和遗传算法、粒子群算法进行比较](Matlab代码实现)内容概要:本文围绕基于改进粒子群算法的无人机路径规划展开研究,重点探讨了在复杂环境中利用改进粒子群算法(PSO)实现无人机三维路径规划的方法,并将其与遗传算法(GA)、标准粒子群算法等传统优化算法进行对比分析。研究内容涵盖路径规划的多目标优化、避障策略、航路点约束以及算法收敛性和寻优能力的评估,所有实验均通过Matlab代码实现,提供了完整的仿真验证流程。文章还提到了多种智能优化算法在无人机路径规划中的应用比较,突出了改进PSO在收敛速度和全局寻优方面的优势。; 适合人群:具备一定Matlab编程基础和优化算法知识的研究生、科研人员及从事无人机路径规划、智能优化算法研究的相关技术人员。; 使用场景及目标:①用于无人机在复杂地形或动态环境下的三维路径规划仿真研究;②比较不同智能优化算法(如PSO、GA、蚁群算法、RRT等)在路径规划中的性能差异;③为多目标优化问题提供算法选型和改进思路。; 阅读建议:建议读者结合文中提供的Matlab代码进行实践操作,重点关注算法的参数设置、适应度函数设计及路径约束处理方式,同时可参考文中提到的多种算法对比思路,拓展到其他智能优化算法的研究与改进中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值