Skip to content

Commit 47f98b7

Browse files
committed
Minor fix for most_summary() in cases where mdo.results does not have a Rrp field.
1 parent 3ceef53 commit 47f98b7

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Change history for MOST
55
since 1.3
66
---------
77

8+
#### 9/12/24
9+
- Fix issue with `most_summary()` when ramp results are missing.
10+
811
#### 5/29/24
912
- Fix [issue #45][12] where `most()` does not properly handle cases with
1013
contingencies defined only in some periods/scenarios.

docs/src/MOST-manual/MOST-manual.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3475,7 +3475,7 @@ \subsubsection*{Bugs Fixed}
34753475
\begin{itemize}
34763476
\item Fix issue \#45 where \code{most()} does not properly handle cases with contingencies defined only in some periods/scenarios.
34773477
\emph{Thanks to Stefano Nicolin.}
3478-
\item
3478+
\item Fix issue with \code{most\_summary()} when ramp results are missing.
34793479
\end{itemize}
34803480

34813481
\subsubsection*{Incompatible Changes}

lib/most_summary.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
psi = NaN(nt, nj_max, nc_max+1);
7979
Pg = NaN(ng, nt, nj_max, nc_max+1);
8080
Pd = NaN(nb, nt, nj_max, nc_max+1);
81-
if mdo.idx.ntramp
81+
if mdo.idx.ntramp && isfield(mdo.results, 'Rrp')
8282
Rup = mdo.results.Rrp;
8383
Rdn = mdo.results.Rrm;
8484
else
@@ -162,7 +162,7 @@
162162
fprintf('\n');
163163

164164
print_most_summary_section('PG', 'Gen', nt, nj_max, nc, Pg);
165-
if mdo.idx.ntramp
165+
if mdo.idx.ntramp && isfield(mdo.results, 'Rrp')
166166
print_most_summary_section('RAMP UP', 'Gen', nt, 1, 0, Rup);
167167
print_most_summary_section('RAMP DOWN', 'Gen', nt, 1, 0, Rdn);
168168
end

lib/mostver.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
v = struct( 'Name', 'MOST', ...
2727
'Version', '1.3.1-dev', ...
2828
'Release', '', ...
29-
'Date', '29-May-2024' );
29+
'Date', '12-Sep-2024' );
3030
if nargout > 0
3131
if nargin > 0
3232
rv = v;

0 commit comments

Comments
 (0)