基于Jaya优化算法的电力系统最优潮流研究(Matlab代码实现)

news2025/1/31 3:13:08

 💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

电力系统最优潮流是指在满足电力系统各种约束条件的前提下,使得系统的总损耗最小的潮流分布状态。最优潮流问题是电力系统运行和规划中的重要问题之一,对于确保电力系统的安全、稳定和经济运行具有重要意义。

最优潮流问题可以用一个非线性优化问题来表示,目标函数是最小化系统的总损耗,约束条件包括节点功率平衡方程、节点电压幅值和相角限制、线路功率限制等。解决最优潮流问题需要使用数学方法和计算工具,常用的方法包括牛顿-拉夫森法、潮流迭代法、内点法等。

最优潮流问题的解决可以为电力系统运行和规划提供重要的参考依据。通过调整潮流分布,可以减少系统的总损耗,提高系统的运行效率和经济性。此外,最优潮流问题还可以应用于电力市场运营、电力交易和电力系统规划等领域,为电力系统的可持续发展提供支持。

基于Jaya优化算法的电力系统最优潮流研究是一种针对电力系统进行优化设计的方法。Jaya优化算法是一种基于自然界中的蝗虫聚群行为进行优化的算法,通过模拟蝗虫在自然界中的聚群行为,寻找最优解。该算法具有收敛速度快、精度高、易于实现等优点。

在电力系统最优潮流研究中,Jaya优化算法被用于寻找电力系统中最优的电压和功率分配方案。通过对电力系统中各个节点的电压和功率进行优化,可以实现电力系统的最优化运行,提高电力系统的效率和可靠性。同时,该方法还可以实现电力系统的负荷均衡,减少电力系统的能源损耗和污染,具有重要的应用价值。

📚2 运行结果

主函数代码:

%+++++++++++++++++++ Data base of the power system ++++++++++++++++++++++++
% The following file contains information about the topology of the power
% system such as the bus and line matrix
data_39;
% original matrix and generation buses
bus_o=bus; line_o=line;
slack=find(bus(:,10)==1); % Slack bus
PV=find(bus(:,10)==2);   % Generation buses PV
Bgen=vertcat(slack,PV);     % Slack and PV buses
PQ=find(bus(:,10)==3);   % Load buses

% +++++++++++++++ Parameters of the optimization algorithm ++++++++++++++++
pop =  210;                                % Size of the population
n_itera = 35;                             % Number of iterations of the optimization algorithm
Vmin=0.95;                                % Minimum value of voltage for the generators
Vmax=1.05;                                % Maximum value of voltage for the generators
mini_tap = 0.95;                          % Minimum value of the TAP
maxi_tap = 1.05;                          % Maximum value of the TAP
Smin=-0.5;                                % Minimum Shunt value
Smax=0.5;                                 % Maximum Sunt value
pos_Shunt = find( bus(:,11) ~= 0);        % Positions of Shunts in bus matrix
pos_tap = find( line(:,6) ~= 0);          % Positions of TAPs in line matrix
tap_o = line(pos_tap,6);                  % Original values of TAPs
Shunt_o = bus(pos_Shunt,9);               % Original values of Shunts
n_tap = length(pos_tap);                  % number of TAPs
n_Shunt = length(pos_Shunt);              % number of Shunts
n_nodos = length(bus(:,1));               % number of buses of the power system

% ++++++++++++++++ First: Run power flow for the base case ++++++++++++++++
% Store V and theta of the base case
[V_o,Theta_o,~] = PowerFlowClassical(bus_o,line_o);
% +++++++++++++++++++Compute the active power lossess++++++++++++++++++++++
nbranch=length(line_o(:,1));
FromNode=line_o(:,1);
ToNode=line_o(:,2);
for k=1:nbranch
    a(k)=line_o(k,6);
    if a(k)==0 % in this case, we are analyzing lines
        Zpq(k)=line_o(k,3)+1i*line_o(k,4); % impedance of the transmission line
        Ypq(k)=Zpq(k)^-1; % admittance of the transmission linee
        gpq(k)=real(Ypq(k)); % conductance of the transmission line
        % Active power loss of the corresponding line
        Llpq(k)=gpq(k)*(V_o(FromNode(k))^2 +V_o(ToNode(k))^2 -2*V_o(FromNode(k))*V_o(ToNode(k))*cos(Theta_o(FromNode(k))-Theta_o(ToNode(k))));
    end
end
% Total active power lossess
Plosses=sum(Llpq);
% +++++++++++++++++++++++++++ Optimum power flow ++++++++++++++++++++++++++
% Start the population 
for k=1:n_tap % Start the TAP population
    x_tap(:,k) = mini_tap +(maxi_tap - mini_tap)*(0.1*floor((10*rand(pop,1))));
end 
for k=1:n_Shunt % Start the Shunt population
     x_shunt(:,k) = Smin +(Smax - Smin)*(0.1*floor((10*rand(pop,1))));
end
for k=1:length(Bgen) % Start the population of voltage from generators
    x_vg(:,k) = Vmin +(Vmax - Vmin)*(0.1*floor((10*rand(pop,1))));
end
% JAYA algorithm
for k=1:n_itera
    % with the new values of the TAPs, Shunts and VGs recompute V and Ybus
    % Modify line and bus matrix
    for p=1:pop
        for q=1:n_tap
            r=pos_tap(q);
            line(r,6)=x_tap(p,q); % modification of line matrix acording to the new TAP values
        end; clear r
        for qa=1:n_Shunt
            r=pos_Shunt(qa);
             bus(r,9)=x_shunt(p,qa); % modification of bus matrix according to the new Shunt values
        end; clear r
        for qb=1:length(Bgen)
            r=Bgen(qb);
            bus(r,2)=x_vg(p,qb); % modification of bus matrix according to the new VG values
        end
        % With the new line and bus matrix run power flow
        [V_n,Theta_n,~] = PowerFlowClassical(bus,line);
        % Objective function
        [F,~] = ObjectiveFunction(V_n,line_o,Bgen,Theta_n,nbranch,FromNode,ToNode,PQ);
        Ofun=F; Obfun(k,p)=F;
    end
    % Define the new values of the desition variables: VGs, TAPs and Shunts
    [x1,x2,x3] = UpdateDesitionVariables(Obfun(k,:),x_tap,x_shunt,x_vg);
    % In this section, correct the particles that are surpassing the
    % minimum/ maximum established values
    % TAP values
    xselect=round(100*x1); %discretize TAP values
    x1=xselect/100;
    x1a=x1;
    for p=1:n_tap
        for i=1:pop
            if x1(i,p)<mini_tap
                x1a(i,p)=mini_tap;
            end
            if x1(i,p)>maxi_tap
                x1a(i,p)=maxi_tap;
            end
        end
    end
    % Shunt elements
    x2a=x2;
    for p=1:n_Shunt
        for i=1:pop
            if x2(i,p)<Smin
                x2a(i,p)=Smin;
            end
            if x2(i,p)>Smax
                x2a(i,p)=Smax;
            end
        end
    end
    % Voltages from generators
    x3a=x3;
    for p=1:length(Bgen)
        for i=1:pop
            if x3(i,p)<Vmin
                x3a(i,p)=Vmin;
            end
            if x3(i,p)>Vmax
                x3a(i,p)=Vmax;
            end
        end
    end
    x_tap=x1a; x_shunt=x2a; x_vg=x3a;
    % With the corrected updated values, modify bus and line matrix
    for p=1:pop
        for q=1:n_tap
            r=pos_tap(q);
            line(r,6)=x_tap(p,q); % modification of line matrix acording to the new corrected TAP values
        end; clear r
        for qa=1:n_Shunt
            r=pos_Shunt(qa);
             bus(r,9)=x_shunt(p,qa); % modification of bus matrix according to the new corrected Shunt values
        end; clear r
        for qb=1:length(Bgen)
            r=Bgen(qb);
            bus(r,2)=x_vg(p,qb); % modification of bus matrix according to the new corrected VG values
        end
        % Run Newton Raphson 
        [V_n,Theta_n,~] = PowerFlowClassical(bus,line);
        % Objective function
        [Fnew,~] = ObjectiveFunction(V_n,line,Bgen,Theta_n,nbranch,FromNode,ToNode,PQ);
        Obfunnew(k,p)=Fnew;
    end
    % Store values of TAPS, SHUNTS AND VGS for every iteration
    XTAP(k,:,:)=x1a; XSHUNT(k,:,:)=x2a; XVG(k,:,:)=x3a;
if k>1
    for i=1:pop
        if(Obfunnew(k-1,i)<Obfunnew(k,i))
            x_tap(i,:)=XTAP(k-1,i,:); x_shunt(i,:)=XSHUNT(k-1,i,:); x_vg(i,:)=XVG(k-1,i,:);
            Obfunnew(k,i)=Obfunnew(k-1,i);
            % In case that we needed the values of the previos iterations,
            % we will have to change the storing matrix XTAP XSHUNT and XVG
            XTAP(k,i,:)=x_tap(i,:); XSHUNT(k,i,:)=x_shunt(i,:); XVG(k,i,:)=x_vg(i,:);
        end
    end
end
% best solution at each iteration
bsof(k)=min(Obfunnew(k,:));
% Find the values of TAPs, Shunts and VGs associated to the best solution
for i=1:pop
    if bsof(k)==Obfunnew(k,i)
        xitap(k,:)=x_tap(i,:); % TAP values associate to the best solution
        xishunt(k,:)=x_shunt(i,:); % Shunt values associate to the best solution
        xivg(k,:)=x_vg(i,:); % VG values associate to the best solution
    end
end
end
% ++++++++++++++++++++++++++++++++++Solution ++++++++++++++++++++++++++++++
% once the optimization algorithm has sttoped, run power flow with the
% solutions provided 
% First, we modify line and bus
for q=1:n_tap
    r=pos_tap(q);
    line(r,6)=xitap(end,q); % modification of line matrix acording to the new corrected TAP values
end; clear r
for qa=1:n_Shunt
    r=pos_Shunt(qa);
     bus(r,9)=xishunt(end,qa); % modification of bus matrix according to the new corrected Shunt values
end; clear r
for qb=1:length(Bgen)
    r=Bgen(qb);
    bus(r,2)=xivg(end,qb); % modification of bus matrix according to the new corrected VG values
end
[Vs,Thetas,~] = PowerFlowClassical(bus,line);
[Fobjective,Pls] = ObjectiveFunction(Vs,line,Bgen,Thetas,nbranch,FromNode,ToNode,PQ);
% ++++++++++++++++++++++++++++++ Print results ++++++++++++++++++++++++++++
disp('OPTIMIZACI覰 MEDIANTE ALGORITMO JAYA')
 disp(' ')
 disp(' ')
 disp('                  VOLTAGE                ANGLE ')
 disp('             -----------------     ----------------  ')
 disp('     BUS      Orig       JAYA     Orig        JAYA  ')
 disp(' ')
 display_1=[bus(:,1) V_o  Vs  Theta_o*(180/pi) Thetas*(180/pi)];
 disp(display_1)
figure (1)
plot(bsof,'r'); xlabel('Iterations'); ylabel('Function value')
figure (2)
title('Voltage profile')
for k=1:n_nodos
    Lim1(k)=0.95;
    Lim2(k)=1.05;
end
plot(V_o); hold on; plot(Vs); hold on; plot(Lim1,'--k'); hold on; plot(Lim2,'--k'); xlabel('# bus'); ylabel('Magnitude (pu)')
legend('Voltage base case','Voltage for the optimum solution')
figure (3)
title('Active power lossess')
y=[Plosses,Pls];
c=categorical({'Base case','Optimum solution'});
bar(c,y,'FaceColor',[0 .5 .5],'EdgeColor',[0 .9 .9],'LineWidth',1.5)
ylabel('Total active power lossess (pu)')
figure (4)
title('TAP values comparison')
plot(tap_o); hold on; plot(xitap(end,:)); xlabel('# Transformer'); ylabel('TAP value (pu)')
legend('Base case','Optimum solution')

%+++++++++++++++++++ Data base of the power system ++++++++++++++++++++++++
% The following file contains information about the topology of the power
% system such as the bus and line matrix
data_39;
% original matrix and generation buses
bus_o=bus; line_o=line;
slack=find(bus(:,10)==1); % Slack bus
PV=find(bus(:,10)==2);   % Generation buses PV
Bgen=vertcat(slack,PV);     % Slack and PV buses
PQ=find(bus(:,10)==3);   % Load buses

% +++++++++++++++ Parameters of the optimization algorithm ++++++++++++++++
pop =  210;                                % Size of the population
n_itera = 35;                             % Number of iterations of the optimization algorithm
Vmin=0.95;                                % Minimum value of voltage for the generators
Vmax=1.05;                                % Maximum value of voltage for the generators
mini_tap = 0.95;                          % Minimum value of the TAP
maxi_tap = 1.05;                          % Maximum value of the TAP
Smin=-0.5;                                % Minimum Shunt value
Smax=0.5;                                 % Maximum Sunt value
pos_Shunt = find( bus(:,11) ~= 0);        % Positions of Shunts in bus matrix
pos_tap = find( line(:,6) ~= 0);          % Positions of TAPs in line matrix
tap_o = line(pos_tap,6);                  % Original values of TAPs
Shunt_o = bus(pos_Shunt,9);               % Original values of Shunts
n_tap = length(pos_tap);                  % number of TAPs
n_Shunt = length(pos_Shunt);              % number of Shunts
n_nodos = length(bus(:,1));               % number of buses of the power system

% ++++++++++++++++ First: Run power flow for the base case ++++++++++++++++
% Store V and theta of the base case
[V_o,Theta_o,~] = PowerFlowClassical(bus_o,line_o);
% +++++++++++++++++++Compute the active power lossess++++++++++++++++++++++
nbranch=length(line_o(:,1));
FromNode=line_o(:,1);
ToNode=line_o(:,2);
for k=1:nbranch
    a(k)=line_o(k,6);
    if a(k)==0 % in this case, we are analyzing lines
        Zpq(k)=line_o(k,3)+1i*line_o(k,4); % impedance of the transmission line
        Ypq(k)=Zpq(k)^-1; % admittance of the transmission linee
        gpq(k)=real(Ypq(k)); % conductance of the transmission line
        % Active power loss of the corresponding line
        Llpq(k)=gpq(k)*(V_o(FromNode(k))^2 +V_o(ToNode(k))^2 -2*V_o(FromNode(k))*V_o(ToNode(k))*cos(Theta_o(FromNode(k))-Theta_o(ToNode(k))));
    end
end
% Total active power lossess
Plosses=sum(Llpq);
% +++++++++++++++++++++++++++ Optimum power flow ++++++++++++++++++++++++++
% Start the population 
for k=1:n_tap % Start the TAP population
    x_tap(:,k) = mini_tap +(maxi_tap - mini_tap)*(0.1*floor((10*rand(pop,1))));
end 
for k=1:n_Shunt % Start the Shunt population
     x_shunt(:,k) = Smin +(Smax - Smin)*(0.1*floor((10*rand(pop,1))));
end
for k=1:length(Bgen) % Start the population of voltage from generators
    x_vg(:,k) = Vmin +(Vmax - Vmin)*(0.1*floor((10*rand(pop,1))));
end
% JAYA algorithm
for k=1:n_itera
    % with the new values of the TAPs, Shunts and VGs recompute V and Ybus
    % Modify line and bus matrix
    for p=1:pop
        for q=1:n_tap
            r=pos_tap(q);
            line(r,6)=x_tap(p,q); % modification of line matrix acording to the new TAP values
        end; clear r
        for qa=1:n_Shunt
            r=pos_Shunt(qa);
             bus(r,9)=x_shunt(p,qa); % modification of bus matrix according to the new Shunt values
        end; clear r
        for qb=1:length(Bgen)
            r=Bgen(qb);
            bus(r,2)=x_vg(p,qb); % modification of bus matrix according to the new VG values
        end
        % With the new line and bus matrix run power flow
        [V_n,Theta_n,~] = PowerFlowClassical(bus,line);
        % Objective function
        [F,~] = ObjectiveFunction(V_n,line_o,Bgen,Theta_n,nbranch,FromNode,ToNode,PQ);
        Ofun=F; Obfun(k,p)=F;
    end
    % Define the new values of the desition variables: VGs, TAPs and Shunts
    [x1,x2,x3] = UpdateDesitionVariables(Obfun(k,:),x_tap,x_shunt,x_vg);
    % In this section, correct the particles that are surpassing the
    % minimum/ maximum established values
    % TAP values
    xselect=round(100*x1); %discretize TAP values
    x1=xselect/100;
    x1a=x1;
    for p=1:n_tap
        for i=1:pop
            if x1(i,p)<mini_tap
                x1a(i,p)=mini_tap;
            end
            if x1(i,p)>maxi_tap
                x1a(i,p)=maxi_tap;
            end
        end
    end
    % Shunt elements
    x2a=x2;
    for p=1:n_Shunt
        for i=1:pop
            if x2(i,p)<Smin
                x2a(i,p)=Smin;
            end
            if x2(i,p)>Smax
                x2a(i,p)=Smax;
            end
        end
    end
    % Voltages from generators
    x3a=x3;
    for p=1:length(Bgen)
        for i=1:pop
            if x3(i,p)<Vmin
                x3a(i,p)=Vmin;
            end
            if x3(i,p)>Vmax
                x3a(i,p)=Vmax;
            end
        end
    end
    x_tap=x1a; x_shunt=x2a; x_vg=x3a;
    % With the corrected updated values, modify bus and line matrix
    for p=1:pop
        for q=1:n_tap
            r=pos_tap(q);
            line(r,6)=x_tap(p,q); % modification of line matrix acording to the new corrected TAP values
        end; clear r
        for qa=1:n_Shunt
            r=pos_Shunt(qa);
             bus(r,9)=x_shunt(p,qa); % modification of bus matrix according to the new corrected Shunt values
        end; clear r
        for qb=1:length(Bgen)
            r=Bgen(qb);
            bus(r,2)=x_vg(p,qb); % modification of bus matrix according to the new corrected VG values
        end
        % Run Newton Raphson 
        [V_n,Theta_n,~] = PowerFlowClassical(bus,line);
        % Objective function
        [Fnew,~] = ObjectiveFunction(V_n,line,Bgen,Theta_n,nbranch,FromNode,ToNode,PQ);
        Obfunnew(k,p)=Fnew;
    end
    % Store values of TAPS, SHUNTS AND VGS for every iteration
    XTAP(k,:,:)=x1a; XSHUNT(k,:,:)=x2a; XVG(k,:,:)=x3a;
if k>1
    for i=1:pop
        if(Obfunnew(k-1,i)<Obfunnew(k,i))
            x_tap(i,:)=XTAP(k-1,i,:); x_shunt(i,:)=XSHUNT(k-1,i,:); x_vg(i,:)=XVG(k-1,i,:);
            Obfunnew(k,i)=Obfunnew(k-1,i);
            % In case that we needed the values of the previos iterations,
            % we will have to change the storing matrix XTAP XSHUNT and XVG
            XTAP(k,i,:)=x_tap(i,:); XSHUNT(k,i,:)=x_shunt(i,:); XVG(k,i,:)=x_vg(i,:);
        end
    end
end
% best solution at each iteration
bsof(k)=min(Obfunnew(k,:));
% Find the values of TAPs, Shunts and VGs associated to the best solution
for i=1:pop
    if bsof(k)==Obfunnew(k,i)
        xitap(k,:)=x_tap(i,:); % TAP values associate to the best solution
        xishunt(k,:)=x_shunt(i,:); % Shunt values associate to the best solution
        xivg(k,:)=x_vg(i,:); % VG values associate to the best solution
    end
end
end
% ++++++++++++++++++++++++++++++++++Solution ++++++++++++++++++++++++++++++
% once the optimization algorithm has sttoped, run power flow with the
% solutions provided 
% First, we modify line and bus
for q=1:n_tap
    r=pos_tap(q);
    line(r,6)=xitap(end,q); % modification of line matrix acording to the new corrected TAP values
end; clear r
for qa=1:n_Shunt
    r=pos_Shunt(qa);
     bus(r,9)=xishunt(end,qa); % modification of bus matrix according to the new corrected Shunt values
end; clear r
for qb=1:length(Bgen)
    r=Bgen(qb);
    bus(r,2)=xivg(end,qb); % modification of bus matrix according to the new corrected VG values
end
[Vs,Thetas,~] = PowerFlowClassical(bus,line);
[Fobjective,Pls] = ObjectiveFunction(Vs,line,Bgen,Thetas,nbranch,FromNode,ToNode,PQ);
% ++++++++++++++++++++++++++++++ Print results ++++++++++++++++++++++++++++
disp('OPTIMIZACI覰 MEDIANTE ALGORITMO JAYA')
 disp(' ')
 disp(' ')
 disp('                  VOLTAGE                ANGLE ')
 disp('             -----------------     ----------------  ')
 disp('     BUS      Orig       JAYA     Orig        JAYA  ')
 disp(' ')
 display_1=[bus(:,1) V_o  Vs  Theta_o*(180/pi) Thetas*(180/pi)];
 disp(display_1)
figure (1)
plot(bsof,'r'); xlabel('Iterations'); ylabel('Function value')
figure (2)
title('Voltage profile')
for k=1:n_nodos
    Lim1(k)=0.95;
    Lim2(k)=1.05;
end
plot(V_o); hold on; plot(Vs); hold on; plot(Lim1,'--k'); hold on; plot(Lim2,'--k'); xlabel('# bus'); ylabel('Magnitude (pu)')
legend('Voltage base case','Voltage for the optimum solution')
figure (3)
title('Active power lossess')
y=[Plosses,Pls];
c=categorical({'Base case','Optimum solution'});
bar(c,y,'FaceColor',[0 .5 .5],'EdgeColor',[0 .9 .9],'LineWidth',1.5)
ylabel('Total active power lossess (pu)')
figure (4)
title('TAP values comparison')
plot(tap_o); hold on; plot(xitap(end,:)); xlabel('# Transformer'); ylabel('TAP value (pu)')
legend('Base case','Optimum solution')

🎉3 参考文献

文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。

[1]李璇.基于遗传算法的电力系统最优潮流问题研究[D].华中科技大学,2007.

[2]尤金.基于Jaya算法的DG优化配置研究[D].天津大学,2018.

[3]蒋承刚,熊国江,帅茂杭.基于DE-Jaya混合优化算法的电力系统经济调度方法[J].传感器与微系统, 2023.

🌈4 Matlab代码实现

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1094222.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【问题思考总结】为什么一点的泰勒展开可以在任意点逼近函数?【泰勒公式 泰勒定理的适用范围】

泰勒公式&#xff08;带皮亚诺余项的n阶泰勒公式&#xff09;指出了在一点可以用泰勒公式拟合出多项式函数进行无穷逼近&#xff0c;而因为只用到了一点n阶导数值&#xff0c;因此在该点n阶可导即可&#xff0c;是关于一个点的定性分析&#xff0c;一般用于求极限。 泰勒定理&…

Nginx:虚拟主机(原理+案例)

示意图&#xff1a; 虚拟主机 虚拟主机是一种特殊的互联网服务&#xff0c;让你的网站能够在互联网上被访问。通过虚拟主机&#xff0c;多个网站可以共享一个物理服务器的资源&#xff0c;包括 CPU、内存、硬盘存储和网络带宽。每个网站在虚拟主机上运行&#xff0c;就如同它们…

CSDN里的常用网址(2)

你问我为啥要写这篇&#xff0c;一是因为我自己总是记不住&#xff0c;二是想给大家提供便捷&#xff0c;懂了吧&#xff01; 1、需求广场https://download.csdn.net/taskCenter/home?utm_sourceupload_qplaza_infopage_windhttps://download.csdn.net/taskCenter/home?utm_…

C++笔记之一个轻量级的线程池库threadpool

C笔记之一个轻量级的线程池库threadpool code review! 抄自&#xff1a;https://github.com/lzpong/ 文章目录 C笔记之一个轻量级的线程池库threadpool1.threadpool.h2.使用&#xff1a;test2.cc3.使用&#xff1a;test1.cc4.代码 1.threadpool.h 2.使用&#xff1a;test2.cc…

【医学影像处理】基于MRIcron的dcm2nii批量dcm转nii格式

MRIcron下载 MRIcron下载官网 选择适合自己环境的版本&#xff0c;我使用的是windows版本 MRIcron介绍 MRICron是一款用于处理磁共振成像&#xff08;MRI&#xff09;数据的免费开源软件工具。它是一个功能强大的图像处理程序&#xff0c;主要用于可视化、分析和处理医学影…

代码更换了目录,没有任何变更,但Idea编辑器却提示所有代码都变更了?

开发环境&#xff1a; springboot 2.4.3idea 2020 问题描述&#xff1a; 1、代码copy到U盘了&#xff0c;今天用idea打开U盘代码&#xff0c;却提示所有代码都被修改了 2、diff 文件看了&#xff0c;其实并没有任何修改&#xff0c;因为就算不小心误改了&#xff0c;也不能全…

36.树与二叉树练习(2)(王道第5章综合练习)

试题1&#xff08;王道5.3.3节第16题&#xff09;&#xff1a; 设计算法将二叉树的叶结点按从左到右的顺序连成单链表&#xff0c;连接时使用叶结点的右指针域存放单链表指针。 借助遍历算法完成&#xff1a; //根据二叉树层次遍历序列构造单链表 void LevelOrdertoLinkList…

Qt事件传播机制 day8

Qt事件传播机制 day8 事件的接受和忽略 当空间忽略事件时&#xff0c;事件会继续往上传播&#xff0c;这里的传播指传播给父组件QEvent有accept()函数与ignore()函数 accept()&#xff1a;本组件处理该事件&#xff0c;这个事件就不会被继续传播给其父组件ignore()&#xff1…

spring boot Rabbit高级教程

消息可靠性 生产者重试机制 首先第一种情况&#xff0c;就是生产者发送消息时&#xff0c;出现了网络故障&#xff0c;导致与MQ的连接中断。 为了解决这个问题&#xff0c;SpringAMQP提供的消息发送时的重试机制。即&#xff1a;当RabbitTemplate与MQ连接超时后&#xff0c;…

分类预测 | MATLAB实现SSA-CNN-LSTM-Attention数据分类预测

分类预测 | MATLAB实现SSA-CNN-LSTM-Attention数据分类预测 目录 分类预测 | MATLAB实现SSA-CNN-LSTM-Attention数据分类预测分类效果基本描述模型描述程序设计参考资料 分类效果 基本描述 1.MATLAB实现WOA-CNN-LSTM-Attention数据分类预测&#xff0c;运行环境Matlab2021b及以…

Marin说PCB之BGA焊盘削焊盘带来的焊接问题和解决办法

每周日上午10点钟都是小编最开心的时间了&#xff0c;这个点是斗破苍穹播出的时间。小编我从萧炎从这个动漫开播到现在都追了好多年了&#xff0c;强烈推荐喜欢这个小说的可以看这个动漫&#xff0c;拍的还不错&#xff0c;只是萧炎的配音不再是张沛老师了&#xff0c;有点可惜…

Python实验三

1&#xff1a;编程统计英文句子中的单词出现的次数。 要求&#xff1a;输出结果为按照单词在句子中出现的次数降序排列。 提示&#xff1a;用split&#xff08;&#xff09;拆分字符串 # 1&#xff1a;编程统计英文句子中的单词出现的次数。 # 要求&#xff1a;输出结果为按照…

Java 继承与实现

一、继承&#xff08;extends&#xff09; 1.1 继承概念 继承是面向对象的基本特征&#xff0c;它允许子类继承父类的特征和行为&#xff0c;以提高代码的复用率和维护性等。下面一张图生动地展示了继承和类之间的关系&#xff1a; 继承图 上图中&#xff0c;“动物”、“食草…

【Vue面试题二十一】、Vue中的过滤器了解吗?过滤器的应用场景有哪些?

文章底部有个人公众号&#xff1a;热爱技术的小郑。主要分享开发知识、学习资料、毕业设计指导等。有兴趣的可以关注一下。为何分享&#xff1f; 踩过的坑没必要让别人在再踩&#xff0c;自己复盘也能加深记忆。利己利人、所谓双赢。 面试官&#xff1a;Vue中的过滤器了解吗&am…

成为数据分析师要具备什么能力——功法篇(上)

这篇文章适合做了一段时间数据分析工作&#xff0c;开始思考怎么继续提升自己的分析师、运营或者是实习了一段时间的同学&#xff0c;这时的你也许会想几个问题&#xff1a; 为什么我做出来的分析总觉得没有别人的那么高级&#xff1f; 老板为什么总说我的分析“太浅了”&#…

spyder切换conda环境(成功测试)

今天第一次把这个anaconda中配套的spyder的切换环境尝试成功了&#xff0c;特地记录一下 首先明确一点我使用的最新的anaconda的版本是 spyder已经是版本5了&#xff0c;之前的4版本总是出现各种错误 Step1 切换python interpreter 环境是可以直接识别的&#xff0c;不需要…

2023-2024-1 for循环-1(15-38)

7-15 输出闰年 输出21世纪中截止某个年份以来的所有闰年年份。注意&#xff1a;闰年的判别条件是该年年份能被4整除但不能被100整除、或者能被400整除。 输入格式: 输入在一行中给出21世纪的某个截止年份。 输出格式: 逐行输出满足条件的所有闰年年份&#xff0c;即每个年…

华为端到端战略管理体系(DSTE开发战略到执行)的运作日历图/逻辑图及DSTE三大子流程介绍

华为端到端战略管理体系&#xff08;DSTE开发战略到执行&#xff09;的运作日历图/逻辑图及DSTE三大子流程介绍 本文作者 | 谢宁&#xff0c;《华为战略管理法&#xff1a;DSTE实战体系》、《智慧研发管理》作者 添加图片注释&#xff0c;不超过 140 字&#xff08;可选&#…

【VASP】KPOINTS文件介绍

【VASP】KPOINTS文件介绍 一、KPOINTS 的两种结构第一种结构&#xff1a;&#xff08;非对称&#xff09;第二种结构&#xff1a;&#xff08;高对称&#xff09; 二、关于KPOINTS设置的一些经验三、KPOINTS的选取 前言 一、4个常用的输入文件INCAR、POSCAR、POTCAR、KPOINTS I…

MySQL [基础]] 学习笔记

MySQL 学习 文章目录 MySQL 学习1. 数据库三层结构2. 数据在数据库中的存储方式3. SQL 语句分类3.1 备份恢复数据库的表 4. Mysql 常用数据类型(列类型)4.1 数值型(整数)的基本使用4.2 数值型(bit)的使用4.3 数值型(小数)的基本使用4.4 字符串的基本使用(面试题)4.5 字符串使用…