From 47f98b730d94473af12b24a217b9328afaf70201 Mon Sep 17 00:00:00 2001 From: Ray Zimmerman Date: Thu, 12 Sep 2024 14:32:23 -0600 Subject: [PATCH] Minor fix for most_summary() in cases where mdo.results does not have a Rrp field. --- CHANGES.md | 3 +++ docs/src/MOST-manual/MOST-manual.tex | 2 +- lib/most_summary.m | 4 ++-- lib/mostver.m | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3fef4a8..6d3a386 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,9 @@ Change history for MOST since 1.3 --------- +#### 9/12/24 + - Fix issue with `most_summary()` when ramp results are missing. + #### 5/29/24 - Fix [issue #45][12] where `most()` does not properly handle cases with contingencies defined only in some periods/scenarios. diff --git a/docs/src/MOST-manual/MOST-manual.tex b/docs/src/MOST-manual/MOST-manual.tex index 3c337e0..d225c2b 100644 --- a/docs/src/MOST-manual/MOST-manual.tex +++ b/docs/src/MOST-manual/MOST-manual.tex @@ -3475,7 +3475,7 @@ \subsubsection*{Bugs Fixed} \begin{itemize} \item Fix issue \#45 where \code{most()} does not properly handle cases with contingencies defined only in some periods/scenarios. \emph{Thanks to Stefano Nicolin.} -\item +\item Fix issue with \code{most\_summary()} when ramp results are missing. \end{itemize} \subsubsection*{Incompatible Changes} diff --git a/lib/most_summary.m b/lib/most_summary.m index 804b26f..f91eace 100644 --- a/lib/most_summary.m +++ b/lib/most_summary.m @@ -78,7 +78,7 @@ psi = NaN(nt, nj_max, nc_max+1); Pg = NaN(ng, nt, nj_max, nc_max+1); Pd = NaN(nb, nt, nj_max, nc_max+1); -if mdo.idx.ntramp +if mdo.idx.ntramp && isfield(mdo.results, 'Rrp') Rup = mdo.results.Rrp; Rdn = mdo.results.Rrm; else @@ -162,7 +162,7 @@ fprintf('\n'); print_most_summary_section('PG', 'Gen', nt, nj_max, nc, Pg); - if mdo.idx.ntramp + if mdo.idx.ntramp && isfield(mdo.results, 'Rrp') print_most_summary_section('RAMP UP', 'Gen', nt, 1, 0, Rup); print_most_summary_section('RAMP DOWN', 'Gen', nt, 1, 0, Rdn); end diff --git a/lib/mostver.m b/lib/mostver.m index 22aa9b9..d77291b 100644 --- a/lib/mostver.m +++ b/lib/mostver.m @@ -26,7 +26,7 @@ v = struct( 'Name', 'MOST', ... 'Version', '1.3.1-dev', ... 'Release', '', ... - 'Date', '29-May-2024' ); + 'Date', '12-Sep-2024' ); if nargout > 0 if nargin > 0 rv = v;