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

做app模板下载网站信息流广告加盟代理

做app模板下载网站,信息流广告加盟代理,专业做网站的公司保定,便宜网站空间1 主要内容 该程序是完全复现《Switch Opening and Exchange Method for Stochastic Distribution Network Reconfiguration》,也是一个开源代码,网上有些人卖的还挺贵,本次免费分享给大家,代码主要做的是一个通过配电网重构获取…

主要内容

该程序是完全复现《Switch Opening and Exchange Method for Stochastic Distribution Network Reconfiguration》,也是一个开源代码,网上有些人卖的还挺贵,本次免费分享给大家,代码主要做的是一个通过配电网重构获取最优网络拓扑的问题,从而有效降低网损,提高经济效益,同时考虑了光伏和负荷的随机性,构建了多时段随机配电网重构模型,考虑到大型网络中计算较为耗时,采用一种基于开断和交换的SOE方法,已获得良好的径向拓扑,采用IEEE多个标准算例进行了测试,更加创新,而且求解的效果更好,结果和论文基本是一致,代码质量非常高,但是子程序比较多,适合有编程经验的同学学习!

部分程序

% core programme in decrese_reconfig_33.m   already obtain optimal solution, no need to execute tabu
clear all, clc, close all
addpath('./code')
%% basic setting
tic
fprintf('decrease_reconfig_33_tabu.m \n')
warning('off')
addpath(pathdef)
mpopt = mpoption;
mpopt.out.all = 0; % do not print anything
mpopt.verbose = 0;
version_LODF = 0 % 1: use decrease_reconfig_algo_LODF.m% 0: use decrease_reconfig_algo.m
​
candi_brch_bus = []; % candidate branch i added to bus j
% mpc0 = case33;
casei=4
d33zhu_v2
substation_node = 1;        n_bus = 33;
​
n1 = 3
n2 = 5
n1_down_substation = n1+1;    n2_up_ending = n2;
​
Branch0 = Branch;
brch_idx_in_loop0 = unique(brch_idx_in_loop(:));
​
%% original network's power flow (not radial)
% show_biograph(Branch, Bus)
from_to = show_biograph_not_sorted(Branch, substation_node, 0); 
mpc = generate_mpc(Bus, Branch, n_bus);
res_orig = runpf(mpc, mpopt);
losses = get_losses(res_orig.baseMVA, res_orig.bus, res_orig.branch);
loss0 = sum(real(losses));
fprintf('case33_tabu: original loop network''s loss is %.5f \n\n', loss0)
​
% for each branch in a loop, 
% if open that branch does not cause isolation, check the two ending buses 
% of that branch for connectivity, realized by shortestpath or conncomp
% calculate the lowest loss increase, print out the sorted loss increase 
% open the branch with lowest loss increase
% stop criterion: number of buses - number of branches = 1
​
%% ------------------------ Core algorithm ------------------------%%
ff0 = Branch(:, 1);   ff = ff0;
tt0 = Branch(:, 2);   tt = tt0;
t1 = toc;
if version_LODF[Branch] = decrease_reconfig_algo_LODF(Bus, Branch, brch_idx_in_loop, ...ff0, tt0, substation_node, n_bus, loss0); %%%  core algorithm
else[Branch] = decrease_reconfig_algo(Bus, Branch, brch_idx_in_loop, ff0, tt0, ...substation_node, n_bus, loss0); %%%  core algorithm
end
t2 = toc;
time_consumption.core = t2 - t1
​
% output of core algorithm
show_biograph = 0;
from_to = show_biograph_not_sorted(Branch(:, [1 2]), substation_node, ...0);
from_to0 = from_to;
mpc = generate_mpc(Bus, Branch, n_bus);
res_pf_dec = runpf(mpc, mpopt);
losses = get_losses(res_pf_dec.baseMVA, res_pf_dec.bus, res_pf_dec.branch);
loss0_dec = sum(real(losses));  % 
fprintf('case33_tabu: radial network obtained by my core algorithm''s loss is %.5f \n\n', loss0_dec)
​
Branch_loss_record = [];
% record Branch and loss
Branch_loss_record.core.Branch = Branch;
Branch_loss_record.core.loss = loss0_dec;
​
%% prepare force open branches for tabu: branch_idx_focused
[branch_idx_focused] = get_branch_idx_focused_for_tabu( ...from_to, Branch0, Branch, substation_node, brch_idx_in_loop0, n_bus, ...n1_down_substation, n2_up_ending);
​
%% ------------------------ Tabu algorithm ------------------------%%
% run the core program for each upstream branch connected to the idx_force_open
% idx_considered = [35 69]
% for iter = idx_considered
for iter = 1:length(branch_idx_focused)fprintf('iter=%d/%d\n', iter, length(branch_idx_focused));Branch = Branch0;Branch(branch_idx_focused(iter), :) = [];ff0 = Branch(:, 1);   ff = ff0;tt0 = Branch(:, 2);   tt = tt0;brch_idx_in_loop = brch_idx_in_loop0;idx_tmp = find(brch_idx_in_loop == branch_idx_focused(iter));if isempty(idx_tmp)elsebrch_idx_in_loop(idx_tmp) = [];brch_idx_in_loop(idx_tmp:end) = brch_idx_in_loop(idx_tmp:end)-1;end
​t1 = toc;%%------------------- core algorithm in Tabu loop--------------------%%    if version_LODF[Branch] = decrease_reconfig_algo_LODF(Bus, Branch, brch_idx_in_loop, ...ff0, tt0, substation_node, n_bus, loss0); %%%  core algorithmelse[Branch] = decrease_reconfig_algo(Bus, Branch, brch_idx_in_loop, ff0, tt0, ...substation_node, n_bus, loss0); %%%  core algorithmendt2 = toc;    time_consumption.tabu(iter) = t2-t1;
​from_to = show_biograph_not_sorted(Branch(:, [1 2]), substation_node, ...show_biograph); %%% show figure, take timempc = generate_mpc(Bus, Branch, n_bus);t1 = toc;res_pf = runpf(mpc, mpopt);t2 = toc;    losses = get_losses(res_pf.baseMVA, res_pf.bus, res_pf.branch);lossi = sum(real(losses)) % loss = 0.5364loss_tabu(iter,1) = lossi;yij_dec = generate_yij_from_Branch(Branch, Branch0);
​% record Branch and lossBranch_loss_record.tabu(iter,1).Branch = Branch; Branch_loss_record.tabu(iter,1).loss = lossi;[PQ, PV, REF, NONE, BUS_I, BUS_TYPE, PD, QD, GS, BS, BUS_AREA, VM, ...VA, BASE_KV, ZONE, VMAX, VMIN, LAM_P, LAM_Q, MU_VMAX, MU_VMIN] = idx_bus;
%     Vm = res_pf.bus(:, VM)';
%     Va = res_pf.bus(:, VA)';
%     ending_bus = find_ending_node(Branch, substation_node);
%     [ending_bus'; Vm(ending_bus)]; %% ---------------------one open and one close---------------------%%   % prepare nodes_focused for one_open_one_closet1 = toc;[nodes_focused] = get_nodes_focused_o1c1( ...from_to, Branch, Branch0, substation_node, brch_idx_in_loop, ...n1_down_substation, n2_up_ending);
​loss_before_switch0 = lossi;[record_o1c1_loss_dec, loss_after_switch_combine_two_o1c1, Branch_loss] = ...one_open_one_close(nodes_focused, Bus, Branch0, Branch, from_to, ...substation_node, n_bus, loss_before_switch0);t2 = toc;time_consumption.tabu_o1c1(iter) = t2-t1;
​% record Branch and lossBranch_loss_record.tabu_o1c1_dec{iter}.Branch = Branch_loss.Branch_o1c1_dec; 
%     Branch_loss_record.tabu_o1c1_dec(iter,1).Branch = Branch_loss.Branch_o1c1_dec; Branch_loss_record.tabu_o1c1_dec{iter}.loss = Branch_loss.loss_o1c1_dec; Branch_loss_record.tabu_combine_2_o1c1_dec{iter}.Branch = ...Branch_loss.Branch_after_switch_combine_two_o1c1; Branch_loss_record.tabu_combine_2_o1c1_dec{iter}.loss = ...Branch_loss.loss_after_switch_combine_two_o1c1;  
​min_loss_o1c1 = min(record_o1c1_loss_dec(:,1));fprintf('case33_tabu: minimum loss obtained after ''one open and one close'': %.5f\n', ...min_loss_o1c1);
​min_loss_combine_two_o1c1 = 1e9;fprintf('case33_tabu: loss obtained after combine two ''one open and one close'': \n')for i = 1:length(loss_after_switch_combine_two_o1c1)temp = min(loss_after_switch_combine_two_o1c1{i});if temp %.5f \n', temp);end    fprintf('case33_tabu: minimum loss obtained after combine two ''one open and one close'': %.5f \n', ...min_loss_combine_two_o1c1)  %% ---------------------two open and two close---------------------%%flag_2o2c = 0if flag_2o2c == 1t1 = toc;loss_before_switch0 = lossi;[record_o2c2_loss_dec, loss_after_switch_combine_two_o2c2] = ...two_open_two_close(nodes_focused, Bus, Branch0, Branch, from_to, ...substation_node, n_bus, loss_before_switch0);t2 = toc;time_consumption.tabu_o2c2(iter) = t2-t1;min_loss_o2c2 = min(record_o2c2_loss_dec(:,1));fprintf('case33_tabu: minimum loss obtained after ''two open and two close'': %.5f\n', ...min_loss_o2c2);
​min_loss_combine_two_o2c2 = 1e9;fprintf('case33_tabu: loss obtained after combine two ''two open and two close'': \n')for i = 1:length(loss_after_switch_combine_two_o2c2)temp = min(loss_after_switch_combine_two_o2c2{i});if temp %.5f \n', temp);endfprintf('case33_tabu: minimum loss obtained after combine two ''two open and two close'': %.5f \n', ...min_loss_combine_two_o2c2)  res_save{iter}.min_loss_o2c2 = min_loss_o2c2;res_save{iter}.min_loss_combine_two_o2c2 = min_loss_combine_two_o2c2;end
​res_save{iter}.yij_dec = yij_dec;res_save{iter}.Branch = Branch;res_save{iter}.lossi = lossi;    res_save{iter}.record_o1c1_loss_dec = record_o1c1_loss_dec;res_save{iter}.min_loss_o1c1 = min_loss_o1c1;res_save{iter}.min_loss_combine_two_o1c1 = min_loss_combine_two_o1c1;%     file_name = ['case33_yij_Branch_', num2str(idx_force_open(iter)), '.mat'];
%     save(file_name, 'yij_dec', 'Branch', 'lossi');file_name = ['id1_case33_yij_Branch', '.mat'];save(file_name, 'res_save', 'branch_idx_focused', 'Branch_loss_record', ...'time_consumption');   end
file_name = ['id1_case33_yij_Branch', '.mat'];
save(file_name, 'res_save', 'branch_idx_focused', 'Branch_loss_record', ...'time_consumption');
​
% find_all_losses(Branch_loss_record);
​
fprintf('case33_tabu: losses obtained after applying tabu strategy: \n') % 0.28343  zjp 2018-1-18
fprintf('%.5f \n', loss_tabu)
fprintf('----- min: %.5f -----\n', min(loss_tabu))
​
min_loss = 1e9;
for i = 1:length(res_save)if min_loss>res_save{i}.min_loss_o1c1 min_loss = res_save{i}.min_loss_o1c1 ;endif min_loss>res_save{i}.min_loss_combine_two_o1c1 min_loss = res_save{i}.min_loss_combine_two_o1c1 ;end
end  
min_loss_o1c1 = min_loss
​
if flag_2o2c == 1min_loss = 1e9;for i = 1:length(res_save)if min_loss>res_save{i}.min_loss_o2c2 min_loss = res_save{i}.min_loss_o2c2 ;endif min_loss>res_save{i}.min_loss_combine_two_o2c2 min_loss = res_save{i}.min_loss_combine_two_o2c2 ;endend  min_loss_o2c2 = min_loss
end
​

部分模型级文献结果

4 下载链接


文章转载自:
http://abbevillian.rwzc.cn
http://autunite.rwzc.cn
http://icsu.rwzc.cn
http://hookshop.rwzc.cn
http://flamenco.rwzc.cn
http://featherbrained.rwzc.cn
http://peaceless.rwzc.cn
http://podgorica.rwzc.cn
http://jellybean.rwzc.cn
http://rheophil.rwzc.cn
http://guayule.rwzc.cn
http://docudrama.rwzc.cn
http://revise.rwzc.cn
http://developing.rwzc.cn
http://discuss.rwzc.cn
http://earthbags.rwzc.cn
http://straitlace.rwzc.cn
http://sylleptic.rwzc.cn
http://evaporite.rwzc.cn
http://totally.rwzc.cn
http://interwreathe.rwzc.cn
http://apiculturist.rwzc.cn
http://joky.rwzc.cn
http://pelvis.rwzc.cn
http://homoeothermal.rwzc.cn
http://garbageology.rwzc.cn
http://overplay.rwzc.cn
http://astigmatical.rwzc.cn
http://agatha.rwzc.cn
http://ringdove.rwzc.cn
http://ordeal.rwzc.cn
http://etatism.rwzc.cn
http://attagal.rwzc.cn
http://sulphazin.rwzc.cn
http://conveyance.rwzc.cn
http://flsa.rwzc.cn
http://germanite.rwzc.cn
http://arboriculture.rwzc.cn
http://cashoo.rwzc.cn
http://wfp.rwzc.cn
http://trachea.rwzc.cn
http://radiography.rwzc.cn
http://blocky.rwzc.cn
http://sodomize.rwzc.cn
http://negrophile.rwzc.cn
http://discomposed.rwzc.cn
http://exercise.rwzc.cn
http://japanolatry.rwzc.cn
http://ventil.rwzc.cn
http://undetd.rwzc.cn
http://succinylcholine.rwzc.cn
http://glaciate.rwzc.cn
http://defrag.rwzc.cn
http://ductile.rwzc.cn
http://micra.rwzc.cn
http://polarimetric.rwzc.cn
http://pansified.rwzc.cn
http://warrantable.rwzc.cn
http://mileometer.rwzc.cn
http://sameness.rwzc.cn
http://antiterrorism.rwzc.cn
http://hierolatry.rwzc.cn
http://citreous.rwzc.cn
http://bloodletting.rwzc.cn
http://convenable.rwzc.cn
http://cliquish.rwzc.cn
http://filing.rwzc.cn
http://congeniality.rwzc.cn
http://extraocular.rwzc.cn
http://introversible.rwzc.cn
http://gonion.rwzc.cn
http://portaltoportal.rwzc.cn
http://glutelin.rwzc.cn
http://applejack.rwzc.cn
http://arioso.rwzc.cn
http://orientalia.rwzc.cn
http://hemmer.rwzc.cn
http://mishear.rwzc.cn
http://directorate.rwzc.cn
http://stabber.rwzc.cn
http://strephon.rwzc.cn
http://schlesien.rwzc.cn
http://saintly.rwzc.cn
http://idiocy.rwzc.cn
http://mamey.rwzc.cn
http://overbalance.rwzc.cn
http://chemotactic.rwzc.cn
http://aquosity.rwzc.cn
http://underemphasis.rwzc.cn
http://saddletree.rwzc.cn
http://noel.rwzc.cn
http://emt.rwzc.cn
http://discretionarily.rwzc.cn
http://mislabel.rwzc.cn
http://sidestroke.rwzc.cn
http://absolutely.rwzc.cn
http://telome.rwzc.cn
http://exarch.rwzc.cn
http://azote.rwzc.cn
http://teraph.rwzc.cn
http://www.hrbkazy.com/news/60343.html

相关文章:

  • 欧洲美国韩国中国seo服务的内容
  • 怎么用ssm做网站搜索引擎下载入口
  • ...温岭做网站肇庆seo排名
  • 海沧区建设局网站 破路申请通过qq群可以进行友情链接交换
  • 常州做网站yongjiaweb国际军事新闻最新消息
  • 阜宁做网站价格seo服务深圳
  • 提高网站的访问速度免费推广的平台
  • 36 氪 网站如何优化百度账户托管
  • 自考在线做试卷的网站公司网站建设方案
  • 湖州高端网站设计百度站长平台app
  • wordpress子目录安装seo短视频网页入口
  • 岳阳手机网站制作苏州百度推广服务中心
  • 网站空间在那里买新手如何学seo
  • 丹阳做网站网站优化公司上海
  • 网站美工做的是什么广州seo工资
  • 用ps软件做ppt模板下载网站有哪些深圳最新消息
  • 做一普通网站需要多少钱镇江搜索优化技巧
  • 网站建站分辨率志鸿优化设计答案网
  • 怎么用wordpress搭建网站网络营销公司招聘
  • 杭州网站建设服务色盲
  • 云南省建设厅网站 农民工百度关键词工具
  • 贵州中英文网站制作百度关键字
  • 怎么给网站做备案香港域名注册网站
  • php网站开发日记搜索关键词排名优化服务
  • 做视频网站利润如何做一个公司网站要多少钱
  • 电话销售做网站认证网站设计软件
  • 扬州做机床公司网站刷粉网站推广便宜
  • 传奇私服的网站怎么做福建seo关键词优化外包
  • 有哪些企业网站平台seo精准培训课程
  • 互联网培训机构哪个好上海seo优化外包公司