Skip to content

Commit e84f677

Browse files
committed
Move examples from lib/t to their own examples directory.
1 parent 359e7e0 commit e84f677

12 files changed

Lines changed: 33 additions & 20 deletions

File tree

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
echo "MPTEST_PATH=$HOME/mptest/lib:$HOME/mptest/lib/t" >> $GITHUB_ENV
5151
5252
- name: Set MIPS_PATH
53-
run: echo "MIPS_PATH=${GITHUB_WORKSPACE}/lib:${GITHUB_WORKSPACE}/lib/t:${MPTEST_PATH}" >> $GITHUB_ENV
53+
run: echo "MIPS_PATH=${GITHUB_WORKSPACE}/lib:${GITHUB_WORKSPACE}/lib/t:${GITHUB_WORKSPACE}/examples:${MPTEST_PATH}" >> $GITHUB_ENV
5454

5555
- name: Test MP-Test
5656
run: env $ML_PATHVAR=$MPTEST_PATH $ML_CMD "mptestver; test_mptest(0,1)"

CHANGES.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ Change history for MIPS
22
=======================
33

44

5-
Version 1.5.2 - *July 5, 2025*
6-
------------------------------
5+
Version 1.5.2 - *July 12, 2025*
6+
-------------------------------
77

8-
#### 5/10/24
8+
#### 5/12/24
99
- Release 1.5.2.
10+
- Move examples `mips_example1.m` and `mips_example2.m` from `lib/t`
11+
to their own `examples` directory.
12+
13+
#### 5/10/24
1014
- Add feature detection function `have_feature_mips()`, providing
1115
implementation of `'mips'` tag for `have_feature()`.
1216

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ of MATLAB or Octave, including setting up your MATLAB/Octave path.
3636
2. Add the following directories to your MATLAB or Octave path:
3737
* `<MIPS>/lib`
3838
* `<MIPS>/lib/t`
39+
* `<MIPS>/examples`
3940

4041
3. At the MATLAB/Octave prompt, type `test_mips` to run the test suite and
4142
verify that MIPS is properly installed and functioning. The result

docs/other/MIPS-Release-Checklist.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Pre-release
4040
- Make updates for current version specific citations:
4141
- version number (3 places)
4242
- year
43-
- latest version DOI, current is: 10.5281/zenodo.11176870
43+
- latest version DOI, current is: 10.5281/zenodo.15815754
4444
- (update here each time)
4545
... in the following places ...
4646
- CITATION file
@@ -53,6 +53,10 @@ Pre-release
5353
- search citations in all other projects being updated simultaneously
5454
- MATPOWER-manual.tex
5555
- MP-Opt-Model-manual.tex
56+
- search everywhere for 10.5281/zenodo.3236519 and update year (MATPOWER User's Manual)
57+
- User's Manual
58+
- search everywhere for 10.5281/zenodo.3236535 and update year (MATPOWER Software)
59+
- User's Manual
5660
- Create `MIPS-manual.pdf` from `MIPS-manual.tex` and move to `docs`.
5761
- Add release notice with date and version in `CHANGES.md`.
5862
- Commit all changes to `prep-for-release`.
@@ -78,7 +82,7 @@ Pre-release
7882
Release
7983
-------
8084
- Merge latest `prep-for-release` into `master`.
81-
- Tag with version number, e.g. `1.5`.
85+
- Tag with version number, e.g. `1.5.2`.
8286
- Push `master` to GitHub.
8387
- Publish new release on GitHub: https://github.com/MATPOWER/mips/releases/new
8488
- use (possibly shortened) contents of `docs/relnotes/MIPS-Release-Notes-#.#.md`

docs/sphinx/source/functions/mips_example1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. currentmodule:: mips
22

3-
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mips/blob/master/lib/t/mips_example1.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
3+
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mips/blob/master/examples/mips_example1.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
44

55
mips_example1
66
-------------

docs/sphinx/source/functions/mips_example2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. currentmodule:: mips
22

3-
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mips/blob/master/lib/t/mips_example2.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
3+
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mips/blob/master/examples/mips_example2.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
44

55
mips_example2
66
-------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../../../lib/t/mips_example1.m
1+
../../../../../examples/mips_example1.m
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../../../lib/t/mips_example2.m
1+
../../../../../examples/mips_example2.m

docs/src/MIPS-manual/MIPS-manual.tex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ \subsection{Installation}
392392
\begin{itemize}
393393
\item \mipspath{/lib} -- core \mips{} functions
394394
\item \mipspath{/lib/t} -- test scripts for \mips{}
395+
\item \mipspath{/examples} -- \mips{} examples
395396
\end{itemize}
396397
\item At the \matlab{}/Octave prompt, type \code{test\_mips} to run the test suite and verify that \mips{} is properly installed and functioning.\footnote{The tests require a functioning installation of \mptestlink{}.} The result should resemble the following:
397398
%\clearpage
@@ -586,7 +587,7 @@ \section{\mips{} -- \mipsname{}}
586587
\subsection{Example 1}
587588
\label{sec:ex1}
588589

589-
The following code, included as \code{mips\_example1.m} in \mipspath{lib/t}, shows a simple example of using \code{mips} to solve a 2-dimensional unconstrained optimization of Rosenbrock's ``banana'' function\footnote{\url{https://en.wikipedia.org/wiki/Rosenbrock_function}}
590+
The following code, included as \code{mips\_example1.m} in \mipspath{examples}, shows a simple example of using \code{mips} to solve a 2-dimensional unconstrained optimization of Rosenbrock's ``banana'' function\footnote{\url{https://en.wikipedia.org/wiki/Rosenbrock_function}}
590591
\begin{equation}
591592
f(x) = 100 (x_2-x_1^2)^2+(1-x_1)^2.
592593
\end{equation}
@@ -707,7 +708,7 @@ \subsection{Example 2}
707708
0
708709
0.707107
709710
\end{Code}
710-
This example can be found in \code{mips\_example2.m}. More example problems for \code{mips} can be found in \code{t\_mips.m}, both in \mipspath{lib/t}.
711+
This example can be found in \code{mips\_example2.m} in \mipspath{examples}. More example problems for \code{mips} can be found in \code{t\_mips.m} in \mipspath{lib/t}.
711712

712713
\subsection{Primal-Dual Interior Point Algorithm}
713714

@@ -1093,6 +1094,9 @@ \section{\mips{} Files and Functions}
10931094
\code{~~MIPS-manual.pdf} & \mipsman{} \\
10941095
\code{~~src/MIPS-manual/} & \\
10951096
\code{~~~~MIPS-manual.tex} & LaTeX source for \mips{} User's Manual \\
1097+
\code{examples/} & \\
1098+
\code{~~~~mips\_example1} & implements example 1 from \mips{} User's Manual \\
1099+
\code{~~~~mips\_example2} & implements example 2 from \mips{} User's Manual \\
10961100
\code{lib/} & \\
10971101
\code{~~have\_feature\_lu\_vec}\tnote{*} & support for \code{lu(..., \textquotesingle{}vector\textquotesingle{})} syntax \\
10981102
\code{~~have\_feature\_pardiso\_legacy}\tnote{*} & \pardiso{} v5, individual MEX files for factor, solve, etc. \\
@@ -1103,8 +1107,6 @@ \section{\mips{} Files and Functions}
11031107
\code{~~mplinsolve} & common linear system solver interface, used by \mips{} \\
11041108
\code{~~qps\_mips} & common QP/LP solver interface to \mips{}-based solver \\
11051109
\code{~~t/} & \\
1106-
\code{~~~~mips\_example1} & implements example 1 from \mips{} User's Manual \\
1107-
\code{~~~~mips\_example2} & implements example 2 from \mips{} User's Manual \\
11081110
\code{~~~~test\_mips} & runs full \mips{} test suite \\
11091111
\code{~~~~t\_mips} & runs tests for \mips{} NLP solver \\
11101112
\code{~~~~t\_mips\_pardiso} & runs tests for \mips{} NLP solver, using PARDISO as linear solver\tnote{\dag} \\
@@ -1413,7 +1415,7 @@ \subsubsection*{New Features}
14131415
\doi{10.1109/TPWRS.2010.2051168}
14141416

14151417
\bibitem{matpower}
1416-
R.~D. Zimmerman, C.~E. Murillo-S{\'a}nchez (2024). \matpower{}\\~
1418+
R.~D. Zimmerman, C.~E. Murillo-S{\'a}nchez (2025). \matpower{}\\~
14171419
[Software]. Available: \url{https://matpower.org}\\
14181420
\doi{10.5281/zenodo.3236535}
14191421

0 commit comments

Comments
 (0)