From e7f41f000a8ff7353be1322542fd39b7f3cdcf0a Mon Sep 17 00:00:00 2001 From: Ray Zimmerman Date: Tue, 4 Jun 2024 14:57:20 -0600 Subject: [PATCH] Address output of branch losses mentioned in #234. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add shunt loss columns (`psh_fr`, `qsh_fr`, `psh_to`, `qsh_to`) to branch data model. - Separate branch loss summary into series and shunt losses. - Add series loss columns to branch detail output. Thanks to Wilson González Vanegas. Ref: https://github.com/MATPOWER/matpower/issues/234 --- CHANGES.md | 11 +++ docs/src/MATPOWER-manual/MATPOWER-manual.tex | 56 ++++++++++- lib/+mp/dmce_branch_mpc2.m | 4 + lib/+mp/dme_branch.m | 89 +++++++++++++++-- lib/+mp/mme_branch_opf_ac.m | 14 +++ lib/+mp/mme_branch_opf_dc.m | 10 ++ lib/+mp/mme_branch_pf_ac.m | 18 +++- lib/+mp/mme_branch_pf_dc.m | 11 ++- lib/t/pretty-printing/pp_cpf_case9.txt | 31 +++--- lib/t/pretty-printing/pp_mpxt_reserve_1.txt | 95 +++++++++--------- lib/t/pretty-printing/pp_mpxt_reserve_2.txt | 99 ++++++++++--------- lib/t/pretty-printing/pp_mpxt_reserve_3.txt | 99 ++++++++++--------- lib/t/pretty-printing/pp_mpxt_reserve_4.txt | 95 +++++++++--------- lib/t/pretty-printing/pp_opf_case9.txt | 31 +++--- .../pretty-printing/pp_opf_t_auction_case.txt | 99 ++++++++++--------- lib/t/pretty-printing/pp_opf_t_case3p_g.txt | 31 +++--- lib/t/pretty-printing/pp_pf_case9.txt | 31 +++--- .../pretty-printing/pp_pf_t_auction_case.txt | 95 +++++++++--------- lib/t/t_mpxt_reserves.m | 19 +--- lib/t/t_pretty_print.m | 19 +--- 20 files changed, 577 insertions(+), 380 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 549ec54d..7ed866a4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,17 @@ For change history for [MP-Opt-Model][27], see [mp-opt-model/CHANGES.md](mp-opt- For change history for [MOST][3], see [most/CHANGES.md](most/CHANGES.md). +since 8.0 +--------- + +#### 6/4/24 + - Add shunt loss columns (`psh_fr`, `qsh_fr`, `psh_to`, `qsh_to`) to + branch data model. In pretty-printed output, separate branch loss summary + into series and shunt losses and add series loss columns to branch detail + output. + *Thanks to Wilson González Vanegas.* + + Version 8.0 - *May 17, 2024 --------------------------- diff --git a/docs/src/MATPOWER-manual/MATPOWER-manual.tex b/docs/src/MATPOWER-manual/MATPOWER-manual.tex index c7423b26..19d18fd3 100644 --- a/docs/src/MATPOWER-manual/MATPOWER-manual.tex +++ b/docs/src/MATPOWER-manual/MATPOWER-manual.tex @@ -8647,11 +8647,61 @@ \subsubsection*{Incompatible Changes} \end{itemize} +\clearpage +\subsection{Version 8.0.1-dev -- released ??? ??, 202?} +\label{app:v801} + +The \href{https://matpower.org/docs/MATPOWER-manual-8.0.1-dev.pdf}{\matpower{} 8.0.1-dev User's Manual} is available online.\footnote{\url{https://matpower.org/docs/MATPOWER-manual-8.0.1-dev.pdf}} + +\subsubsection*{New Features} +\begin{itemize} +\item +\item New options: +\begin{itemize} + \item \code{foo.bar} +\end{itemize} +\item New functions/methods: + \begin{itemize} + \item \code{foo} + \end{itemize} +\end{itemize} + +\subsubsection*{New Case Files} +\begin{itemize} +\item +\end{itemize} + +\subsubsection*{New Documentation} +\begin{itemize} + \item +\end{itemize} + +\subsubsection*{Other Improvements} +\begin{itemize} +\item Add shunt loss columns (\code{psh\_fr}, \code{qsh\_fr}, \code{psh\_to}, \code{qsh\_to}) to branch data model. In pretty-printed output, separate branch loss summary into series and shunt losses and add series loss columns to branch detail output. +\emph{Thanks to Wilson Gonz\'alez Vanegas.} +\item Deprecated functions: + \begin{itemize} + \item + \end{itemize} +\end{itemize} + +% \pagebreak +\subsubsection*{Bugs Fixed} +\begin{itemize} +\item +\end{itemize} + +\subsubsection*{Incompatible Changes} +\begin{itemize} +\item +\end{itemize} + % \clearpage -% \subsection{Version 8.0 -- released ??? ??, 202?} +% \subsection{Version 9.0 -- released ??? ??, 202?} % \label{app:v80} % -% The \href{https://matpower.org/docs/MATPOWER-manual-8.0.pdf}{\matpower{} 8.0 User's Manual} is available online.\footnote{\url{https://matpower.org/docs/MATPOWER-manual-8.0.pdf}} +% The \href{https://matpower.org/docs/MATPOWER-manual-9.0.pdf}{\matpower{} 9.0 User's Manual} is available online.\footnote{\url{https://matpower.org/docs/MATPOWER-manual-9.0.pdf}} % % \subsubsection*{New Features} % \begin{itemize} @@ -8695,8 +8745,6 @@ \subsubsection*{Incompatible Changes} % \begin{itemize} % \item % \end{itemize} -% -% \end{appendices} diff --git a/lib/+mp/dmce_branch_mpc2.m b/lib/+mp/dmce_branch_mpc2.m index 5d557a98..5e5c24e3 100644 --- a/lib/+mp/dmce_branch_mpc2.m +++ b/lib/+mp/dmce_branch_mpc2.m @@ -59,6 +59,10 @@ vmap.ql_fr{2} = QF; vmap.pl_to{2} = PT; vmap.ql_to{2} = QT; + vmap.psh_fr = {'num', 0}; %% zeros + vmap.qsh_fr = {'num', 0}; %% zeros + vmap.psh_to = {'num', 0}; %% zeros + vmap.qsh_to = {'num', 0}; %% zeros vmap.mu_flow_fr_ub{2} = MU_SF; vmap.mu_flow_to_ub{2} = MU_ST; vmap.mu_vad_lb{2} = MU_ANGMIN; diff --git a/lib/+mp/dme_branch.m b/lib/+mp/dme_branch.m index a29f3878..15db4999 100644 --- a/lib/+mp/dme_branch.m +++ b/lib/+mp/dme_branch.m @@ -35,6 +35,10 @@ % ``ql_fr`` *double* reactive power injection at "from" end % ``pl_to`` *double* active power injection at "to" end % ``ql_to`` *double* reactive power injection at "to" end +% ``psh_fr`` *double* active power shunt losses at "from" end +% ``qsh_fr`` *double* reactive power shunt losses at "from" end +% ``psh_to`` *double* active power shunt losses at "to" end +% ``qsh_to`` *double* reactive power shunt losses at "to" end % =========== ========= ======================================== % MATPOWER @@ -57,6 +61,7 @@ tm % transformer off-nominal turns ratio for branches that are on ta % xformer phase-shift angle (radians) for branches that are on rate_a % long term flow limit (p.u.) for branches that are on + loss_tol = 1e-4; % loss values < this are displayed as ``-`` end %% properties methods @@ -92,12 +97,14 @@ 'g_to', 'b_to', 'sm_ub_a', 'sm_ub_b', 'sm_ub_c', ... 'cm_ub_a', 'cm_ub_b', 'cm_ub_c', 'vad_lb', 'vad_ub', ... 'tm', 'ta', ... %% remove these when we separate out xformers - 'pl_fr', 'ql_fr', 'pl_to', 'ql_to'} ); + 'pl_fr', 'ql_fr', 'pl_to', 'ql_to', ... + 'psh_fr', 'qsh_fr', 'psh_to', 'qsh_to'} ); end function vars = export_vars(obj) % - vars = {'pl_fr', 'ql_fr', 'pl_to', 'ql_to'}; + vars = {'pl_fr', 'ql_fr', 'pl_to', 'ql_to', ... + 'psh_fr', 'qsh_fr', 'psh_to', 'qsh_to'}; end function s = export_vars_offline_val(obj) @@ -108,6 +115,10 @@ s.ql_fr = 0; s.pl_to = 0; s.ql_to = 0; + s.psh_fr = 0; + s.qsh_fr = 0; + s.psh_to = 0; + s.qsh_to = 0; end function obj = initialize(obj, dm) @@ -193,11 +204,43 @@ pp_data_sum@mp.dm_element(obj, dm, rows, out_e, mpopt, fd, pp_args); %% print branch summary - fprintf(fd, ' %-29s %12.2f MW', 'Total branch losses', ... - sum(obj.tab.pl_fr(obj.on)) + sum(obj.tab.pl_to(obj.on)) ); + p_loss = sum(obj.tab.pl_fr(obj.on)) + sum(obj.tab.pl_to(obj.on)); + p_shunt = sum(obj.tab.psh_fr(obj.on)) + sum(obj.tab.psh_to(obj.on)); + p_series = p_loss - p_shunt; + if abs(p_series) < obj.loss_tol + p_series_str = '- '; + else + p_series_str = sprintf('%12.2f', p_series); + end + fprintf(fd, ' %-29s %12s MW', 'Total branch series losses', ... + p_series_str); + if mpopt.model(1) ~= 'D' %% AC model + q_loss = sum(obj.tab.ql_fr(obj.on)) + sum(obj.tab.ql_to(obj.on)); + q_shunt = sum(obj.tab.qsh_fr(obj.on)) + ... + sum(obj.tab.qsh_to(obj.on)); + q_series = q_loss - q_shunt; + if abs(q_series) < obj.loss_tol + q_series_str = '- '; + else + q_series_str = sprintf('%12.2f', q_series); + end + fprintf(fd, ' %12s MVAr', q_series_str); + end + fprintf(fd, '\n'); + if abs(p_shunt) < obj.loss_tol + p_shunt_str = '- '; + else + p_shunt_str = sprintf('%12.2f', p_shunt); + end + fprintf(fd, ' %-29s %12s MW', 'Total branch shunt losses', ... + p_shunt_str ); if mpopt.model(1) ~= 'D' %% AC model - fprintf(fd, ' %12.2f MVAr', ... - sum(obj.tab.ql_fr(obj.on)) + sum(obj.tab.ql_to(obj.on)) ); + if abs(q_shunt) < obj.loss_tol + q_shunt_str = '- '; + else + q_shunt_str = sprintf('%12.2f', q_shunt); + end + fprintf(fd, ' %12s MVAr', q_shunt_str ); end fprintf(fd, '\n'); end @@ -209,6 +252,33 @@ ' ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr)', ... '-------- -------- -------- ------ -------- -------- -------- --------' } ]; %% 1234567 123456789 123456789 -----1 1234567.90 123456.89 123456.89 123456.89 + if mpopt.model(1) ~= 'D' %% AC model + h{end-2} = [h{end-2} ' Series Loss']; + h{end-1} = [h{end-1} ' P (MW) Q (MVAr)']; + h{end} = [h{end} ' -------- --------']; + %% 12345.789 123456.89 + %% 12345.789 123456.89 + end + end + + function f = pp_get_footers_det(obj, dm, out_e, mpopt, pp_args) + % + if mpopt.model(1) == 'D' %% DC model (series losses) + f = {}; + else %% AC model + p_loss = sum(obj.tab.pl_fr(obj.on)) + ... + sum(obj.tab.pl_to(obj.on)); + p_shunt = sum(obj.tab.psh_fr(obj.on)) + ... + sum(obj.tab.psh_to(obj.on)); + p_series = p_loss - p_shunt; + q_loss = sum(obj.tab.ql_fr(obj.on)) + ... + sum(obj.tab.ql_to(obj.on)); + q_shunt = sum(obj.tab.qsh_fr(obj.on)) + ... + sum(obj.tab.qsh_to(obj.on)); + q_series = q_loss - q_shunt; + f = {' -------- --------', + sprintf('%69s Total:%9.3f %9.2f', '', p_series, q_series)}; + end end function TorF = pp_have_section_det(obj, mpopt, pp_args) @@ -223,6 +293,13 @@ obj.tab.status(k), ... obj.tab.pl_fr(k), obj.tab.ql_fr(k), ... obj.tab.pl_to(k), obj.tab.ql_to(k) ); + if mpopt.model(1) ~= 'D' %% AC model + str = sprintf('%s %9.3f %9.2f', str, ... + obj.tab.pl_fr(k) + obj.tab.pl_to(k) ... + - obj.tab.psh_fr(k) - obj.tab.psh_to(k), ... + obj.tab.ql_fr(k) + obj.tab.ql_to(k) ... + - obj.tab.qsh_fr(k) - obj.tab.qsh_to(k) ); + end end end %% methods end %% classdef diff --git a/lib/+mp/mme_branch_opf_ac.m b/lib/+mp/mme_branch_opf_ac.m index 2227b352..0fa822b8 100644 --- a/lib/+mp/mme_branch_opf_ac.m +++ b/lib/+mp/mme_branch_opf_ac.m @@ -103,11 +103,25 @@ %% shadow prices on angle difference limits [mu_vad_lb, mu_vad_ub] = obj.ang_diff_prices(mm, nme); + %% branch shunt power losses + v = nme.C' * nm.soln.v; + vm2 = v .* conj(v); + vm2_fr = vm2(1:length(v)/2); + vm2_to = vm2(length(v)/2+1:end); + psh_fr = vm2_fr .* dme.tab.g_fr(dme.on); + qsh_fr = -vm2_fr .* dme.tab.b_fr(dme.on); + psh_to = vm2_to .* dme.tab.g_to(dme.on); + qsh_to = -vm2_to .* dme.tab.b_to(dme.on); + %% update in the data model dme.tab.pl_fr(dme.on) = real(S_fr) * dm.base_mva; dme.tab.ql_fr(dme.on) = imag(S_fr) * dm.base_mva; dme.tab.pl_to(dme.on) = real(S_to) * dm.base_mva; dme.tab.ql_to(dme.on) = imag(S_to) * dm.base_mva; + dme.tab.psh_fr(dme.on) = psh_fr * dm.base_mva; + dme.tab.qsh_fr(dme.on) = qsh_fr * dm.base_mva; + dme.tab.psh_to(dme.on) = psh_to * dm.base_mva; + dme.tab.qsh_to(dme.on) = qsh_to * dm.base_mva; dme.tab.mu_flow_fr_ub(dme.on) = mu_flow_fr_ub / dm.base_mva; dme.tab.mu_flow_to_ub(dme.on) = mu_flow_to_ub / dm.base_mva; dme.tab.mu_vad_lb(dme.on) = mu_vad_lb * pi/180; diff --git a/lib/+mp/mme_branch_opf_dc.m b/lib/+mp/mme_branch_opf_dc.m index 4e4a3337..cbe10b76 100644 --- a/lib/+mp/mme_branch_opf_dc.m +++ b/lib/+mp/mme_branch_opf_dc.m @@ -61,6 +61,10 @@ pl_fr = nm.soln.gp(pp.i1.branch(1):pp.iN.branch(1)); pl_to = nm.soln.gp(pp.i1.branch(2):pp.iN.branch(2)); + %% branch shunt power losses + psh_fr = dme.tab.g_fr(dme.on); + psh_to = dme.tab.g_to(dme.on); + %% shadow prices on branch flow constraints ibr = mm.userdata.flow_constrained_branch_idx; mu_flow_fr_ub = zeros(nme.nk, 1); @@ -77,7 +81,13 @@ %% update in the data model dme.tab.pl_fr(dme.on) = pl_fr * dm.base_mva; + dme.tab.ql_fr(dme.on) = 0; dme.tab.pl_to(dme.on) = pl_to * dm.base_mva; + dme.tab.ql_to(dme.on) = 0; + dme.tab.psh_fr(dme.on) = psh_fr * dm.base_mva; + dme.tab.qsh_fr(dme.on) = 0; + dme.tab.psh_to(dme.on) = psh_to * dm.base_mva; + dme.tab.qsh_to(dme.on) = 0; dme.tab.mu_flow_fr_ub(dme.on) = mu_flow_fr_ub / dm.base_mva; dme.tab.mu_flow_to_ub(dme.on) = mu_flow_to_ub / dm.base_mva; dme.tab.mu_vad_lb(dme.on) = mu_vad_lb * pi/180; diff --git a/lib/+mp/mme_branch_pf_ac.m b/lib/+mp/mme_branch_pf_ac.m index 0830054a..79b2ef92 100644 --- a/lib/+mp/mme_branch_pf_ac.m +++ b/lib/+mp/mme_branch_pf_ac.m @@ -22,17 +22,33 @@ function obj = data_model_update_on(obj, mm, nm, dm, mpopt) % + dme = obj.data_model_element(dm); + nme = obj.network_model_element(nm); + %% branch complex power flows pp = nm.get_idx('port'); S_fr = nm.soln.gs_(pp.i1.branch(1):pp.iN.branch(1)); S_to = nm.soln.gs_(pp.i1.branch(2):pp.iN.branch(2)); + %% branch shunt power losses + v = nme.C' * nm.soln.v; + vm2 = v .* conj(v); + vm2_fr = vm2(1:length(v)/2); + vm2_to = vm2(length(v)/2+1:end); + psh_fr = vm2_fr .* dme.tab.g_fr(dme.on); + qsh_fr = -vm2_fr .* dme.tab.b_fr(dme.on); + psh_to = vm2_to .* dme.tab.g_to(dme.on); + qsh_to = -vm2_to .* dme.tab.b_to(dme.on); + %% update in the data model - dme = obj.data_model_element(dm); dme.tab.pl_fr(dme.on) = real(S_fr) * dm.base_mva; dme.tab.ql_fr(dme.on) = imag(S_fr) * dm.base_mva; dme.tab.pl_to(dme.on) = real(S_to) * dm.base_mva; dme.tab.ql_to(dme.on) = imag(S_to) * dm.base_mva; + dme.tab.psh_fr(dme.on) = psh_fr * dm.base_mva; + dme.tab.qsh_fr(dme.on) = qsh_fr * dm.base_mva; + dme.tab.psh_to(dme.on) = psh_to * dm.base_mva; + dme.tab.qsh_to(dme.on) = qsh_to * dm.base_mva; end end %% methods end %% classdef diff --git a/lib/+mp/mme_branch_pf_dc.m b/lib/+mp/mme_branch_pf_dc.m index 98876e08..42a45578 100644 --- a/lib/+mp/mme_branch_pf_dc.m +++ b/lib/+mp/mme_branch_pf_dc.m @@ -22,17 +22,26 @@ function obj = data_model_update_on(obj, mm, nm, dm, mpopt) % + dme = obj.data_model_element(dm); + %% branch active power flows pp = nm.get_idx('port'); pl_fr = nm.soln.gp(pp.i1.branch(1):pp.iN.branch(1)); pl_to = nm.soln.gp(pp.i1.branch(2):pp.iN.branch(2)); + %% branch shunt power losses + psh_fr = dme.tab.g_fr(dme.on); + psh_to = dme.tab.g_to(dme.on); + %% update in the data model - dme = obj.data_model_element(dm); dme.tab.pl_fr(dme.on) = pl_fr * dm.base_mva; dme.tab.ql_fr(dme.on) = 0; dme.tab.pl_to(dme.on) = pl_to * dm.base_mva; dme.tab.ql_to(dme.on) = 0; + dme.tab.psh_fr(dme.on) = psh_fr * dm.base_mva; + dme.tab.qsh_fr(dme.on) = 0; + dme.tab.psh_to(dme.on) = psh_to * dm.base_mva; + dme.tab.qsh_to(dme.on) = 0; end end %% methods end %% classdef diff --git a/lib/t/pretty-printing/pp_cpf_case9.txt b/lib/t/pretty-printing/pp_cpf_case9.txt index 850df954..e476a2fa 100644 --- a/lib/t/pretty-printing/pp_cpf_case9.txt +++ b/lib/t/pretty-printing/pp_cpf_case9.txt @@ -1,5 +1,5 @@ -CPF succeeded in 0.59 seconds (0.28 setup + 0.30 solve) +CPF succeeded in 0.17 seconds (0.10 setup + 0.07 solve) ================================================================================ | System Summary | ================================================================================ @@ -18,7 +18,8 @@ CPF succeeded in 0.59 seconds (0.28 setup + 0.30 solve) Total max generation capacity 820.0 MW 900.0 MVAr Total min generation capacity 30.0 MW -900.0 MVAr Total load 797.7 MW 291.2 MVAr - Total branch losses 56.81 MW 556.42 MVAr + Total branch series losses 56.81 MW 648.49 MVAr + Total branch shunt losses - MW -92.07 MVAr minimum maximum ----------------------------- ----------------------------- @@ -68,15 +69,17 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 4 1 469.84 471.54 -469.84 -235.57 - 2 4 5 1 276.13 182.81 -247.98 -38.81 - 3 5 6 1 -78.24 -93.34 92.25 132.49 - 4 3 6 1 128.42 191.36 -128.42 -161.74 - 5 6 7 1 36.17 29.25 -35.78 -42.74 - 6 7 8 1 -189.36 -31.84 193.44 54.33 - 7 8 2 1 -256.22 -125.38 256.22 184.73 - 8 8 9 1 62.78 71.05 -58.66 -72.32 - 9 9 4 1 -187.64 -12.15 193.71 52.76 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 4 1 469.84 471.54 -469.84 -235.57 -0.000 235.97 + 2 4 5 1 276.13 182.81 -247.98 -38.81 28.146 152.32 + 3 5 6 1 -78.24 -93.34 92.25 132.49 14.002 61.04 + 4 3 6 1 128.42 191.36 -128.42 -161.74 -0.000 29.62 + 5 6 7 1 36.17 29.25 -35.78 -42.74 0.389 3.29 + 6 7 8 1 -189.36 -31.84 193.44 54.33 4.078 34.54 + 7 8 2 1 -256.22 -125.38 256.22 184.73 -0.000 59.35 + 8 8 9 1 62.78 71.05 -58.66 -72.32 4.118 20.72 + 9 9 4 1 -187.64 -12.15 193.71 52.76 6.076 51.65 + -------- -------- + Total: 56.808 648.49 diff --git a/lib/t/pretty-printing/pp_mpxt_reserve_1.txt b/lib/t/pretty-printing/pp_mpxt_reserve_1.txt index 4bb6d0f6..5d38b784 100644 --- a/lib/t/pretty-printing/pp_mpxt_reserve_1.txt +++ b/lib/t/pretty-printing/pp_mpxt_reserve_1.txt @@ -1,5 +1,5 @@ -OPF succeeded in 0.14 seconds (0.06 setup + 0.08 solve) +OPF succeeded in 0.17 seconds (0.13 setup + 0.05 solve) Objective Function Value = 755.96 $/hr ================================================================================ | System Summary | @@ -22,7 +22,8 @@ Objective Function Value = 755.96 $/hr Total max generation capacity 335.0 MW 405.9 MVAr Total min generation capacity 0.0 MW -95.0 MVAr Total load 189.2 MW 107.2 MVAr - Total branch losses 2.96 MW -0.07 MVAr + Total branch series losses 2.96 MW 15.21 MVAr + Total branch shunt losses - MW -15.28 MVAr Total shunt 0.0 MW -0.2 MVAr Total reserves 60.0 MW Total reserve capacity 150.0 MW @@ -118,50 +119,52 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 2 1 21.23 -2.46 -21.14 -0.14 - 2 1 300 1 21.11 -5.00 -20.87 3.99 - 3 2 4 1 19.13 -8.38 -18.87 7.21 - 4 300 4 1 18.47 -5.19 -18.44 5.34 - 5 2 5 1 14.54 -1.69 -14.43 0.23 - 6 2 6 1 22.08 -6.43 -21.75 5.50 - 7 4 6 1 17.20 6.44 -17.16 -6.30 - 8 5 7 1 14.43 -0.05 -14.32 -0.63 - 9 6 7 1 8.53 9.48 -8.48 -10.27 - 10 6 8 1 23.70 21.50 -23.59 -21.07 - 11 6 9 1 7.76 -10.34 -7.76 10.71 - 12 6 10 1 4.43 -5.91 -4.43 6.23 - 13 9 11 1 0.00 0.00 0.00 0.00 - 14 9 10 1 7.76 -10.71 -7.76 10.90 - 15 4 12 1 12.50 -20.59 -12.50 22.16 - 16 12 13 1 -18.27 -41.96 18.27 44.70 - 17 12 14 1 5.35 2.08 -5.32 -2.00 - 18 12 15 1 8.65 3.52 -8.59 -3.42 - 19 12 16 1 5.57 6.70 -5.51 -6.56 - 20 14 15 1 -0.88 0.40 0.88 -0.39 - 21 16 17 1 2.01 4.76 -1.99 -4.71 - 22 15 18 1 6.91 4.83 -6.84 -4.68 - 23 18 19 1 3.64 3.78 -3.62 -3.74 - 24 19 20 1 -5.88 0.34 5.89 -0.32 - 25 10 20 1 8.15 0.52 -8.09 -0.38 - 26 10 17 1 7.03 1.13 -7.01 -1.09 - 27 10 21 1 -3.98 -12.08 4.03 12.19 - 28 10 22 1 -4.80 -8.71 4.87 8.85 - 29 21 22 1 -21.53 -23.39 21.63 23.58 - 30 15 23 1 -7.41 -3.51 7.47 3.64 - 31 22 24 1 -2.89 2.03 2.91 -2.01 - 32 23 24 1 -0.06 5.07 0.09 -5.00 - 33 24 25 1 -11.70 0.35 11.95 0.08 - 34 25 26 1 3.54 2.36 -3.50 -2.30 - 35 25 27 1 -15.49 -2.44 15.73 2.91 - 36 28 27 1 -12.03 -20.34 12.03 22.65 - 37 27 29 1 6.16 1.65 -6.08 -1.50 - 38 27 30 1 7.10 1.63 -6.95 -1.36 - 39 29 30 1 3.68 0.60 -3.65 -0.54 - 40 8 28 1 -6.41 -8.93 6.47 7.26 - 41 6 28 1 -5.51 -13.92 5.55 13.09 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 2 1 21.23 -2.46 -21.14 -0.14 0.094 0.28 + 2 1 300 1 21.11 -5.00 -20.87 3.99 0.240 0.91 + 3 2 4 1 19.13 -8.38 -18.87 7.21 0.264 0.75 + 4 300 4 1 18.47 -5.19 -18.44 5.34 0.038 0.15 + 5 2 5 1 14.54 -1.69 -14.43 0.23 0.111 0.44 + 6 2 6 1 22.08 -6.43 -21.75 5.50 0.324 0.97 + 7 4 6 1 17.20 6.44 -17.16 -6.30 0.035 0.14 + 8 5 7 1 14.43 -0.05 -14.32 -0.63 0.110 0.26 + 9 6 7 1 8.53 9.48 -8.48 -10.27 0.054 0.14 + 10 6 8 1 23.70 21.50 -23.59 -21.07 0.108 0.43 + 11 6 9 1 7.76 -10.34 -7.76 10.71 0.000 0.37 + 12 6 10 1 4.43 -5.91 -4.43 6.23 0.000 0.32 + 13 9 11 1 0.00 0.00 0.00 0.00 0.000 0.00 + 14 9 10 1 7.76 -10.71 -7.76 10.90 0.000 0.19 + 15 4 12 1 12.50 -20.59 -12.50 22.16 -0.000 1.57 + 16 12 13 1 -18.27 -41.96 18.27 44.70 0.000 2.74 + 17 12 14 1 5.35 2.08 -5.32 -2.00 0.037 0.08 + 18 12 15 1 8.65 3.52 -8.59 -3.42 0.057 0.11 + 19 12 16 1 5.57 6.70 -5.51 -6.56 0.064 0.14 + 20 14 15 1 -0.88 0.40 0.88 -0.39 0.002 0.00 + 21 16 17 1 2.01 4.76 -1.99 -4.71 0.021 0.05 + 22 15 18 1 6.91 4.83 -6.84 -4.68 0.074 0.15 + 23 18 19 1 3.64 3.78 -3.62 -3.74 0.016 0.04 + 24 19 20 1 -5.88 0.34 5.89 -0.32 0.010 0.02 + 25 10 20 1 8.15 0.52 -8.09 -0.38 0.059 0.14 + 26 10 17 1 7.03 1.13 -7.01 -1.09 0.015 0.04 + 27 10 21 1 -3.98 -12.08 4.03 12.19 0.048 0.11 + 28 10 22 1 -4.80 -8.71 4.87 8.85 0.068 0.15 + 29 21 22 1 -21.53 -23.39 21.63 23.58 0.097 0.19 + 30 15 23 1 -7.41 -3.51 7.47 3.64 0.064 0.13 + 31 22 24 1 -2.89 2.03 2.91 -2.01 0.014 0.02 + 32 23 24 1 -0.06 5.07 0.09 -5.00 0.031 0.06 + 33 24 25 1 -11.70 0.35 11.95 0.08 0.247 0.43 + 34 25 26 1 3.54 2.36 -3.50 -2.30 0.041 0.06 + 35 25 27 1 -15.49 -2.44 15.73 2.91 0.246 0.47 + 36 28 27 1 -12.03 -20.34 12.03 22.65 0.000 2.30 + 37 27 29 1 6.16 1.65 -6.08 -1.50 0.078 0.15 + 38 27 30 1 7.10 1.63 -6.95 -1.36 0.149 0.28 + 39 29 30 1 3.68 0.60 -3.65 -0.54 0.030 0.06 + 40 8 28 1 -6.41 -8.93 6.47 7.26 0.068 0.23 + 41 6 28 1 -5.51 -13.92 5.55 13.09 0.044 0.13 + -------- -------- + Total: 2.958 15.21 ================================================================================ | Fixed Shunt Data | diff --git a/lib/t/pretty-printing/pp_mpxt_reserve_2.txt b/lib/t/pretty-printing/pp_mpxt_reserve_2.txt index af0e86a5..d281d22e 100644 --- a/lib/t/pretty-printing/pp_mpxt_reserve_2.txt +++ b/lib/t/pretty-printing/pp_mpxt_reserve_2.txt @@ -1,5 +1,5 @@ -OPF succeeded in 0.12 seconds (0.05 setup + 0.07 solve) +OPF succeeded in 0.09 seconds (0.06 setup + 0.03 solve) Objective Function Value = 764.39 $/hr ================================================================================ | System Summary | @@ -22,8 +22,9 @@ Objective Function Value = 764.39 $/hr Total max generation capacity 335.0 MW 405.9 MVAr Total min generation capacity 0.0 MW -95.0 MVAr Total load 189.2 MW 107.2 MVAr - Total branch losses 2.86 MW -1.90 MVAr - Total shunt 0.0 MW -0.2 MVAr + Total branch series losses 2.86 MW 13.33 MVAr + Total branch shunt losses - MW -15.23 MVAr + Total shunt -0.0 MW -0.2 MVAr Total reserves 60.0 MW Total reserve capacity 125.0 MW @@ -118,50 +119,52 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 2 1 21.04 -2.34 -20.95 -0.27 - 2 1 300 1 20.50 -3.10 -20.28 2.02 - 3 2 4 1 18.63 -5.85 -18.40 4.60 - 4 300 4 1 17.88 -3.22 -17.84 3.35 - 5 2 5 1 14.36 -0.69 -14.25 -0.78 - 6 2 6 1 21.66 -4.21 -21.36 3.21 - 7 4 6 1 17.58 5.68 -17.55 -5.54 - 8 5 7 1 14.25 0.96 -14.15 -1.64 - 9 6 7 1 8.70 8.46 -8.65 -9.26 - 10 6 8 1 23.82 21.37 -23.71 -20.93 - 11 6 9 1 7.27 -8.27 -7.27 8.54 - 12 6 10 1 4.15 -4.73 -4.15 4.96 - 13 9 11 1 0.00 0.00 0.00 0.00 - 14 9 10 1 7.27 -8.54 -7.27 8.68 - 15 4 12 1 11.06 -15.24 -11.06 16.20 - 16 12 13 1 -16.20 -34.00 16.20 35.92 - 17 12 14 1 4.68 2.08 -4.65 -2.01 - 18 12 15 1 6.07 3.18 -6.04 -3.12 - 19 12 16 1 5.31 5.04 -5.26 -4.94 - 20 14 15 1 -1.55 0.41 1.55 -0.41 - 21 16 17 1 1.76 3.14 -1.75 -3.11 - 22 15 18 1 7.20 3.75 -7.13 -3.60 - 23 18 19 1 3.93 2.70 -3.92 -2.67 - 24 19 20 1 -5.58 -0.73 5.59 0.75 - 25 10 20 1 7.85 1.58 -7.79 -1.45 - 26 10 17 1 7.27 2.73 -7.25 -2.69 - 27 10 21 1 -4.43 -11.57 4.47 11.68 - 28 10 22 1 -5.06 -8.40 5.13 8.54 - 29 21 22 1 -21.97 -22.88 22.07 23.07 - 30 15 23 1 -10.92 -2.72 11.04 2.97 - 31 22 24 1 -4.46 2.59 4.49 -2.54 - 32 23 24 1 2.03 2.39 -2.01 -2.37 - 33 24 25 1 -11.18 -1.75 11.41 2.16 - 34 25 26 1 3.54 2.36 -3.50 -2.30 - 35 25 27 1 -14.96 -4.52 15.20 4.99 - 36 28 27 1 -11.45 -21.09 11.45 23.48 - 37 27 29 1 6.16 1.65 -6.08 -1.50 - 38 27 30 1 7.10 1.63 -6.95 -1.36 - 39 29 30 1 3.68 0.60 -3.65 -0.54 - 40 8 28 1 -6.29 -9.07 6.36 7.41 - 41 6 28 1 -5.05 -14.50 5.09 13.68 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 2 1 21.04 -2.34 -20.95 -0.27 0.092 0.28 + 2 1 300 1 20.50 -3.10 -20.28 2.02 0.220 0.84 + 3 2 4 1 18.63 -5.85 -18.40 4.60 0.232 0.66 + 4 300 4 1 17.88 -3.22 -17.84 3.35 0.035 0.14 + 5 2 5 1 14.36 -0.69 -14.25 -0.78 0.108 0.43 + 6 2 6 1 21.66 -4.21 -21.36 3.21 0.300 0.90 + 7 4 6 1 17.58 5.68 -17.55 -5.54 0.036 0.14 + 8 5 7 1 14.25 0.96 -14.15 -1.64 0.109 0.26 + 9 6 7 1 8.70 8.46 -8.65 -9.26 0.049 0.13 + 10 6 8 1 23.82 21.37 -23.71 -20.93 0.108 0.43 + 11 6 9 1 7.27 -8.27 -7.27 8.54 -0.000 0.27 + 12 6 10 1 4.15 -4.73 -4.15 4.96 -0.000 0.23 + 13 9 11 1 0.00 0.00 0.00 0.00 0.000 0.00 + 14 9 10 1 7.27 -8.54 -7.27 8.68 0.000 0.14 + 15 4 12 1 11.06 -15.24 -11.06 16.20 0.000 0.97 + 16 12 13 1 -16.20 -34.00 16.20 35.92 -0.000 1.92 + 17 12 14 1 4.68 2.08 -4.65 -2.01 0.030 0.07 + 18 12 15 1 6.07 3.18 -6.04 -3.12 0.032 0.06 + 19 12 16 1 5.31 5.04 -5.26 -4.94 0.047 0.10 + 20 14 15 1 -1.55 0.41 1.55 -0.41 0.006 0.01 + 21 16 17 1 1.76 3.14 -1.75 -3.11 0.010 0.02 + 22 15 18 1 7.20 3.75 -7.13 -3.60 0.071 0.14 + 23 18 19 1 3.93 2.70 -3.92 -2.67 0.014 0.03 + 24 19 20 1 -5.58 -0.73 5.59 0.75 0.010 0.02 + 25 10 20 1 7.85 1.58 -7.79 -1.45 0.058 0.13 + 26 10 17 1 7.27 2.73 -7.25 -2.69 0.018 0.05 + 27 10 21 1 -4.43 -11.57 4.47 11.68 0.046 0.11 + 28 10 22 1 -5.06 -8.40 5.13 8.54 0.067 0.14 + 29 21 22 1 -21.97 -22.88 22.07 23.07 0.099 0.20 + 30 15 23 1 -10.92 -2.72 11.04 2.97 0.124 0.25 + 31 22 24 1 -4.46 2.59 4.49 -2.54 0.031 0.05 + 32 23 24 1 2.03 2.39 -2.01 -2.37 0.012 0.03 + 33 24 25 1 -11.18 -1.75 11.41 2.16 0.235 0.41 + 34 25 26 1 3.54 2.36 -3.50 -2.30 0.042 0.06 + 35 25 27 1 -14.96 -4.52 15.20 4.99 0.246 0.47 + 36 28 27 1 -11.45 -21.09 11.45 23.48 0.000 2.39 + 37 27 29 1 6.16 1.65 -6.08 -1.50 0.078 0.15 + 38 27 30 1 7.10 1.63 -6.95 -1.36 0.149 0.28 + 39 29 30 1 3.68 0.60 -3.65 -0.54 0.030 0.06 + 40 8 28 1 -6.29 -9.07 6.36 7.41 0.069 0.23 + 41 6 28 1 -5.05 -14.50 5.09 13.68 0.047 0.14 + -------- -------- + Total: 2.860 13.33 ================================================================================ | Fixed Shunt Data | @@ -172,7 +175,7 @@ Shunt ID Bus ID Status P (MW) Q (MVAr) 1 5 1 - -0.18 2 24 1 - -0.04 -------- -------- - Total: 0.00 -0.22 + Total: -0.00 -0.22 ================================================================================ | Reserve Gen Data | diff --git a/lib/t/pretty-printing/pp_mpxt_reserve_3.txt b/lib/t/pretty-printing/pp_mpxt_reserve_3.txt index 9617cbf4..c2603d6c 100644 --- a/lib/t/pretty-printing/pp_mpxt_reserve_3.txt +++ b/lib/t/pretty-printing/pp_mpxt_reserve_3.txt @@ -1,5 +1,5 @@ -OPF succeeded in 0.12 seconds (0.05 setup + 0.07 solve) +OPF succeeded in 0.08 seconds (0.04 setup + 0.03 solve) Objective Function Value = 764.39 $/hr ================================================================================ | System Summary | @@ -24,8 +24,9 @@ Objective Function Value = 764.39 $/hr Total min generation capacity 0.0 MW -105.0 MVAr online 0.0 MW -95.0 MVAr Total load 189.2 MW 107.2 MVAr - Total branch losses 2.86 MW -1.90 MVAr - Total shunt 0.0 MW -0.2 MVAr + Total branch series losses 2.86 MW 13.33 MVAr + Total branch shunt losses - MW -15.23 MVAr + Total shunt -0.0 MW -0.2 MVAr Total reserves 60.0 MW Total reserve capacity 125.0 MW online 125.0 MW @@ -122,50 +123,52 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 2 1 21.04 -2.34 -20.95 -0.27 - 2 1 300 1 20.50 -3.10 -20.28 2.02 - 3 2 4 1 18.63 -5.85 -18.40 4.60 - 4 300 4 1 17.88 -3.22 -17.84 3.35 - 5 2 5 1 14.36 -0.69 -14.25 -0.78 - 6 2 6 1 21.66 -4.21 -21.36 3.21 - 7 4 6 1 17.58 5.68 -17.55 -5.54 - 8 5 7 1 14.25 0.96 -14.15 -1.64 - 9 6 7 1 8.70 8.46 -8.65 -9.26 - 10 6 8 1 23.82 21.37 -23.71 -20.93 - 11 6 9 1 7.27 -8.27 -7.27 8.54 - 12 6 10 1 4.15 -4.73 -4.15 4.96 - 13 9 11 1 0.00 0.00 0.00 0.00 - 14 9 10 1 7.27 -8.54 -7.27 8.68 - 15 4 12 1 11.06 -15.24 -11.06 16.20 - 16 12 13 1 -16.20 -34.00 16.20 35.92 - 17 12 14 1 4.68 2.08 -4.65 -2.01 - 18 12 15 1 6.07 3.18 -6.04 -3.12 - 19 12 16 1 5.31 5.04 -5.26 -4.94 - 20 14 15 1 -1.55 0.41 1.55 -0.41 - 21 16 17 1 1.76 3.14 -1.75 -3.11 - 22 15 18 1 7.20 3.75 -7.13 -3.60 - 23 18 19 1 3.93 2.70 -3.92 -2.67 - 24 19 20 1 -5.58 -0.73 5.59 0.75 - 25 10 20 1 7.85 1.58 -7.79 -1.45 - 26 10 17 1 7.27 2.73 -7.25 -2.69 - 27 10 21 1 -4.43 -11.57 4.47 11.68 - 28 10 22 1 -5.06 -8.40 5.13 8.54 - 29 21 22 1 -21.97 -22.88 22.07 23.07 - 30 15 23 1 -10.92 -2.72 11.04 2.97 - 31 22 24 1 -4.46 2.59 4.49 -2.54 - 32 23 24 1 2.03 2.39 -2.01 -2.37 - 33 24 25 1 -11.18 -1.75 11.41 2.16 - 34 25 26 1 3.54 2.36 -3.50 -2.30 - 35 25 27 1 -14.96 -4.52 15.20 4.99 - 36 28 27 1 -11.45 -21.09 11.45 23.48 - 37 27 29 1 6.16 1.65 -6.08 -1.50 - 38 27 30 1 7.10 1.63 -6.95 -1.36 - 39 29 30 1 3.68 0.60 -3.65 -0.54 - 40 8 28 1 -6.29 -9.07 6.36 7.41 - 41 6 28 1 -5.05 -14.50 5.09 13.68 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 2 1 21.04 -2.34 -20.95 -0.27 0.092 0.28 + 2 1 300 1 20.50 -3.10 -20.28 2.02 0.220 0.84 + 3 2 4 1 18.63 -5.85 -18.40 4.60 0.232 0.66 + 4 300 4 1 17.88 -3.22 -17.84 3.35 0.035 0.14 + 5 2 5 1 14.36 -0.69 -14.25 -0.78 0.108 0.43 + 6 2 6 1 21.66 -4.21 -21.36 3.21 0.300 0.90 + 7 4 6 1 17.58 5.68 -17.55 -5.54 0.036 0.14 + 8 5 7 1 14.25 0.96 -14.15 -1.64 0.109 0.26 + 9 6 7 1 8.70 8.46 -8.65 -9.26 0.049 0.13 + 10 6 8 1 23.82 21.37 -23.71 -20.93 0.108 0.43 + 11 6 9 1 7.27 -8.27 -7.27 8.54 -0.000 0.27 + 12 6 10 1 4.15 -4.73 -4.15 4.96 -0.000 0.23 + 13 9 11 1 0.00 0.00 0.00 0.00 0.000 0.00 + 14 9 10 1 7.27 -8.54 -7.27 8.68 0.000 0.14 + 15 4 12 1 11.06 -15.24 -11.06 16.20 0.000 0.97 + 16 12 13 1 -16.20 -34.00 16.20 35.92 -0.000 1.92 + 17 12 14 1 4.68 2.08 -4.65 -2.01 0.030 0.07 + 18 12 15 1 6.07 3.18 -6.04 -3.12 0.032 0.06 + 19 12 16 1 5.31 5.04 -5.26 -4.94 0.047 0.10 + 20 14 15 1 -1.55 0.41 1.55 -0.41 0.006 0.01 + 21 16 17 1 1.76 3.14 -1.75 -3.11 0.010 0.02 + 22 15 18 1 7.20 3.75 -7.13 -3.60 0.071 0.14 + 23 18 19 1 3.93 2.70 -3.92 -2.67 0.014 0.03 + 24 19 20 1 -5.58 -0.73 5.59 0.75 0.010 0.02 + 25 10 20 1 7.85 1.58 -7.79 -1.45 0.058 0.13 + 26 10 17 1 7.27 2.73 -7.25 -2.69 0.018 0.05 + 27 10 21 1 -4.43 -11.57 4.47 11.68 0.046 0.11 + 28 10 22 1 -5.06 -8.40 5.13 8.54 0.067 0.14 + 29 21 22 1 -21.97 -22.88 22.07 23.07 0.099 0.20 + 30 15 23 1 -10.92 -2.72 11.04 2.97 0.124 0.25 + 31 22 24 1 -4.46 2.59 4.49 -2.54 0.031 0.05 + 32 23 24 1 2.03 2.39 -2.01 -2.37 0.012 0.03 + 33 24 25 1 -11.18 -1.75 11.41 2.16 0.235 0.41 + 34 25 26 1 3.54 2.36 -3.50 -2.30 0.042 0.06 + 35 25 27 1 -14.96 -4.52 15.20 4.99 0.246 0.47 + 36 28 27 1 -11.45 -21.09 11.45 23.48 0.000 2.39 + 37 27 29 1 6.16 1.65 -6.08 -1.50 0.078 0.15 + 38 27 30 1 7.10 1.63 -6.95 -1.36 0.149 0.28 + 39 29 30 1 3.68 0.60 -3.65 -0.54 0.030 0.06 + 40 8 28 1 -6.29 -9.07 6.36 7.41 0.069 0.23 + 41 6 28 1 -5.05 -14.50 5.09 13.68 0.047 0.14 + -------- -------- + Total: 2.860 13.33 ================================================================================ | Fixed Shunt Data | @@ -176,7 +179,7 @@ Shunt ID Bus ID Status P (MW) Q (MVAr) 1 5 1 - -0.18 2 24 1 - -0.04 -------- -------- - Total: 0.00 -0.22 + Total: -0.00 -0.22 ================================================================================ | Reserve Gen Data | diff --git a/lib/t/pretty-printing/pp_mpxt_reserve_4.txt b/lib/t/pretty-printing/pp_mpxt_reserve_4.txt index b5973cc7..266f2c48 100644 --- a/lib/t/pretty-printing/pp_mpxt_reserve_4.txt +++ b/lib/t/pretty-printing/pp_mpxt_reserve_4.txt @@ -1,5 +1,5 @@ -OPF succeeded in 0.12 seconds (0.05 setup + 0.07 solve) +OPF succeeded in 0.06 seconds (0.03 setup + 0.03 solve) Objective Function Value = 755.96 $/hr ================================================================================ | System Summary | @@ -22,7 +22,8 @@ Objective Function Value = 755.96 $/hr Total max generation capacity 335.0 MW 405.9 MVAr Total min generation capacity 0.0 MW -95.0 MVAr Total load 189.2 MW 107.2 MVAr - Total branch losses 2.96 MW -0.07 MVAr + Total branch series losses 2.96 MW 15.21 MVAr + Total branch shunt losses - MW -15.28 MVAr Total shunt -0.0 MW -0.2 MVAr Total reserves 60.0 MW Total reserve capacity Inf MW @@ -118,50 +119,52 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 2 1 21.23 -2.46 -21.14 -0.14 - 2 1 300 1 21.11 -5.00 -20.87 3.99 - 3 2 4 1 19.13 -8.38 -18.87 7.21 - 4 300 4 1 18.47 -5.19 -18.44 5.34 - 5 2 5 1 14.54 -1.69 -14.43 0.23 - 6 2 6 1 22.08 -6.43 -21.75 5.50 - 7 4 6 1 17.20 6.44 -17.16 -6.30 - 8 5 7 1 14.43 -0.05 -14.32 -0.63 - 9 6 7 1 8.53 9.48 -8.48 -10.27 - 10 6 8 1 23.70 21.50 -23.59 -21.07 - 11 6 9 1 7.76 -10.34 -7.76 10.71 - 12 6 10 1 4.43 -5.91 -4.43 6.23 - 13 9 11 1 0.00 0.00 0.00 0.00 - 14 9 10 1 7.76 -10.71 -7.76 10.90 - 15 4 12 1 12.50 -20.59 -12.50 22.16 - 16 12 13 1 -18.27 -41.96 18.27 44.70 - 17 12 14 1 5.35 2.08 -5.32 -2.00 - 18 12 15 1 8.65 3.52 -8.59 -3.42 - 19 12 16 1 5.57 6.70 -5.51 -6.56 - 20 14 15 1 -0.88 0.40 0.88 -0.39 - 21 16 17 1 2.01 4.76 -1.99 -4.71 - 22 15 18 1 6.91 4.83 -6.84 -4.68 - 23 18 19 1 3.64 3.78 -3.62 -3.74 - 24 19 20 1 -5.88 0.34 5.89 -0.32 - 25 10 20 1 8.15 0.52 -8.09 -0.38 - 26 10 17 1 7.03 1.13 -7.01 -1.09 - 27 10 21 1 -3.98 -12.08 4.03 12.19 - 28 10 22 1 -4.80 -8.71 4.87 8.85 - 29 21 22 1 -21.53 -23.39 21.63 23.58 - 30 15 23 1 -7.41 -3.51 7.47 3.64 - 31 22 24 1 -2.89 2.03 2.91 -2.01 - 32 23 24 1 -0.06 5.07 0.09 -5.00 - 33 24 25 1 -11.70 0.35 11.95 0.08 - 34 25 26 1 3.54 2.36 -3.50 -2.30 - 35 25 27 1 -15.49 -2.44 15.73 2.91 - 36 28 27 1 -12.03 -20.34 12.03 22.65 - 37 27 29 1 6.16 1.65 -6.08 -1.50 - 38 27 30 1 7.10 1.63 -6.95 -1.36 - 39 29 30 1 3.68 0.60 -3.65 -0.54 - 40 8 28 1 -6.41 -8.93 6.47 7.26 - 41 6 28 1 -5.51 -13.92 5.55 13.09 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 2 1 21.23 -2.46 -21.14 -0.14 0.094 0.28 + 2 1 300 1 21.11 -5.00 -20.87 3.99 0.240 0.91 + 3 2 4 1 19.13 -8.38 -18.87 7.21 0.264 0.75 + 4 300 4 1 18.47 -5.19 -18.44 5.34 0.038 0.15 + 5 2 5 1 14.54 -1.69 -14.43 0.23 0.111 0.44 + 6 2 6 1 22.08 -6.43 -21.75 5.50 0.324 0.97 + 7 4 6 1 17.20 6.44 -17.16 -6.30 0.035 0.14 + 8 5 7 1 14.43 -0.05 -14.32 -0.63 0.110 0.26 + 9 6 7 1 8.53 9.48 -8.48 -10.27 0.054 0.14 + 10 6 8 1 23.70 21.50 -23.59 -21.07 0.108 0.43 + 11 6 9 1 7.76 -10.34 -7.76 10.71 0.000 0.37 + 12 6 10 1 4.43 -5.91 -4.43 6.23 0.000 0.32 + 13 9 11 1 0.00 0.00 0.00 0.00 0.000 0.00 + 14 9 10 1 7.76 -10.71 -7.76 10.90 0.000 0.19 + 15 4 12 1 12.50 -20.59 -12.50 22.16 0.000 1.57 + 16 12 13 1 -18.27 -41.96 18.27 44.70 0.000 2.74 + 17 12 14 1 5.35 2.08 -5.32 -2.00 0.037 0.08 + 18 12 15 1 8.65 3.52 -8.59 -3.42 0.057 0.11 + 19 12 16 1 5.57 6.70 -5.51 -6.56 0.064 0.14 + 20 14 15 1 -0.88 0.40 0.88 -0.39 0.002 0.00 + 21 16 17 1 2.01 4.76 -1.99 -4.71 0.021 0.05 + 22 15 18 1 6.91 4.83 -6.84 -4.68 0.074 0.15 + 23 18 19 1 3.64 3.78 -3.62 -3.74 0.016 0.04 + 24 19 20 1 -5.88 0.34 5.89 -0.32 0.010 0.02 + 25 10 20 1 8.15 0.52 -8.09 -0.38 0.059 0.14 + 26 10 17 1 7.03 1.13 -7.01 -1.09 0.015 0.04 + 27 10 21 1 -3.98 -12.08 4.03 12.19 0.048 0.11 + 28 10 22 1 -4.80 -8.71 4.87 8.85 0.068 0.15 + 29 21 22 1 -21.53 -23.39 21.63 23.58 0.097 0.19 + 30 15 23 1 -7.41 -3.51 7.47 3.64 0.064 0.13 + 31 22 24 1 -2.89 2.03 2.91 -2.01 0.014 0.02 + 32 23 24 1 -0.06 5.07 0.09 -5.00 0.031 0.06 + 33 24 25 1 -11.70 0.35 11.95 0.08 0.247 0.43 + 34 25 26 1 3.54 2.36 -3.50 -2.30 0.041 0.06 + 35 25 27 1 -15.49 -2.44 15.73 2.91 0.246 0.47 + 36 28 27 1 -12.03 -20.34 12.03 22.65 0.000 2.30 + 37 27 29 1 6.16 1.65 -6.08 -1.50 0.078 0.15 + 38 27 30 1 7.10 1.63 -6.95 -1.36 0.149 0.28 + 39 29 30 1 3.68 0.60 -3.65 -0.54 0.030 0.06 + 40 8 28 1 -6.41 -8.93 6.47 7.26 0.068 0.23 + 41 6 28 1 -5.51 -13.92 5.55 13.09 0.044 0.13 + -------- -------- + Total: 2.958 15.21 ================================================================================ | Fixed Shunt Data | diff --git a/lib/t/pretty-printing/pp_opf_case9.txt b/lib/t/pretty-printing/pp_opf_case9.txt index 07f4625f..4bb31cbd 100644 --- a/lib/t/pretty-printing/pp_opf_case9.txt +++ b/lib/t/pretty-printing/pp_opf_case9.txt @@ -1,5 +1,5 @@ -OPF succeeded in 0.22 seconds (0.13 setup + 0.09 solve) +OPF succeeded in 0.08 seconds (0.06 setup + 0.02 solve) Objective Function Value = 5296.69 $/hr ================================================================================ | System Summary | @@ -19,7 +19,8 @@ Objective Function Value = 5296.69 $/hr Total max generation capacity 820.0 MW 900.0 MVAr Total min generation capacity 30.0 MW -900.0 MVAr Total load 315.0 MW 115.0 MVAr - Total branch losses 3.31 MW -124.64 MVAr + Total branch series losses 3.31 MW 36.46 MVAr + Total branch shunt losses - MW -161.10 MVAr minimum maximum ----------------------------- ----------------------------- @@ -71,18 +72,20 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 4 1 89.80 12.97 -89.80 -9.05 - 2 4 5 1 35.22 -3.89 -35.04 -13.88 - 3 5 6 1 -54.96 -16.12 55.97 -22.19 - 4 3 6 1 94.19 -22.63 -94.19 27.29 - 5 6 7 1 38.22 -5.10 -38.07 -18.68 - 6 7 8 1 -61.93 -16.32 62.21 0.82 - 7 8 2 1 -134.32 9.33 134.32 0.03 - 8 8 9 1 72.11 -10.15 -70.72 -18.92 - 9 9 4 1 -54.28 -31.08 54.58 12.94 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 4 1 89.80 12.97 -89.80 -9.05 -0.000 3.92 + 2 4 5 1 35.22 -3.89 -35.04 -13.88 0.181 0.98 + 3 5 6 1 -54.96 -16.12 55.97 -22.19 1.010 4.40 + 4 3 6 1 94.19 -22.63 -94.19 27.29 0.000 4.66 + 5 6 7 1 38.22 -5.10 -38.07 -18.68 0.149 1.26 + 6 7 8 1 -61.93 -16.32 62.21 0.82 0.279 2.36 + 7 8 2 1 -134.32 9.33 134.32 0.03 0.000 9.36 + 8 8 9 1 72.11 -10.15 -70.72 -18.92 1.394 7.01 + 9 9 4 1 -54.28 -31.08 54.58 12.94 0.295 2.51 + -------- -------- + Total: 3.307 36.46 ================================================================================ | Bus Constraints | diff --git a/lib/t/pretty-printing/pp_opf_t_auction_case.txt b/lib/t/pretty-printing/pp_opf_t_auction_case.txt index f5c0f7aa..8f075827 100644 --- a/lib/t/pretty-printing/pp_opf_t_auction_case.txt +++ b/lib/t/pretty-printing/pp_opf_t_auction_case.txt @@ -1,5 +1,5 @@ -OPF succeeded in 0.30 seconds (0.17 setup + 0.13 solve) +OPF succeeded in 0.09 seconds (0.05 setup + 0.04 solve) Objective Function Value = 2525.32 $/hr ================================================================================ | System Summary | @@ -20,8 +20,9 @@ Objective Function Value = 2525.32 $/hr Total max generation capacity 360.0 MW 360.0 MVAr Total min generation capacity 5.0 MW -124.5 MVAr Total load 151.6 MW 82.3 MVAr - Total branch losses 5.36 MW 0.99 MVAr - Total shunt -0.0 MW -0.2 MVAr + Total branch series losses 5.36 MW 18.25 MVAr + Total branch shunt losses - MW -17.26 MVAr + Total shunt 0.0 MW -0.2 MVAr minimum maximum ----------------------------- ----------------------------- @@ -114,50 +115,52 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 2 1 15.56 -1.73 -15.52 -1.44 - 2 1 3 1 19.44 4.57 -19.25 -6.03 - 3 2 4 1 15.36 2.17 -15.23 -3.95 - 4 3 4 1 -3.06 -5.13 3.07 5.14 - 5 2 5 1 12.84 3.11 -12.75 -4.94 - 6 2 6 1 14.99 2.67 -14.86 -4.44 - 7 4 6 1 1.94 1.96 -1.94 -1.95 - 8 5 7 1 12.75 5.14 -12.66 -5.98 - 9 6 7 1 17.44 8.26 -17.34 -9.02 - 10 6 8 1 11.77 9.56 -11.75 -9.47 - 11 6 9 1 -8.24 -3.41 8.24 3.57 - 12 6 10 1 -4.71 -1.95 4.71 2.09 - 13 9 11 1 0.00 0.00 0.00 0.00 - 14 9 10 1 -8.24 -3.57 8.24 3.65 - 15 4 12 1 1.39 -5.01 -1.39 5.08 - 16 12 13 1 -60.00 -34.76 60.00 40.91 - 17 12 14 1 9.85 3.02 -9.73 -2.77 - 18 12 15 1 23.61 8.23 -23.21 -7.49 - 19 12 16 1 14.92 9.71 -14.66 -9.13 - 20 14 15 1 2.52 0.91 -2.51 -0.89 - 21 16 17 1 10.59 7.04 -10.46 -6.74 - 22 15 18 1 17.84 6.88 -17.45 -6.10 - 23 18 19 1 13.73 5.06 -13.60 -4.77 - 24 19 20 1 2.56 0.82 -2.56 -0.81 - 25 10 20 0 0.00 0.00 0.00 0.00 - 26 10 17 0 0.00 0.00 0.00 0.00 - 27 10 21 1 -12.03 -4.95 12.07 5.06 - 28 10 220 1 -7.66 -3.11 7.70 3.21 - 29 21 220 1 -15.47 -7.23 15.49 7.28 - 30 15 23 1 -22.13 -10.50 22.70 11.65 - 31 220 24 1 11.09 -1.93 -10.96 2.14 - 32 23 24 1 0.39 7.37 -0.32 -7.24 - 33 24 25 1 1.17 -2.64 -1.15 2.67 - 34 25 26 1 4.12 2.76 -4.07 -2.67 - 35 25 27 1 -2.97 -5.43 3.01 5.50 - 36 28 27 1 -1.69 -7.39 1.69 7.60 - 37 27 29 1 15.13 5.52 -14.62 -4.56 - 38 27 30 1 19.76 6.98 -18.52 -4.66 - 39 29 30 1 11.83 3.51 -11.48 -2.84 - 40 8 28 1 -2.20 -4.48 2.21 2.38 - 41 6 28 1 0.53 -6.06 -0.52 5.01 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 2 1 15.56 -1.73 -15.52 -1.44 0.044 0.13 + 2 1 3 1 19.44 4.57 -19.25 -6.03 0.186 0.71 + 3 2 4 1 15.36 2.17 -15.23 -3.95 0.135 0.38 + 4 3 4 1 -3.06 -5.13 3.07 5.14 0.003 0.01 + 5 2 5 1 12.84 3.11 -12.75 -4.94 0.083 0.33 + 6 2 6 1 14.99 2.67 -14.86 -4.44 0.131 0.39 + 7 4 6 1 1.94 1.96 -1.94 -1.95 0.001 0.00 + 8 5 7 1 12.75 5.14 -12.66 -5.98 0.091 0.22 + 9 6 7 1 17.44 8.26 -17.34 -9.02 0.107 0.29 + 10 6 8 1 11.77 9.56 -11.75 -9.47 0.022 0.09 + 11 6 9 1 -8.24 -3.41 8.24 3.57 0.000 0.16 + 12 6 10 1 -4.71 -1.95 4.71 2.09 -0.000 0.14 + 13 9 11 1 0.00 0.00 0.00 0.00 0.000 0.00 + 14 9 10 1 -8.24 -3.57 8.24 3.65 0.000 0.08 + 15 4 12 1 1.39 -5.01 -1.39 5.08 0.000 0.07 + 16 12 13 1 -60.00 -34.76 60.00 40.91 0.000 6.15 + 17 12 14 1 9.85 3.02 -9.73 -2.77 0.116 0.25 + 18 12 15 1 23.61 8.23 -23.21 -7.49 0.400 0.74 + 19 12 16 1 14.92 9.71 -14.66 -9.13 0.261 0.58 + 20 14 15 1 2.52 0.91 -2.51 -0.89 0.015 0.01 + 21 16 17 1 10.59 7.04 -10.46 -6.74 0.126 0.30 + 22 15 18 1 17.84 6.88 -17.45 -6.10 0.386 0.77 + 23 18 19 1 13.73 5.06 -13.60 -4.77 0.132 0.29 + 24 19 20 1 2.56 0.82 -2.56 -0.81 0.002 0.01 + 25 10 20 0 0.00 0.00 0.00 0.00 0.000 0.00 + 26 10 17 0 0.00 0.00 0.00 0.00 0.000 0.00 + 27 10 21 1 -12.03 -4.95 12.07 5.06 0.047 0.11 + 28 10 220 1 -7.66 -3.11 7.70 3.21 0.044 0.09 + 29 21 220 1 -15.47 -7.23 15.49 7.28 0.026 0.05 + 30 15 23 1 -22.13 -10.50 22.70 11.65 0.576 1.15 + 31 220 24 1 11.09 -1.93 -10.96 2.14 0.137 0.21 + 32 23 24 1 0.39 7.37 -0.32 -7.24 0.063 0.13 + 33 24 25 1 1.17 -2.64 -1.15 2.67 0.015 0.03 + 34 25 26 1 4.12 2.76 -4.07 -2.67 0.056 0.08 + 35 25 27 1 -2.97 -5.43 3.01 5.50 0.038 0.07 + 36 28 27 1 -1.69 -7.39 1.69 7.60 -0.000 0.21 + 37 27 29 1 15.13 5.52 -14.62 -4.56 0.504 0.96 + 38 27 30 1 19.76 6.98 -18.52 -4.66 1.242 2.33 + 39 29 30 1 11.83 3.51 -11.48 -2.84 0.357 0.67 + 40 8 28 1 -2.20 -4.48 2.21 2.38 0.009 0.03 + 41 6 28 1 0.53 -6.06 -0.52 5.01 0.006 0.02 + -------- -------- + Total: 5.362 18.25 ================================================================================ | Fixed Shunt Data | @@ -168,7 +171,7 @@ Shunt ID Bus ID Status P (MW) Q (MVAr) 1 5 1 - -0.20 2 24 1 - -0.04 -------- -------- - Total: -0.00 -0.25 + Total: 0.00 -0.25 ================================================================================ | Bus Constraints | diff --git a/lib/t/pretty-printing/pp_opf_t_case3p_g.txt b/lib/t/pretty-printing/pp_opf_t_case3p_g.txt index 590923d0..05bf8540 100644 --- a/lib/t/pretty-printing/pp_opf_t_case3p_g.txt +++ b/lib/t/pretty-printing/pp_opf_t_case3p_g.txt @@ -1,5 +1,5 @@ -OPF succeeded in 0.40 seconds (0.32 setup + 0.08 solve) +OPF succeeded in 0.18 seconds (0.15 setup + 0.03 solve) Objective Function Value = 5773.54 $/hr ================================================================================ | System Summary | @@ -24,7 +24,8 @@ Objective Function Value = 5773.54 $/hr Total max generation capacity 820.0 MW 900.0 MVAr Total min generation capacity 30.0 MW -900.0 MVAr Total load 315.0 MW 115.0 MVAr - Total branch losses 4.08 MW -86.61 MVAr + Total branch series losses 4.08 MW 45.57 MVAr + Total branch shunt losses - MW -132.18 MVAr Total 3-ph load 16350.0 kW 7327.7 kVAr Total 3-ph line loss 1684.5 kW 3521.3 kVAr Total 3-ph transformer loss 295.1 kW 1770.6 kVAr @@ -79,18 +80,20 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 4 1 90.28 21.16 -90.28 -16.20 - 2 4 5 1 35.51 -1.52 -35.29 -12.54 - 3 5 6 1 -54.71 -17.46 55.93 -12.40 - 4 3 6 1 93.28 -5.55 -93.28 10.67 - 5 6 7 1 37.35 1.73 -37.16 -20.96 - 6 7 8 1 -62.84 -14.04 63.18 2.26 - 7 8 2 1 -141.63 -4.44 141.63 16.99 - 8 8 9 1 72.34 -2.02 -70.61 -18.73 - 9 9 4 1 -54.39 -31.27 54.77 17.72 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 4 1 90.28 21.16 -90.28 -16.20 0.000 4.95 + 2 4 5 1 35.51 -1.52 -35.29 -12.54 0.226 1.22 + 3 5 6 1 -54.71 -17.46 55.93 -12.40 1.221 5.32 + 4 3 6 1 93.28 -5.55 -93.28 10.67 0.000 5.12 + 5 6 7 1 37.35 1.73 -37.16 -20.96 0.182 1.54 + 6 7 8 1 -62.84 -14.04 63.18 2.26 0.347 2.94 + 7 8 2 1 -141.63 -4.44 141.63 16.99 -0.000 12.55 + 8 8 9 1 72.34 -2.02 -70.61 -18.73 1.731 8.71 + 9 9 4 1 -54.39 -31.27 54.77 17.72 0.377 3.21 + -------- -------- + Total: 4.085 45.57 ================================================================================ | 3-ph Bus Data | diff --git a/lib/t/pretty-printing/pp_pf_case9.txt b/lib/t/pretty-printing/pp_pf_case9.txt index 9b247b63..410215df 100644 --- a/lib/t/pretty-printing/pp_pf_case9.txt +++ b/lib/t/pretty-printing/pp_pf_case9.txt @@ -1,5 +1,5 @@ -PF succeeded in 0.64 seconds (0.59 setup + 0.05 solve) +PF succeeded in 0.04 seconds (0.04 setup + 0.00 solve) ================================================================================ | System Summary | ================================================================================ @@ -18,7 +18,8 @@ PF succeeded in 0.64 seconds (0.59 setup + 0.05 solve) Total max generation capacity 820.0 MW 900.0 MVAr Total min generation capacity 30.0 MW -900.0 MVAr Total load 315.0 MW 115.0 MVAr - Total branch losses 4.64 MW -92.16 MVAr + Total branch series losses 4.64 MW 48.38 MVAr + Total branch shunt losses - MW -140.54 MVAr minimum maximum ----------------------------- ----------------------------- @@ -68,15 +69,17 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 4 1 71.64 27.05 -71.64 -23.92 - 2 4 5 1 30.70 1.03 -30.54 -16.54 - 3 5 6 1 -59.46 -13.46 60.82 -18.07 - 4 3 6 1 85.00 -10.86 -85.00 14.96 - 5 6 7 1 24.18 3.12 -24.10 -24.30 - 6 7 8 1 -75.90 -10.70 76.38 -0.80 - 7 8 2 1 -163.00 9.18 163.00 6.65 - 8 8 9 1 86.62 -8.38 -84.32 -11.31 - 9 9 4 1 -40.68 -38.69 40.94 22.89 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 4 1 71.64 27.05 -71.64 -23.92 0.000 3.12 + 2 4 5 1 30.70 1.03 -30.54 -16.54 0.166 0.90 + 3 5 6 1 -59.46 -13.46 60.82 -18.07 1.354 5.90 + 4 3 6 1 85.00 -10.86 -85.00 14.96 0.000 4.10 + 5 6 7 1 24.18 3.12 -24.10 -24.30 0.088 0.75 + 6 7 8 1 -75.90 -10.70 76.38 -0.80 0.475 4.03 + 7 8 2 1 -163.00 9.18 163.00 6.65 0.000 15.83 + 8 8 9 1 86.62 -8.38 -84.32 -11.31 2.300 11.57 + 9 9 4 1 -40.68 -38.69 40.94 22.89 0.258 2.19 + -------- -------- + Total: 4.641 48.38 diff --git a/lib/t/pretty-printing/pp_pf_t_auction_case.txt b/lib/t/pretty-printing/pp_pf_t_auction_case.txt index 234ed0c0..4f3511f8 100644 --- a/lib/t/pretty-printing/pp_pf_t_auction_case.txt +++ b/lib/t/pretty-printing/pp_pf_t_auction_case.txt @@ -1,5 +1,5 @@ -PF succeeded in 0.10 seconds (0.09 setup + 0.00 solve) +PF succeeded in 0.03 seconds (0.03 setup + 0.00 solve) ================================================================================ | System Summary | ================================================================================ @@ -19,7 +19,8 @@ PF succeeded in 0.10 seconds (0.09 setup + 0.00 solve) Total max generation capacity 360.0 MW 360.0 MVAr Total min generation capacity 5.0 MW -124.5 MVAr Total load 151.6 MW 82.3 MVAr - Total branch losses 6.89 MW 6.16 MVAr + Total branch series losses 6.89 MW 21.99 MVAr + Total branch shunt losses - MW -15.82 MVAr Total shunt 0.0 MW -0.2 MVAr minimum maximum @@ -111,50 +112,52 @@ Load ID Bus ID Status P (MW) Q (MVAr) ================================================================================ | Branch Data | ================================================================================ - Branch From To From Bus Injection To Bus Injection - ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) --------- -------- -------- ------ -------- -------- -------- -------- - 1 1 2 1 27.33 -10.34 -27.17 7.83 - 2 1 3 1 35.53 1.04 -34.90 -0.60 - 3 2 4 1 32.10 -1.81 -31.48 1.59 - 4 3 4 1 12.58 -10.56 -12.55 10.67 - 5 2 5 1 20.49 -7.24 -20.26 6.15 - 6 2 6 1 30.50 -3.64 -29.93 3.35 - 7 4 6 1 0.16 -10.91 -0.15 10.96 - 8 5 7 1 20.26 -5.96 -20.05 5.48 - 9 6 7 1 10.09 -18.89 -9.95 18.26 - 10 6 8 1 11.79 10.62 -11.77 -10.51 - 11 6 9 1 4.75 -2.45 -4.75 2.51 - 12 6 10 1 2.71 -1.40 -2.71 1.45 - 13 9 11 1 0.00 0.00 0.00 0.00 - 14 9 10 1 4.75 -2.51 -4.75 2.54 - 15 4 12 1 35.05 -3.22 -35.05 6.55 - 16 12 13 1 -37.00 -1.55 37.00 3.48 - 17 12 14 1 11.14 -4.32 -10.97 4.69 - 18 12 15 1 32.93 -19.21 -31.90 21.11 - 19 12 16 1 14.96 9.81 -14.67 -9.17 - 20 14 15 1 3.76 -6.55 -3.63 6.66 - 21 16 17 1 10.60 7.07 -10.46 -6.74 - 22 15 18 1 17.86 6.92 -17.46 -6.12 - 23 18 19 1 13.74 5.07 -13.60 -4.77 - 24 19 20 1 2.56 0.82 -2.56 -0.81 - 25 10 20 0 0.00 0.00 0.00 0.00 - 26 10 17 0 0.00 0.00 0.00 0.00 - 27 10 21 1 0.76 -3.77 -0.75 3.78 - 28 10 220 1 -0.04 -2.55 0.04 2.56 - 29 21 220 1 -2.64 -5.95 2.64 5.96 - 30 15 23 1 -12.33 6.41 12.52 -6.02 - 31 220 24 1 18.91 -2.08 -18.47 2.73 - 32 23 24 1 -15.64 15.01 16.25 -13.74 - 33 24 25 1 -7.89 3.26 8.04 -3.01 - 34 25 26 1 4.13 2.77 -4.07 -2.67 - 35 25 27 1 -12.17 0.24 12.34 0.08 - 36 28 27 1 -1.45 -2.73 1.45 2.77 - 37 27 29 1 6.22 -1.78 -6.12 1.95 - 38 27 30 1 6.91 -3.45 -6.72 3.81 - 39 29 30 1 3.33 -3.00 -3.28 3.09 - 40 8 28 1 -2.18 -3.44 2.19 1.52 - 41 6 28 1 0.74 -2.19 -0.74 1.21 + Branch From To From Bus Injection To Bus Injection Series Loss + ID Bus ID Bus ID Status P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q (MVAr) +-------- -------- -------- ------ -------- -------- -------- -------- -------- -------- + 1 1 2 1 27.33 -10.34 -27.17 7.83 0.165 0.50 + 2 1 3 1 35.53 1.04 -34.90 -0.60 0.633 2.41 + 3 2 4 1 32.10 -1.81 -31.48 1.59 0.619 1.75 + 4 3 4 1 12.58 -10.56 -12.55 10.67 0.028 0.11 + 5 2 5 1 20.49 -7.24 -20.26 6.15 0.229 0.92 + 6 2 6 1 30.50 -3.64 -29.93 3.35 0.562 1.69 + 7 4 6 1 0.16 -10.91 -0.15 10.96 0.012 0.05 + 8 5 7 1 20.26 -5.96 -20.05 5.48 0.219 0.53 + 9 6 7 1 10.09 -18.89 -9.95 18.26 0.135 0.36 + 10 6 8 1 11.79 10.62 -11.77 -10.51 0.026 0.10 + 11 6 9 1 4.75 -2.45 -4.75 2.51 0.000 0.06 + 12 6 10 1 2.71 -1.40 -2.71 1.45 0.000 0.05 + 13 9 11 1 0.00 0.00 0.00 0.00 0.000 0.00 + 14 9 10 1 4.75 -2.51 -4.75 2.54 0.000 0.03 + 15 4 12 1 35.05 -3.22 -35.05 6.55 0.000 3.33 + 16 12 13 1 -37.00 -1.55 37.00 3.48 0.000 1.93 + 17 12 14 1 11.14 -4.32 -10.97 4.69 0.172 0.37 + 18 12 15 1 32.93 -19.21 -31.90 21.11 1.025 1.90 + 19 12 16 1 14.96 9.81 -14.67 -9.17 0.290 0.64 + 20 14 15 1 3.76 -6.55 -3.63 6.66 0.127 0.12 + 21 16 17 1 10.60 7.07 -10.46 -6.74 0.140 0.33 + 22 15 18 1 17.86 6.92 -17.46 -6.12 0.404 0.81 + 23 18 19 1 13.74 5.07 -13.60 -4.77 0.138 0.30 + 24 19 20 1 2.56 0.82 -2.56 -0.81 0.002 0.01 + 25 10 20 0 0.00 0.00 0.00 0.00 0.000 0.00 + 26 10 17 0 0.00 0.00 0.00 0.00 0.000 0.00 + 27 10 21 1 0.76 -3.77 -0.75 3.78 0.004 0.01 + 28 10 220 1 -0.04 -2.55 0.04 2.56 0.005 0.01 + 29 21 220 1 -2.64 -5.95 2.64 5.96 0.004 0.01 + 30 15 23 1 -12.33 6.41 12.52 -6.02 0.193 0.39 + 31 220 24 1 18.91 -2.08 -18.47 2.73 0.434 0.65 + 32 23 24 1 -15.64 15.01 16.25 -13.74 0.611 1.27 + 33 24 25 1 -7.89 3.26 8.04 -3.01 0.144 0.25 + 34 25 26 1 4.13 2.77 -4.07 -2.67 0.064 0.10 + 35 25 27 1 -12.17 0.24 12.34 0.08 0.167 0.32 + 36 28 27 1 -1.45 -2.73 1.45 2.77 0.000 0.04 + 37 27 29 1 6.22 -1.78 -6.12 1.95 0.092 0.18 + 38 27 30 1 6.91 -3.45 -6.72 3.81 0.191 0.36 + 39 29 30 1 3.33 -3.00 -3.28 3.09 0.049 0.09 + 40 8 28 1 -2.18 -3.44 2.19 1.52 0.007 0.02 + 41 6 28 1 0.74 -2.19 -0.74 1.21 0.001 0.00 + -------- -------- + Total: 6.892 21.99 ================================================================================ | Fixed Shunt Data | diff --git a/lib/t/t_mpxt_reserves.m b/lib/t/t_mpxt_reserves.m index b5cb16b1..7b54a7bb 100644 --- a/lib/t/t_mpxt_reserves.m +++ b/lib/t/t_mpxt_reserves.m @@ -46,6 +46,10 @@ function t_mpxt_reserves(quiet) mpopt = mpoption(mpopt, 'out.lim.all', 2); % mpopt = mpoption(mpopt, 'out.lim.all', -1, 'out.sys_sum', 0, 'out.bus', 0, 'out.branch', 0, 'out.gen', 1, 'out.lim.v', 0, 'out.lim.pg', 0, 'out.lim.qg', 0, 'out.lim.line', 0); mpopt.out.load = 0; mpopt.out.shunt = 0; mpopt.out.lim.elm.reserve_gen = 2; +reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... + {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... + 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; + %% define named indices into data matrices [GEN_BUS, PG, QG, QMAX, QMIN, VG, MBASE, GEN_STATUS, PMAX, PMIN, ... MU_PMAX, MU_PMIN, MU_QMAX, MU_QMIN, PC1, PC2, QC1MIN, QC1MAX, ... @@ -69,9 +73,6 @@ function t_mpxt_reserves(quiet) t_is(rg.cost, mpc.reserves.cost, 12, [t 'cost']); t_is(rg.qty, mpc.reserves.qty, 12, [t 'qty']); t_is(sum(rg.total_cost), 177.8047, 4, [t 'totalcost']); -reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... - {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, [t 'pretty printing'], reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -102,9 +103,6 @@ function t_mpxt_reserves(quiet) t_is(rg.cost, mpc.reserves.cost, 12, [t 'cost']); t_is(rg.qty, mpc.reserves.qty, 12, [t 'qty']); t_is(sum(rg.total_cost), 187.5, 4, [t 'totalcost']); -reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... - {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, [t 'pretty printing'], reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -164,9 +162,6 @@ function t_mpxt_reserves(quiet) t_is(rg.cost, mpc.reserves.cost, 12, [t 'cost']); t_is(rg.qty, mpc.reserves.qty, 12, [t 'qty']); t_is(sum(rg.total_cost), 187.5, 4, [t 'totalcost']); -reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... - {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, [t 'pretty printing'], reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -210,9 +205,6 @@ function t_mpxt_reserves(quiet) t_is(rg.mu_pg_ub, [0; 0; 0; 0; 0.5; 0], 7, [t 'mu.Pmax']); t_is(rg.cost, mpc.reserves.cost, 12, [t 'cost']); t_is(sum(rg.total_cost), 177.8047, 4, [t 'totalcost']); -reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... - {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, [t 'pretty printing'], reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -241,9 +233,6 @@ function t_mpxt_reserves(quiet) t_is(rg.cost, mpc.reserves.cost, 12, [t 'cost']); t_is(rg.qty, mpc.reserves.qty, 12, [t 'qty']); t_is(sum(rg.total_cost), 177.5, 4, [t 'totalcost']); -reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... - {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, [t 'pretty printing'], reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail diff --git a/lib/t/t_pretty_print.m b/lib/t/t_pretty_print.m index 3dae8786..59c8f6d6 100644 --- a/lib/t/t_pretty_print.m +++ b/lib/t/t_pretty_print.m @@ -48,6 +48,10 @@ function t_pretty_print(quiet) mpopt = mpoption(mpopt, 'out.gen', 1); mpopt = mpoption(mpopt, 'out.lim.all', 2); +reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... + {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... + 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; + casefile = 'case9'; t = sprintf('run_pf(''%s'')', casefile); @@ -56,8 +60,6 @@ function t_pretty_print(quiet) fname_e = fullfile(pathstr, 'pretty-printing', sprintf('%s.txt', fname)); fname_g = sprintf('%s_%d.txt', fname, rn); task = run_pf(casefile, mpopt, 'print_fname', fname_g); -reps = { {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, t, reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -73,8 +75,6 @@ function t_pretty_print(quiet) fname_e = fullfile(pathstr, 'pretty-printing', sprintf('%s.txt', fname)); fname_g = sprintf('%s_%d.txt', fname, rn); task = run_cpf({casefile, [casefile 'target']}, mpopt, 'print_fname', fname_g); -reps = { {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, t, reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -90,8 +90,6 @@ function t_pretty_print(quiet) fname_e = fullfile(pathstr, 'pretty-printing', sprintf('%s.txt', fname)); fname_g = sprintf('%s_%d.txt', fname, rn); task = run_opf(casefile, mpopt, 'print_fname', fname_g); -reps = { {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, t, reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -113,8 +111,6 @@ function t_pretty_print(quiet) fname_e = fullfile(pathstr, 'pretty-printing', sprintf('%s.txt', fname)); fname_g = sprintf('%s_%d.txt', fname, rn); task = run_pf(mpc, mpopt, 'print_fname', fname_g); -reps = { {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, t, reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -130,9 +126,6 @@ function t_pretty_print(quiet) fname_e = fullfile(pathstr, 'pretty-printing', sprintf('%s.txt', fname)); fname_g = sprintf('%s_%d.txt', fname, rn); task = run_opf(mpc, mpoption(mpopt, 'out.lim.all', 1), 'print_fname', fname_g); -reps = { {' -(0.0+) ', ' $1 ', 1, 1}, ... - {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, t, reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -150,8 +143,6 @@ function t_pretty_print(quiet) fname_e = fullfile(pathstr, 'pretty-printing', sprintf('%s.txt', fname)); fname_g = sprintf('%s_%d.txt', fname, rn); task = run_pf(casefile, mpopt, 'print_fname', fname_g, 'mpx', mp.xt_3p()); -reps = { {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, t, reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail @@ -170,8 +161,6 @@ function t_pretty_print(quiet) fname_g = sprintf('%s_%d.txt', fname, rn); mpopt.exp.mpx = mp.xt_3p(); task = run_opf(casefile, mpopt, 'print_fname', fname_g); -reps = { {'in (.*) seconds \((.*) setup \+ (.*) solve\)', ... - 'in 0.00 seconds (0.00 setup + 0.00 solve)', 1, 1} }; if ~t_file_match(fname_g, fname_e, t, reps, 1); fprintf(' compare these 2 files:\n %s\n %s\n', fname_g, fname_e); if show_diff_on_fail