Skip to content

Commit

Permalink
Minor fix for most_summary() in cases where mdo.results does not have…
Browse files Browse the repository at this point in the history
… a Rrp field.
  • Loading branch information
rdzman committed Sep 12, 2024
1 parent 3ceef53 commit 47f98b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/MOST-manual/MOST-manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions lib/most_summary.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/mostver.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 47f98b7

Please sign in to comment.