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

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

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

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

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

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

目录

💥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:nbrancha(k)=line_o(k,6);if a(k)==0 % in this case, we are analyzing linesZpq(k)=line_o(k,3)+1i*line_o(k,4); % impedance of the transmission lineYpq(k)=Zpq(k)^-1; % admittance of the transmission lineegpq(k)=real(Ypq(k)); % conductance of the transmission line% Active power loss of the corresponding lineLlpq(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 populationx_tap(:,k) = mini_tap +(maxi_tap - mini_tap)*(0.1*floor((10*rand(pop,1))));
end 
for k=1:n_Shunt % Start the Shunt populationx_shunt(:,k) = Smin +(Smax - Smin)*(0.1*floor((10*rand(pop,1))));
end
for k=1:length(Bgen) % Start the population of voltage from generatorsx_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 matrixfor p=1:popfor q=1:n_tapr=pos_tap(q);line(r,6)=x_tap(p,q); % modification of line matrix acording to the new TAP valuesend; clear rfor qa=1:n_Shuntr=pos_Shunt(qa);bus(r,9)=x_shunt(p,qa); % modification of bus matrix according to the new Shunt valuesend; clear rfor qb=1:length(Bgen)r=Bgen(qb);bus(r,2)=x_vg(p,qb); % modification of bus matrix according to the new VG valuesend% 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 valuesxselect=round(100*x1); %discretize TAP valuesx1=xselect/100;x1a=x1;for p=1:n_tapfor i=1:popif x1(i,p)<mini_tapx1a(i,p)=mini_tap;endif x1(i,p)>maxi_tapx1a(i,p)=maxi_tap;endendend% Shunt elementsx2a=x2;for p=1:n_Shuntfor i=1:popif x2(i,p)<Sminx2a(i,p)=Smin;endif x2(i,p)>Smaxx2a(i,p)=Smax;endendend% Voltages from generatorsx3a=x3;for p=1:length(Bgen)for i=1:popif x3(i,p)<Vminx3a(i,p)=Vmin;endif x3(i,p)>Vmaxx3a(i,p)=Vmax;endendendx_tap=x1a; x_shunt=x2a; x_vg=x3a;% With the corrected updated values, modify bus and line matrixfor p=1:popfor q=1:n_tapr=pos_tap(q);line(r,6)=x_tap(p,q); % modification of line matrix acording to the new corrected TAP valuesend; clear rfor qa=1:n_Shuntr=pos_Shunt(qa);bus(r,9)=x_shunt(p,qa); % modification of bus matrix according to the new corrected Shunt valuesend; clear rfor qb=1:length(Bgen)r=Bgen(qb);bus(r,2)=x_vg(p,qb); % modification of bus matrix according to the new corrected VG valuesend% 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 iterationXTAP(k,:,:)=x1a; XSHUNT(k,:,:)=x2a; XVG(k,:,:)=x3a;
if k>1for i=1:popif(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 XVGXTAP(k,i,:)=x_tap(i,:); XSHUNT(k,i,:)=x_shunt(i,:); XVG(k,i,:)=x_vg(i,:);endend
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:popif bsof(k)==Obfunnew(k,i)xitap(k,:)=x_tap(i,:); % TAP values associate to the best solutionxishunt(k,:)=x_shunt(i,:); % Shunt values associate to the best solutionxivg(k,:)=x_vg(i,:); % VG values associate to the best solutionend
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_tapr=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_Shuntr=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_nodosLim1(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代码实现

相关文章:

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

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…...

Write-Ahead Log(PostgreSQL 14 Internals翻译版)

日志 如果发生停电、操作系统错误或数据库服务器崩溃等故障&#xff0c;RAM中的所有内容都将丢失&#xff1b;只有写入磁盘的数据才会被保留。要在故障后启动服务器&#xff0c;必须恢复数据一致性。如果磁盘本身已损坏&#xff0c;则必须通过备份恢复来解决相同的问题。 理论…...

CUDA 学习记录

1.关于volatile&#xff1a; 对于文章中这个函数&#xff0c; __global__ void reduceUnrollWarps8 (int *g_idata, int *g_odata, unsigned int n) {// set thread IDunsigned int tid threadIdx.x;unsigned int idx blockIdx.x * blockDim.x * 8 threadIdx.x;// convert…...

【Java 进阶篇】深入了解 Bootstrap 按钮和图标

按钮和图标在网页设计中扮演着重要的角色&#xff0c;它们是用户与网站或应用程序交互的关键元素之一。Bootstrap 是一个流行的前端框架&#xff0c;提供了丰富的按钮样式和图标库&#xff0c;使开发者能够轻松创建吸引人的界面。在本文中&#xff0c;我们将深入探讨 Bootstrap…...

基于Java的人事管理系统设计与实现(源码+lw+部署文档+讲解等)

文章目录 前言具体实现截图论文参考详细视频演示为什么选择我自己的网站自己的小程序&#xff08;小蔡coding&#xff09; 代码参考数据库参考源码获取 前言 &#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN特邀作者、博客专家、CSDN新星计划导师、全栈领域优质创作者&am…...

代码随想录算法训练营第五十九天| 647. 回文子串 516.最长回文子序列

今日学习的文章链接和视频链接 回文子串 https://programmercarl.com/0647.%E5%9B%9E%E6%96%87%E5%AD%90%E4%B8%B2.html 516.最长回文子序列 https://programmercarl.com/0516.%E6%9C%80%E9%95%BF%E5%9B%9E%E6%96%87%E5%AD%90%E5%BA%8F%E5%88%97.html 动态规划总结篇 https:…...

uniapp 小程序优惠劵样式

先看效果图 上代码 <view class"coupon"><view class"tickets" v-for"(item,index) in 10" :key"item"><view class"l-tickets"><view class"name">10元优惠劵</view><view cl…...

元梦之星内测上线,如何在B站打响声量?

元梦之星是腾讯天美工作室群研发的超开星乐园派对手游&#xff0c;于2023年1月17日通过审批。该游戏风格可爱软萌&#xff0c;带有社交属性&#xff0c;又是一款开黑聚会的手游&#xff0c;备受年轻人关注。 飞瓜数据&#xff08;B站版&#xff09;显示&#xff0c;元梦之星在…...

Python---循环---while循环

Python中的循环 包括 while循环与for循环&#xff0c;本文以while循环为主。 Python中所有的知识点&#xff0c;都是为了解决某个问题诞生的&#xff0c;就好比中文的汉字&#xff0c;每个汉字都是为了解决某种意思表达而诞生的。 1、什么是循环 现实生活中&#xff0c;也有…...

面试知识点--基础篇

文章目录 前言一、排序1. 冒泡排序2. 选择排序3. 插入排序4. 快速单边循环排序5. 快速双边循环排序6. 二分查找 二、集合1.List2.Map 前言 提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考 一、排序 1. 冒泡排序 冒泡排序就是把小的元素往前调或者把大…...

FIFO设计16*8,verilog,源码和视频

名称&#xff1a;FIFO设计16*8&#xff0c;数据显示在数码管 软件&#xff1a;Quartus 语言&#xff1a;Verilog 代码功能&#xff1a; 使用verilog语言设计一个16*8的FIFO&#xff0c;深度16&#xff0c;宽度为8。可对FIFO进行写和读&#xff0c;并将FIFO读出的数据显示到…...

#力扣:2769. 找出最大的可达成数字@FDDLC

2769. 找出最大的可达成数字 - 力扣&#xff08;LeetCode&#xff09; 一、Java class Solution {public int theMaximumAchievableX(int num, int t) {return num 2*t;} }...

Juniper防火墙SSG-140 session 过高问题

1.SSG-140性能参数 2.问题截图 3.解决方法 &#xff08;1&#xff09;通过telnet 或 consol的方法登录到防火墙&#xff1b; &#xff08;2&#xff09;使用get session 查看总的session会话数&#xff0c;如果大于300 一般属于不正常情况 &#xff08;3&#xff09;使用get…...

Spring Boot 3.2四个新特点提升运行性能

随着 Spring Framework 6.1 和 Spring Boot 3.2 普遍可用性的临近&#xff0c;我们想分享一下 Spring 团队为让开发人员优化其应用程序的运行时效率而做出的几项努力的概述。 我们将介绍以下技术和用例&#xff1a; Spring MVC 将使用 基于JDK 21 虚拟线程 Web 堆栈使用 Spri…...

一阶系统阶跃响应实现规划方波目标值

一阶系统单位阶跃响应 一阶系统传递函数&#xff0c;实质是一阶惯性环节&#xff0c;T为一阶系统时间常数。 输入信号为单位阶跃函数&#xff0c;数学表达式 单位阶跃函数拉氏变换 输出一阶系统单位阶跃响应 拉普拉斯反变换 使用前向差分法对一阶系统离散化 将z变换写成差分方…...

项目经理如何去拆分复杂项目?

代码的横向分层&#xff0c;维度是根据复杂度来的&#xff0c;可保证代码便于开发和维护 1、因为强类型的原因&#xff0c;把变动大的分到数据库来解决&#xff0c;这是一种后端分离。 2、因为发布难的原因&#xff0c;所以用稳定的引擎来解决问题&#xff0c;然后用数据库配置…...

python二次开发Solidworks:修改实体尺寸

立方体原始尺寸&#xff1a;100mm100mm100mm 修改后尺寸&#xff1a;10mm100mm100mm import win32com.client as win32 import pythoncomdef bin_width(width):myDimension Part.Parameter("D1草图1")myDimension.SystemValue width def bin_length(length):myDime…...

【C++】:类和对象(中)之类的默认成员函数——构造函数and析构函数

1.类的6个默认成员函数 如果一个类中什么成员都没有&#xff0c;简称为空类 空类中真的什么都没有吗&#xff1f;并不是&#xff0c;任何类在什么都不写时&#xff0c;编译器会自动生成以下6个默认成员函数 默认成员函数&#xff1a;用户没有显式实现&#xff0c;编译器会生成…...

sqlserver系统存储过程添加用户学习

sqlserver有一个系统存储过程sp_adduser&#xff1b;从名字看是添加用户的&#xff1b;操作一下&#xff0c; 从错误提示看还需要先添加一个登录名&#xff0c;再执行一个系统过程sp_addlogin看一下&#xff0c; 执行完之后看一下&#xff0c;安全性-登录名下面有了rabbit&…...

Monocle 3 | 太牛了!单细胞必学R包!~(一)(预处理与降维聚类)

1写在前面 忙碌的一周结束了&#xff0c;终于迎来周末了。&#x1fae0; 这周的手术真的是做到崩溃&#xff0c;2天的手术都过点了。&#x1fae0; 真的希望有时间静下来思考一下。&#x1fae0; 最近的教程可能会陆续写一下Monocle 3&#xff0c;炙手可热啊&#xff0c;欢迎大…...

解决Ubuntu22.04 VMware失败的问题 ubuntu入门之二十八

现象1 打开VMware失败 Ubuntu升级之后打开VMware上报需要安装vmmon和vmnet&#xff0c;点击确认后如下提示 最终上报fail 解决方法 内核升级导致&#xff0c;需要在新内核下重新下载编译安装 查看版本 $ vmware -v VMware Workstation 17.5.1 build-23298084$ lsb_release…...

使用分级同态加密防御梯度泄漏

抽象 联邦学习 &#xff08;FL&#xff09; 支持跨分布式客户端进行协作模型训练&#xff0c;而无需共享原始数据&#xff0c;这使其成为在互联和自动驾驶汽车 &#xff08;CAV&#xff09; 等领域保护隐私的机器学习的一种很有前途的方法。然而&#xff0c;最近的研究表明&…...

智能在线客服平台:数字化时代企业连接用户的 AI 中枢

随着互联网技术的飞速发展&#xff0c;消费者期望能够随时随地与企业进行交流。在线客服平台作为连接企业与客户的重要桥梁&#xff0c;不仅优化了客户体验&#xff0c;还提升了企业的服务效率和市场竞争力。本文将探讨在线客服平台的重要性、技术进展、实际应用&#xff0c;并…...

C++ 求圆面积的程序(Program to find area of a circle)

给定半径r&#xff0c;求圆的面积。圆的面积应精确到小数点后5位。 例子&#xff1a; 输入&#xff1a;r 5 输出&#xff1a;78.53982 解释&#xff1a;由于面积 PI * r * r 3.14159265358979323846 * 5 * 5 78.53982&#xff0c;因为我们只保留小数点后 5 位数字。 输…...

自然语言处理——Transformer

自然语言处理——Transformer 自注意力机制多头注意力机制Transformer 虽然循环神经网络可以对具有序列特性的数据非常有效&#xff0c;它能挖掘数据中的时序信息以及语义信息&#xff0c;但是它有一个很大的缺陷——很难并行化。 我们可以考虑用CNN来替代RNN&#xff0c;但是…...

AI,如何重构理解、匹配与决策?

AI 时代&#xff0c;我们如何理解消费&#xff1f; 作者&#xff5c;王彬 封面&#xff5c;Unplash 人们通过信息理解世界。 曾几何时&#xff0c;PC 与移动互联网重塑了人们的购物路径&#xff1a;信息变得唾手可得&#xff0c;商品决策变得高度依赖内容。 但 AI 时代的来…...

重启Eureka集群中的节点,对已经注册的服务有什么影响

先看答案&#xff0c;如果正确地操作&#xff0c;重启Eureka集群中的节点&#xff0c;对已经注册的服务影响非常小&#xff0c;甚至可以做到无感知。 但如果操作不当&#xff0c;可能会引发短暂的服务发现问题。 下面我们从Eureka的核心工作原理来详细分析这个问题。 Eureka的…...

让回归模型不再被异常值“带跑偏“,MSE和Cauchy损失函数在噪声数据环境下的实战对比

在机器学习的回归分析中&#xff0c;损失函数的选择对模型性能具有决定性影响。均方误差&#xff08;MSE&#xff09;作为经典的损失函数&#xff0c;在处理干净数据时表现优异&#xff0c;但在面对包含异常值的噪声数据时&#xff0c;其对大误差的二次惩罚机制往往导致模型参数…...

NXP S32K146 T-Box 携手 SD NAND(贴片式TF卡):驱动汽车智能革新的黄金组合

在汽车智能化的汹涌浪潮中&#xff0c;车辆不再仅仅是传统的交通工具&#xff0c;而是逐步演变为高度智能的移动终端。这一转变的核心支撑&#xff0c;来自于车内关键技术的深度融合与协同创新。车载远程信息处理盒&#xff08;T-Box&#xff09;方案&#xff1a;NXP S32K146 与…...

【Go语言基础【13】】函数、闭包、方法

文章目录 零、概述一、函数基础1、函数基础概念2、参数传递机制3、返回值特性3.1. 多返回值3.2. 命名返回值3.3. 错误处理 二、函数类型与高阶函数1. 函数类型定义2. 高阶函数&#xff08;函数作为参数、返回值&#xff09; 三、匿名函数与闭包1. 匿名函数&#xff08;Lambda函…...