<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://tmigot.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://tmigot.github.io/" rel="alternate" type="text/html" /><updated>2024-11-24T14:25:57-08:00</updated><id>https://tmigot.github.io/feed.xml</id><title type="html">Tangi Migot</title><subtitle>personal description</subtitle><author><name>Tangi Migot</name></author><entry><title type="html">Presenting at JuMP-dev 2024 and Publishing in JuliaCon 2023 Proceedings</title><link href="https://tmigot.github.io/posts/2024/08/talk/" rel="alternate" type="text/html" title="Presenting at JuMP-dev 2024 and Publishing in JuliaCon 2023 Proceedings" /><published>2024-08-30T00:00:00-07:00</published><updated>2024-08-30T00:00:00-07:00</updated><id>https://tmigot.github.io/posts/2024/08/jump-dev</id><content type="html" xml:base="https://tmigot.github.io/posts/2024/08/talk/"><![CDATA[<p>I’m thrilled to share two major milestones in my recent work within the Julia ecosystem.
First, I presented the latest developments in optimization solvers at JuMP-dev 2024, and second, my paper on <a href="https://proceedings.juliacon.org/papers/10.21105/jcon.00161">JSOSuite.jl</a> was accepted in <em>The Proceedings of the JuliaCon Conferences</em>.</p>

<p>These two achievements highlight both the ongoing evolution of JuliaSmoothOptimizers (JSO) and its growing impact on large-scale nonlinear optimization problems.</p>

<p>JuMP-dev 2024: Advancing Nonlinear Optimization with JuliaSmoothOptimizers</p>

<p>This year’s <a href="https://jump.dev/meetings/jumpdev2024/">JuMP-dev workshop</a>, held independently from JuliaCon for the first time in Montreal, offered a focused platform for deep dives into JuMP and its surrounding tools.
In my presentation, I discussed the latest progress within the JuliaSmoothOptimizers (JSO) ecosystem, <a href="https://jump.dev/assets/jump-dev-workshops/2024/migot.pdf">my slides</a> and the <a href="https://youtu.be/2k011GiOeQc">replay</a>.</p>

<p>At the core of my talk was an introduction to new solvers and packages like <a href="https://github.com/JuliaSmoothOptimizers/AdaptiveRegularization.jl/">AdaptiveRegularization.jl</a>, which address the unique challenges of large-scale optimization problems with Adaptive Regularization with Cubics.
I emphasized the following key innovations:</p>

<ul>
  <li>Automatic Differentiation (AD) support and integration with JuMP for easier problem modeling.</li>
  <li>Memory pre-allocation for in-place solvers, reducing runtime overhead.</li>
  <li>Support for multi-precision solvers and GPU-based computations, essential for modern large-scale applications.</li>
  <li>The value of factorization-free solvers, which excel in tackling large, complex problems, such as those in discretized PDE-constrained optimization.</li>
</ul>

<p>For newcomers to JSO, <a href="https://github.com/JuliaSmoothOptimizers/JSOSuite.jl/">JSOSuite.jl</a> serves as a critical entry point, simplifying solver selection and benchmarking through automatic algorithm matching.
This tool eliminates the complexity of choosing from multiple solvers by providing a user-friendly interface that adapts to the problem at hand.
My talk also touched on the broader adoption and longevity of JSO, which now spans over 50 registered packages, making it one of the most comprehensive platforms for numerical optimization.</p>

<p>JuliaCon 2023: JSOSuite.jl – Simplifying Continuous Optimization</p>

<p>While JuMP-dev 2024 focused on recent developments, my publication in <em>The Proceedings of the JuliaCon Conferences</em> looks at the core philosophy and implementation behind <a href="https://github.com/JuliaSmoothOptimizers/JSOSuite.jl/">JSOSuite.jl</a>.
Titled <a href="https://proceedings.juliacon.org/papers/10.21105/jcon.00161">JSOSuite.jl: Solving Continuous Optimization Problems with JuliaSmoothOptimizers</a>, the paper introduces <a href="https://github.com/JuliaSmoothOptimizers/JSOSuite.jl/">JSOSuite.jl</a> as a package designed to bring ease-of-use to complex optimization challenges.</p>

<p>JSOSuite.jl covers a range of problem types—from unconstrained to generally-constrained and least-squares problems—and eliminates the need for users to understand the intricate details of individual solvers.
Instead, the package conducts a preliminary analysis of the problem and automatically selects the most appropriate solver, offering significant advantages to both experienced practitioners and newcomers alike.</p>

<p>This paper builds on the innovations within JSO, reinforcing its versatility and ease of use across various fields and applications.
The package is a natural fit for researchers who need efficient, reliable solvers without the overhead of manually configuring them for different problem types.</p>

<p>Looking Forward</p>

<p>Both my presentation at JuMP-dev 2024 and the publication of the <a href="https://github.com/JuliaSmoothOptimizers/JSOSuite.jl/">JSOSuite.jl</a> paper reflect the significant strides made by the JuliaSmoothOptimizers organization over the past year.
The JSO ecosystem is positioned to continue driving innovation in the field of numerical optimization.</p>

<p>I’m excited to see how these advancements will be applied across diverse optimization problems in the coming years and look forward to continuing this journey with the JSO community.</p>]]></content><author><name>Tangi Migot</name></author><category term="programming" /><category term="Julia" /><category term="optimization" /><category term="conference" /><category term="publication" /><category term="talk" /><summary type="html"><![CDATA[I’m thrilled to share two major milestones in my recent work within the Julia ecosystem. First, I presented the latest developments in optimization solvers at JuMP-dev 2024, and second, my paper on JSOSuite.jl was accepted in The Proceedings of the JuliaCon Conferences. These two achievements highlight both the ongoing evolution of JuliaSmoothOptimizers (JSO) and its growing impact on large-scale nonlinear optimization problems. JuMP-dev 2024: Advancing Nonlinear Optimization with JuliaSmoothOptimizers This year’s JuMP-dev workshop, held independently from JuliaCon for the first time in Montreal, offered a focused platform for deep dives into JuMP and its surrounding tools. In my presentation, I discussed the latest progress within the JuliaSmoothOptimizers (JSO) ecosystem, my slides and the replay. At the core of my talk was an introduction to new solvers and packages like AdaptiveRegularization.jl, which address the unique challenges of large-scale optimization problems with Adaptive Regularization with Cubics. I emphasized the following key innovations: Automatic Differentiation (AD) support and integration with JuMP for easier problem modeling. Memory pre-allocation for in-place solvers, reducing runtime overhead. Support for multi-precision solvers and GPU-based computations, essential for modern large-scale applications. The value of factorization-free solvers, which excel in tackling large, complex problems, such as those in discretized PDE-constrained optimization. For newcomers to JSO, JSOSuite.jl serves as a critical entry point, simplifying solver selection and benchmarking through automatic algorithm matching. This tool eliminates the complexity of choosing from multiple solvers by providing a user-friendly interface that adapts to the problem at hand. My talk also touched on the broader adoption and longevity of JSO, which now spans over 50 registered packages, making it one of the most comprehensive platforms for numerical optimization. JuliaCon 2023: JSOSuite.jl – Simplifying Continuous Optimization While JuMP-dev 2024 focused on recent developments, my publication in The Proceedings of the JuliaCon Conferences looks at the core philosophy and implementation behind JSOSuite.jl. Titled JSOSuite.jl: Solving Continuous Optimization Problems with JuliaSmoothOptimizers, the paper introduces JSOSuite.jl as a package designed to bring ease-of-use to complex optimization challenges. JSOSuite.jl covers a range of problem types—from unconstrained to generally-constrained and least-squares problems—and eliminates the need for users to understand the intricate details of individual solvers. Instead, the package conducts a preliminary analysis of the problem and automatically selects the most appropriate solver, offering significant advantages to both experienced practitioners and newcomers alike. This paper builds on the innovations within JSO, reinforcing its versatility and ease of use across various fields and applications. The package is a natural fit for researchers who need efficient, reliable solvers without the overhead of manually configuring them for different problem types. Looking Forward Both my presentation at JuMP-dev 2024 and the publication of the JSOSuite.jl paper reflect the significant strides made by the JuliaSmoothOptimizers organization over the past year. The JSO ecosystem is positioned to continue driving innovation in the field of numerical optimization. I’m excited to see how these advancements will be applied across diverse optimization problems in the coming years and look forward to continuing this journey with the JSO community.]]></summary></entry><entry><title type="html">New Preprint on HAL: Exploring Projected Dynamical Systems in Geochemical Reactions</title><link href="https://tmigot.github.io/posts/2024/07/publis/" rel="alternate" type="text/html" title="New Preprint on HAL: Exploring Projected Dynamical Systems in Geochemical Reactions" /><published>2024-07-05T00:00:00-07:00</published><updated>2024-07-05T00:00:00-07:00</updated><id>https://tmigot.github.io/posts/2024/07/geochemistry-PDS</id><content type="html" xml:base="https://tmigot.github.io/posts/2024/07/publis/"><![CDATA[<p>This project holds a special place in my heart as it touches on the very applications in geochemistry that first drew me into research.
Equilibrium reactions, particularly in slow processes like the water cycle in aquifers, have always fascinated me.
Moreover, this paper represents an important milestone for one of the authors, Bastien, as it was part of his Ph.D. thesis.
The use of projected dynamical systems, a model I am particularly fond of, adds an additional layer of personal significance to this work.</p>

<p>We added a preprint to the HAL open-access repository, <a href="https://inria.hal.science/hal-04631094">A projected dynamical system approach to mineral precipitation-dissolution reactions in geochemistry</a>. We delve into a novel approach to modeling kinetically-controlled precipitation-dissolution geochemical reactions.
This paper presents a new model that extends the use of ordinary differential equations (ODEs) to accommodate the complexities of non-smoothness induced by full dissolution and the overlapping nature of reactions and minerals.</p>

<p>The model we developed is a specific type of projected dynamical system.
It accounts for the complexities of reactions involving multiple minerals and the participation of a single mineral in several reactions.</p>

<p><img src="/images/PDS.png" alt="Modified Projected Dynamical System" /></p>

<p>Projected dynamical systems are a type of non-smooth differential equation, where the derivative of $x$ follows a dynamic that is projected onto the tangent cone of a convex set (denoted here as $C_0$​).
This approach is commonly used to model ODEs that need to satisfy certain constraints.
In this particular model, we also incorporate an additional proportionality constraint on the derivative of $x$.</p>

<p>We employed a discretization of the system using an explicit scheme, proving the existence of a solution and the convergence of the approximate solution.</p>

<p><img src="/images/PDS-example.png" alt="Illustration on two reactions with an aqueous species and two minerals" /></p>

<p>While the code for this paper is not included in the preprint, it is available upon request. This decision was made to ensure that interested readers can access the tools necessary to replicate and build upon our work.</p>

<p>Projected dynamical systems offer exciting new possibilities for modeling complex geochemical reactions. 
Our work is just one example of how these models can be applied to address long-standing challenges in the field.
I look forward to seeing how this approach evolves and hope it inspires further exploration in both research and practical applications.</p>]]></content><author><name>Tangi Migot</name></author><category term="publications" /><category term="projected dynamical systems" /><category term="equilibrium problem" /><category term="kinetics reactions" /><summary type="html"><![CDATA[This project holds a special place in my heart as it touches on the very applications in geochemistry that first drew me into research. Equilibrium reactions, particularly in slow processes like the water cycle in aquifers, have always fascinated me. Moreover, this paper represents an important milestone for one of the authors, Bastien, as it was part of his Ph.D. thesis. The use of projected dynamical systems, a model I am particularly fond of, adds an additional layer of personal significance to this work.]]></summary></entry><entry><title type="html">Performance Profile Benchmarking Tool</title><link href="https://tmigot.github.io/posts/2024/06/teaching/" rel="alternate" type="text/html" title="Performance Profile Benchmarking Tool" /><published>2024-06-25T00:00:00-07:00</published><updated>2024-06-25T00:00:00-07:00</updated><id>https://tmigot.github.io/posts/2024/06/perfprofile</id><content type="html" xml:base="https://tmigot.github.io/posts/2024/06/teaching/"><![CDATA[<p>The Dolan-More Performance Profile is a method used for comparing the performance of algorithms.</p>

<p>It was popularized by Elizabeth Dolan and Jorge More in their paper titled “Benchmarking Optimization Software with Performance Profiles” (Mathematical Programming, 2002).
The performance profile is a way to summarize and visualize the performance of different algorithms across multiple problem instances.
It is very much used in the field of mathematical optimization with nearly 5,000 citations of <a href="https://dx.doi.org/10.1007/s101070100263">Dolan &amp; Moré, 2002</a> listed on Google Scholar at the time of writing.</p>

<p>While the method is often associated with Dolan and More, it’s essential to acknowledge the historical roots of performance ratio usage, dating back to at least 1996 with the work of <a href="https://dx.doi.org/10.1109/9.539425">André L. Tits and Yaguang Yang</a>. This historical context highlights the method’s evolution and widespread adoption over the years.</p>

<p>The primary purpose of a performance profile is to assess and compare the effectiveness of a group of solvers on a defined test collection, utilizing a chosen metric or cost.
This assessment is shown in a graph that displays the cumulative distribution function of a performance ratio for each algorithm on every problem instance.</p>

<h2 id="how-it-works">How It Works</h2>

<p>While traditional benchmarking efforts often involve extensive tables displaying solver performance on various metrics, they face inherent challenges.
The sheer volume of data in tables becomes overwhelming, especially for large test sets, and the interpretation of results from these tables frequently leads to disagreements.</p>

<p>The advantage of using performance ratios lies in their ability to offer insights into the percent improvement of a solver’s metric compared to the best solver, while mitigating the impact of a small subset of problems to dominate the conclusions.</p>

<p>To understand how the performance profile works, let’s break down the process.
Benchmarks are generated by running a set of solvers ($S$) on a set of problems ($P$), measuring a chosen metric (e.g., CPU time) $t_{p,s}$ for each solvers $s \in S$ applied to problems $p \in P$.
It is essential to note that the selected cost metric must be a positive value, where smaller values indicate better performance.</p>

<p>The <em>performance ratio</em> $r_{p,s}$ of solver $s \in S$ on problem $p \in P$ is defined as the ratio of the solver’s metric to the minimum metric among all solvers for that problem, in other words:
\(r_{p,s} := \frac{t_{p,s}}{\min_{s \in S} t_{p,s}}\)
where $t_{p,s}$ is the value of the chosen metric of solver $s$ on problem $p$, e.g., the CPU time for solver $s$ to solve the problem $p$.
Note that the ratio $r_{p,s}$ is greater or equal to $1$.
If the chosen metric is possibly 0 then the denominator should be shifted by a small value.</p>

<p>When the solver fails to solve a problem and triggers an alternative stopping criterion, such as reaching a maximum time or iteration limit, we assign a penalty value, usually $+\infty$.</p>

<p>The performance profile is then defined via the cumulative distribution
function for the performance ratio $\rho_s:\mathbb{R} \rightarrow [0,1]$ such as
\(\rho_{s}(\tau) := \frac{1}{n_p} \sum_{p \in P} 1_{r_{p,s} \leq \tau},\)
where $n_p$ is the number of problems, and $1_X$ is the indicator function.</p>

<p>In words, it means the quantities $\rho_s(\tau)$ represents the percentage of problems that, for solver $s \in S$, a performance ratio $r_{p,s}$ is within a factor $\tau$ of the best possible ratio across all problems.</p>

<p>Note that by definition $\rho_s(\tau)$ is always between 0 and 1 and offers valuable insights:</p>
<ul>
  <li>The values $\rho_s(1)$ gives the percentage of problems where solver $s$ achieved the best ratio.
Note that the sum of these percentages across all solvers may exceed 100% in the case of ties.</li>
  <li>The function $\tau \rightarrow \rho_{s}(\tau)$ is a non-decreasing function.</li>
  <li>All solvers should attain a performance ratio of $1$ for $\tau$ sufficiently large unless some of the problems were not solved. In other words, all the solvers will reach a “plateau” representing the percentage of problems solved.</li>
</ul>

<h2 id="advantages">Advantages</h2>

<ul>
  <li><strong>Comprehensive Comparison:</strong>
The performance profile offers a comprehensive way to compare the performance of multiple algorithms across a diverse set of instances.</li>
  <li><strong>Visual Representation:</strong>
The graphical representation of the performance profile is easy to interpret. Researchers can quickly identify which algorithms are more competitive by examining the shape and position of the cumulative distribution functions.</li>
  <li><strong>Instance-Specific Assessment:</strong>
By considering the performance ratio on a per-instance basis, the performance profile allows to identify algorithms that consistently perform well across a range of problem instances. This is especially important in optimization, where the characteristics of instances can vary widely.</li>
  <li><strong>Robustness Analysis:</strong>
The profile is useful for assessing the robustness of algorithms. Algorithms that exhibit consistent good performance across a variety of instances will have performance profiles concentrated towards the left, indicating reliability. In <a href="https://dx.doi.org/10.1007/s101070100263">Dolan &amp; Moré, 2002</a>, the authors justify that performance profiles are relatively insensitive to changes in results on a small number of problems and that they are also largely unaffected by small changes in results over many problems.</li>
  <li><strong>No Need for Aggregation:</strong>
Unlike some other performance metrics that require aggregating results over instances, the performance profile considers the performance of algorithms on each instance individually, providing a more nuanced evaluation.</li>
  <li><strong>Instance-Specific Insights:</strong>
Researchers can gain insights into the types of instances where certain algorithms excel or struggle, helping to identify algorithmic strengths and weaknesses in specific problem scenarios.</li>
</ul>

<h2 id="disadvantages">Disadvantages</h2>

<ul>
  <li><strong>Dependency on Problem Instances:</strong>
The performance profile is sensitive to the choice of problem instances. Including a diverse set of instances is crucial, and the results can be influenced by the selection of these instances.</li>
  <li><strong>Metric Sensitivity:</strong>
The performance profile is based on performance ratios, and the choice of the performance measure can impact the results. Sensitivity to the choice of the objective function or metric is a consideration.</li>
  <li><strong>Interpretation Challenges:</strong>
While the visual representation is generally intuitive, interpreting performance profiles can be challenging when dealing with a large number of algorithms and instances. Researchers need to carefully analyze the plots to draw meaningful conclusions.</li>
  <li><strong>Dependence on Parameter Settings:</strong>
The performance of optimization algorithms can be sensitive to parameter settings.
The performance profile may not fully capture the impact of parameter tuning, and additional analysis may be needed.
Finally, the benchmark should be run with similar stopping criteria for all the solvers.</li>
  <li><strong>Limited to Relative Comparison:</strong>
The performance profile is primarily designed for comparing algorithms relative to each other. It doesn’t provide an absolute measure of algorithm performance, and researchers may need to complement it with other metrics for a more complete assessment.</li>
</ul>

<h2 id="implementations">Implementations</h2>

<p>Several online implementations facilitate the generation of performance profiles for mathematical optimization software.
<a href="https://github.com/abelsiqueira/perprof-py">Perprof-py</a> is a notable Python package designed for this purpose, offering compatibility with TikZ and matplotlib for graphical output.
Additionally, the Julia programming language boasts two significant contributions in this domain: <a href="https://github.com/JuliaSmoothOptimizers/BenchmarkProfiles.jl">BenchmarkProfiles.jl</a> and <a href="https://github.com/JuliaSmoothOptimizers/SolverBenchmark.jl">SolverBenchmark.jl</a>.
These Julia packages provide effective tools for creating performance profiles and contribute to the growing availability of resources for benchmarking and comparing optimization algorithms.
Researchers and practitioners in the field can leverage these implementations to assess the performance of solvers and gain valuable insights into algorithmic behavior across diverse problem instances.</p>

<h2 id="performance-profile-interpretation">Performance Profile Interpretation</h2>

<p>In the realm of performance profiles, <a href="https://dx.doi.org/10.1007/s101070100263">Dolan and Moré’s 2002 article</a> provides examples that shed light on the interpretation of performance profiles within extensive benchmarks.</p>

<p>We delve further into the analysis with additional examples aimed at illustrating diverse situations and their nuanced interpretations.
Throughout the following examples, we place a particular emphasis on the interpretation of performance profiles, offering readers practical insights into understanding and analyzing results.
These examples span various scenarios, showcasing the adaptability of performance profiles in capturing different facets of solver performance across distinct benchmarks.</p>

<p>Additionally, it is essential to note that, in all the forthcoming examples, an unsolved problem is designated with a metric value of $+\infty$.</p>

<h3 id="example-1-a-clear-winner">Example 1: A clear winner</h3>

<p>We consider here two solvers on a set of 5 problems.</p>

<div class="language-julia highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">using</span> <span class="n">BenchmarkProfiles</span><span class="x">,</span> <span class="n">Plots</span>
<span class="n">T</span> <span class="o">=</span> <span class="x">[</span>
  <span class="mf">1.0</span> <span class="mf">5.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">10.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">15.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">20.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">20.0</span><span class="x">;</span>
<span class="x">]</span>
<span class="n">performance_profile</span><span class="x">(</span><span class="n">PlotsBackend</span><span class="x">(),</span> <span class="n">T</span><span class="x">,</span> <span class="x">[</span><span class="s">"Solver A"</span><span class="x">,</span> <span class="s">"Solver B"</span><span class="x">])</span>
</code></pre></div></div>

<p><img src="/images/PerformanceProfile/Example1.png" alt="Example 1: A clear winner" /></p>

<p>We can observe from this profile that:</p>
<ul>
  <li><em>Solver A</em> was better than <em>Solver B</em> on all problems;</li>
  <li><em>Solver A</em> and <em>Solver B</em> both solved all the problems.
Therefore, it is clear that on this test set and according to the chosen metric <em>Solver A</em> is preferable.</li>
</ul>

<h3 id="example-2-fast-but-not-robust">Example 2: Fast but not robust</h3>

<p>We consider here two solvers on a set of 8 problems.</p>

<div class="language-julia highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">using</span> <span class="n">BenchmarkProfiles</span><span class="x">,</span> <span class="n">Plots</span>
<span class="n">T</span> <span class="o">=</span> <span class="x">[</span>
  <span class="mf">1.0</span> <span class="mf">5.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">10.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">20.0</span><span class="x">;</span>
  <span class="mf">5.0</span> <span class="mf">10.0</span><span class="x">;</span>
  <span class="mf">7.0</span> <span class="mf">15.0</span><span class="x">;</span>
  <span class="mf">6.0</span> <span class="mf">5.0</span><span class="x">;</span>
  <span class="nb">Inf</span> <span class="mf">20.0</span><span class="x">;</span>
  <span class="nb">Inf</span> <span class="mf">20.0</span><span class="x">;</span>
<span class="x">]</span>
<span class="n">performance_profile</span><span class="x">(</span><span class="n">PlotsBackend</span><span class="x">(),</span> <span class="n">T</span><span class="x">,</span> <span class="x">[</span><span class="s">"Solver A"</span><span class="x">,</span> <span class="s">"Solver B"</span><span class="x">])</span>
</code></pre></div></div>

<p><img src="/images/PerformanceProfile/Example2.png" alt="Example 2: Fast but not robust" /></p>

<p>We can observe from this profile that:</p>
<ul>
  <li><em>Solver A</em> is better than <em>Solver B</em> on 62% of the problems;</li>
  <li><em>Solver B</em> solves 75% of the problems within a factor $\approx 2^3$ of the best solver, and all the problems within a factor $\approx 2^5$;</li>
  <li><em>Solver B</em> solves all the problems, while <em>Solver A</em> only solves 75% of the problems.</li>
</ul>

<p>Therefore, we can observe a mixed situation here. If one is interested in solving efficiently 75% of the problems, then <em>Solver A</em> is of choice. Howeover, <em>Solver B</em> is more robust as it mangages to solve all the problems.</p>

<h3 id="example-3-very-small-factor">Example 3: Very small factor</h3>

<p>The following exemple shows that we need to pay attention to the factors on the x-axis.</p>

<div class="language-julia highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">using</span> <span class="n">BenchmarkProfiles</span><span class="x">,</span> <span class="n">Plots</span>
<span class="n">T</span> <span class="o">=</span> <span class="x">[</span>
  <span class="mf">1.0</span> <span class="mf">1.0003</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">1.0003</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">1.0003</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">1.0003</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">1.0003</span><span class="x">;</span>
<span class="x">]</span>
<span class="n">performance_profile</span><span class="x">(</span><span class="n">PlotsBackend</span><span class="x">(),</span> <span class="n">T</span><span class="x">,</span> <span class="x">[</span><span class="s">"Solver A"</span><span class="x">,</span> <span class="s">"Solver B"</span><span class="x">])</span>
</code></pre></div></div>

<p><img src="/images/PerformanceProfile/Example3.png" alt="Example 3: Very small factor" /></p>

<p>In this case, it is clear that <em>Solver A</em> is better than <em>Solver B</em>, however the factor of difference is so small that it is difficult to draw a clear line between both.
This is a situation where either both solvers are equivalent or the metric chosen is not appropriate.</p>

<h3 id="the-difficult-case-of-more-than-2-solvers">The difficult case of more than 2 solvers</h3>

<p>The following example was taken from <a href="https://dx.doi.org/10.1145/2950048">Gould &amp; Scott, 2016</a> where is shown the performance of three solvers on a test
set of five problems, where the smaller the statistic, the better the solver performance.</p>

<table>
  <thead>
    <tr>
      <th>Problem</th>
      <th>Solver A</th>
      <th>Solver B</th>
      <th>Solver C</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>2</td>
      <td>1.5</td>
      <td>1</td>
    </tr>
    <tr>
      <td>2</td>
      <td>1</td>
      <td>1.2</td>
      <td>2</td>
    </tr>
    <tr>
      <td>3</td>
      <td>1</td>
      <td>4</td>
      <td>2</td>
    </tr>
    <tr>
      <td>4</td>
      <td>1</td>
      <td>5</td>
      <td>20</td>
    </tr>
    <tr>
      <td>5</td>
      <td>2</td>
      <td>5</td>
      <td>20</td>
    </tr>
  </tbody>
</table>

<div class="language-julia highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">using</span> <span class="n">BenchmarkProfiles</span><span class="x">,</span> <span class="n">Plots</span>
<span class="n">T</span> <span class="o">=</span> <span class="x">[</span>
  <span class="mf">2.0</span> <span class="mf">1.5</span> <span class="mf">1.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">1.2</span> <span class="mf">2.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">4.0</span> <span class="mf">2.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">5.0</span> <span class="mf">20.0</span><span class="x">;</span>
  <span class="mf">2.0</span> <span class="mf">5.0</span> <span class="mf">20.0</span><span class="x">;</span>
<span class="x">]</span>
<span class="n">performance_profile</span><span class="x">(</span><span class="n">PlotsBackend</span><span class="x">(),</span> <span class="n">T</span><span class="x">,</span> <span class="x">[</span><span class="s">"Solver A"</span><span class="x">,</span> <span class="s">"Solver B"</span><span class="x">,</span> <span class="s">"Solver C"</span><span class="x">])</span>
</code></pre></div></div>

<p><img src="/images/PerformanceProfile/Example4.png" alt="The difficult case of more than 2 solvers" /></p>

<p>Solver A is the best on 80% of the problems in the test set, Solver B is not the winner on any.
Moreover, Solver A solves all the problems within a factor 2 of the best.
Thus, it is the most preferable choice over Solver B and Solver C.</p>

<p>Focusing on Solver B and Solver C: if we are interested in having a solver that can solve at least 60% of the test problems with the greatest efficiency then Solver C seems preferable to Solver B.</p>

<p>Trying to confirm this statement and reproducing the performance profile without Solver A however is showing a different story.</p>

<div class="language-julia highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">using</span> <span class="n">BenchmarkProfiles</span><span class="x">,</span> <span class="n">Plots</span>
<span class="n">T</span> <span class="o">=</span> <span class="x">[</span>
  <span class="mf">2.0</span> <span class="mf">1.5</span> <span class="mf">1.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">1.2</span> <span class="mf">2.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">4.0</span> <span class="mf">2.0</span><span class="x">;</span>
  <span class="mf">1.0</span> <span class="mf">5.0</span> <span class="mf">20.0</span><span class="x">;</span>
  <span class="mf">2.0</span> <span class="mf">5.0</span> <span class="mf">20.0</span><span class="x">;</span>
<span class="x">]</span>
<span class="n">performance_profile</span><span class="x">(</span><span class="n">PlotsBackend</span><span class="x">(),</span> <span class="n">T</span><span class="x">[</span><span class="o">:</span><span class="x">,</span><span class="mi">2</span><span class="o">:</span><span class="mi">3</span><span class="x">],</span> <span class="x">[</span><span class="s">"Solver B"</span><span class="x">,</span> <span class="s">"Solver C"</span><span class="x">])</span>
</code></pre></div></div>

<p><img src="/images/PerformanceProfile/Example4-a.png" alt="The difficult case of more than 2 solvers" /></p>

<p>When comparing two solvers on a given test set, performance profiles give a clear
measure of which is the better solver for a selected range.
But as the examples above illustrate, if performance profiles are used to compare more than two solvers one cannot directly establish a ranking.
The article <a href="https://dx.doi.org/10.1145/2950048">Gould &amp; Scott, 2016</a> also contains more realistic examples of such phenomenon.</p>

<h3 id="profile-with-more-metrics-and-profile-wall">Profile with more metrics and profile wall</h3>

<p>One of the drawback of performance profile is the sensitivity to the chosen metric.
A straightforward extension is to consider more than one merit function.
The following illustration is selected from the article <a href="https://joss.theoj.org/papers/10.21105/joss.03991.pdf">Migot et al., (2022). DCISolver.jl: A Julia Solver for Nonlinear Optimization using Dynamic Control of Infeasibility. Journal of Open Source
Software, 7(70), 3991</a>.</p>

<p><img src="/images/PerformanceProfile/ipopt_dcildl_82.png" alt="Performance profile comparing IPOPT and DCISolver" /></p>

<p>This performance profile compares <a href="https://github.com/JuliaSmoothOptimizers/DCISolver.jl">DCISolver.jl</a> variant LDL against Ipopt on 82 nonlinear continuous optimization problems.
It uses two merit functions: the elapsed time to solve a problem, and the number of evaluations of objective and constraint functions.
This latter quantity is sometimes used to be independent of the evaluation and the implementation adaptation on the computer, while still being strongly correlated to the elapsed time.</p>

<p>Ipopt solved 72 problems (88%) successfully, which is one more than DCI.
The plot on the left shows that Ipopt is the fastest on 28% of the problems, while DCI is the fastest on 72%.
The plot on the right shows that Ipopt used fewer evaluations of objective and constraint functions on 70% of the problems, while DCI used fewer evaluations on 24%.
Since, it doesn’t add up to 88%, there was a tie in the number of evaluations on 6%.</p>

<p>Overall, this plot tends to show that DCI variant LDL is good implementation as it fast, however it uses more evaluations which can be problematic depending on the modeling tool used to access objective and constraint functions.</p>

<p>It is possible to extend this benchmark to more solvers.
The following illustrates a similar benchmark where a third solver is added, KNITRO.
The first pair of profile is similar to what has been discussed before.
The other profiles are showing two-by-two profiles in order to overcome the difficulty raised earlier.</p>

<p><img src="/images/PerformanceProfile/ipopt_knitro_dcildl_82.png" alt="Performance profile comparing IPOPT, KNITRO, and DCISolver" /></p>

<p>This type of profile wall allows to build more concrete conclusions on the strenght of each solvers.</p>

<h2 id="more-on-benchmarks">More on benchmarks</h2>

<p>Performance profiles use a performance ratio instead of relying on the count of function evaluations needed to solve a problem. Consequently, performance profiles do not provide the percentage of problems that can be successfully addressed (within a specified tolerance, $\tau$) based on a particular quantity of function evaluations. This data, which is crucial for users dealing with resource-intensive optimization problems and who are keenly interested in the immediate performance of algorithms, is, however, supplied by the data profiles <a href="https://dx.doi.org/10.1137/080724083">More &amp; Wild, 2009</a>.</p>

<h2 id="references">References</h2>

<blockquote>
  <p>Dolan, E. D., &amp; Moré, J. J. (2002).
Benchmarking optimization software with performance profiles.
Mathematical programming, 91, 201-213.
<a href="https://link.springer.com/article/10.1007/s101070100263">DOI: 10.1007/s101070100263</a></p>
</blockquote>

<blockquote>
  <p>Gould, N., &amp; Scott, J. (2016).
A note on performance profiles for benchmarking software.
ACM Transactions on Mathematical Software (TOMS), 43(2), 1-5.
<a href="https://dl.acm.org/doi/abs/10.1145/2950048">DOI: 10.1145/2950048</a></p>
</blockquote>

<blockquote>
  <p>Moré, J. J., &amp; Wild, S. M. (2009).
Benchmarking derivative-free optimization algorithms.
SIAM Journal on Optimization, 20(1), 172-191.
<a href="https://epubs.siam.org/doi/abs/10.1137/080724083">DOI: 10.1137/080724083</a></p>
</blockquote>

<blockquote>
  <p>Siqueira, A. S., da Silva, R. G. C., &amp; Santos, L. R. (2016).
Perprof-py: A python package for performance profile of mathematical optimization software.
Journal of Open Research Software, 4(1), e12-e12.
<a href="https://openresearchsoftware.metajnl.com/articles/10.5334/jors.81">DOI: 10.5334/jors.81</a></p>
</blockquote>

<blockquote>
  <p>Tits, A. L., &amp; Yang, Y. (1996).
Globally convergent algorithms for robust pole assignment by state feedback.
IEEE transactions on Automatic Control, 41(10), 1432-1452.
<a href="https://ieeexplore.ieee.org/abstract/document/539425">DOI: 10.1109/9.539425</a></p>
</blockquote>]]></content><author><name>Tangi Migot</name></author><category term="software" /><category term="publications" /><category term="best practice" /><summary type="html"><![CDATA[The Dolan-More Performance Profile is a method used for comparing the performance of algorithms.]]></summary></entry><entry><title type="html">Empowering Research: The Vital Role of Citing Research Software for Reproducibility and Innovation</title><link href="https://tmigot.github.io/posts/2024/02/thoughts/" rel="alternate" type="text/html" title="Empowering Research: The Vital Role of Citing Research Software for Reproducibility and Innovation" /><published>2024-02-25T00:00:00-08:00</published><updated>2024-02-25T00:00:00-08:00</updated><id>https://tmigot.github.io/posts/2024/02/cff-software</id><content type="html" xml:base="https://tmigot.github.io/posts/2024/02/thoughts/"><![CDATA[<p>As I started my Ph.D. journey in numerical optimization back in 2014, I noticed something that really stood out to me: despite the abundance of scientific papers discussing algorithms and their numerical results, the availability of corresponding open-source codes lagged far behind.</p>

<p>This discrepancy posed significant challenges to reproducibility and the continuous improvement of algorithms, ultimately hindering the advancement of knowledge in the field in my opinion.
Understanding the reasons behind this gap provide insights into the complexities inherent in code development:</p>
<ul>
  <li>Providing an open-source implementation means navigating platform choices and addressing questions and issues from users;</li>
  <li>Moreover, the journey from a basic implementation to a robust and efficient one requires a considerable investment of time and effort;</li>
  <li>The process of writing, maintaining and implementing a code wasn’t necessarily valorized in scientific research.</li>
</ul>

<p>While these challenges could be frustrating, they also presented an opportunity for transformation.
The necessity of numerical results underscores the importance of investing the development of codes.
By shifting our focus from rewriting similar codes for each publication to refining and enhancing existing implementations, we could pave the way for greater reproducibility and innovation in the field.</p>

<p>Furthermore, the potential impact extended beyond academia.
By improving the accessibility and quality of optimization codes, we could empower practitioners to tackle real-world problems with greater confidence and efficacy.
This shift toward research-level, super-powerful codes held the promise of addressing some of the
most pressing challenges facing our society.</p>

<p>In essence, what initially seemed like a frustrating discrepancy evolved into a call to action.
By embracing the challenges and opportunities inherent in code development, we could not only advance knowledge within the field but also make meaningful contributions to real-world problems.
This, I believe, is one of the most important challenges in research and one that holds the potential to create lasting positive change.</p>

<h2 id="why-software-matters">WHY SOFTWARE MATTERS</h2>

<p>Over the past decades, there has been a shift regarding scientific software.</p>

<p><em>Increased Diversity and Accessibility</em></p>

<p>Open-source software has helped democratize access to scientific tools and resources,
making them more accessible to researchers worldwide.
Additionally, the open nature of these projects encourages diversity and inclusivity,
as contributors from diverse backgrounds can participate in their development.</p>

<p><em>Increased Adoption of Open Source</em></p>

<p>There has been a significant rise in the adoption of open-source software in scientific research.
Researchers increasingly recognize the benefits of open-source collaboration, including transparency, reproducibility, and community-driven development.</p>

<p>Personally, my research journey began at INRIA, renowned as one of France’s largest and most dynamic research center in computer science and applied mathematics.
At INRIA, the development of software is ingrained in the fabric of their research culture, reflecting a deep commitment to innovation and advancement in scientific computing.</p>

<p><a href="https://www.inria.fr/en/open-source-software-inria">Inria and open source software: unwavering support for nearly 20 years</a></p>

<p><em>Growing Emphasis on Reproducibility and Transparency</em></p>

<p>With the replication crisis in various scientific fields, there’s been a heightened focus on reproducibility and transparency.
Open-source software plays a crucial role in enabling researchers to share their code and data, facilitating reproducibility and validation of results.</p>

<p><a href="https://www.software.ac.uk/blog/towards-reproducibility-research-software">Towards Reproducibility in Research Software</a></p>

<p><a href="https://openresearchsoftware.metajnl.com/articles/10.5334/jors.ay">Best Practices for Computational Science: Software Infrastructure and Environments for Reproducible and Extensible Research</a></p>

<p><em>Collaborative Development and Sharing</em></p>

<p>Platforms like GitHub have facilitated collaborative development and sharing of scientific software.
Researchers can openly collaborate, contribute improvements, report issues, and share their work with the wider community, fostering innovation and knowledge exchange.</p>

<p>Hard to believe now but Git exists only since 2005
(<a href="https://git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git">A short history of Git</a>)
and Github started being developped in 2007 (<a href="https://smhatre59.medium.com/the-untold-story-of-github-132840f72f56">The untold story of Github</a>).
Now, pretty much everyone hosts their open source projects on GitHub,
including top companies like Google, Facebook, Twitter, and even Microsoft.
Julia programming language is housed on GitHub and it’s entirely public.</p>

<p><a href="https://github.blog/2023-11-08-the-state-of-open-source-and-ai/">In 2023, Github reported 284 millions public repository</a>.</p>

<p><em>Integration of Best Practices</em></p>

<p>There’s been a greater emphasis on incorporating best practices in software development within the scientific community.
Initiatives like the Software Carpentry and Data Carpentry programs offer training in software development skills tailored
for researchers, promoting good coding practices, version control, and reproducible research.
While it used to be common to criticize academic code as being poorly organized and in need of extensive refactoring, this perception is becoming less prevalent over time.</p>

<p><em>Recognition and Reward for Software Contributions</em></p>

<p>There’s a growing recognition of the importance of software contributions to research outcomes.
Funding agencies, institutions, and journals are increasingly valuing and rewarding researchers
for their software development efforts, whether through citations, funding, or career advancement.</p>

<p>Even though, I classified this in the new practices, this was long known in Montréal.
<a href="https://www.researchgate.net/publication/220284043_GENCOL_une_equipe_et_un_logiciel_d'optimisation">The story of GENCOL and the company AD OPT is one of Montréal classic using research-level software to solve major challenges</a></p>

<p>Overall, the past decade has witnessed significant progress in the development and adoption of open-source scientific software.
These trends have played a crucial role in advancing scientific research, fostering collaboration, and promoting transparency and reproducibility within the scientific community.</p>

<h2 id="open-source-software-and-the-role-of-julia">OPEN SOURCE SOFTWARE AND THE ROLE OF JULIA</h2>

<p>The past decade has seen the emergence of numerous specialized tools, libraries, and frameworks tailored
for scientific computing and data analysis. These resources provide researchers with powerful and efficient tools for tackling complex scientific problems across various disciplines. One that stood out for me is the Julia programming language.</p>

<p>In this context, the plateforme and language plays a major role, and I have grown to think that Julia is a perfect match
and particularly in an academic context (but not only).
In numerical optimization, and computational science in general, performant open-source codes have been developped using
Fortran, C++, and in some measure R and Python.
There have been numerous success story, however without bringing together a large community of contributors.</p>

<p>The Julia-verse is mostly focus toward Github, and there is a continuous development toward continuous integration tools
that would benefit any Julia package. Thus, making coding and maintaining repository in Julia a better experience.</p>

<p>The Julia programming language version 1.0 appeared in 2018 turning this very promising language into a stable one where
large codes can rely on without too much maintenance.
Julia has opened numerous success story, one of the early that was impressive was Julia joining the petaflop club
<a href="https://www.hpcwire.com/off-the-wire/julia-joins-petaflop-club/">Julia Joins Petaflop Club</a>.
In other words, Julia is fast, which is good in general because you don’t want to invest time into code that will be obsolete.
In my experience, and our recent paper <a href="https://link.springer.com/article/10.1007/s10107-023-02007-6">Scalable Adaptive Regularization</a> was another example,
Julia is doing more than OK comparing to solvers in Fortran or C++.</p>

<p>Finally, one of the most important point for me is the accessibility of the language.
I have been teaching numerical optimization classes for the past years with laboratories in Julia (usually 6 blocks of 3 hours)
to students that never coded in Julia, but usually had some Matlab or Python experience.
I loved the idea that in a couple of hours students were capable of starting doing meaningful code, and we were able to cover
very exciting topics. The same experience extended to the research teams were I have been involved.</p>

<p>To me the perspective of being able to write meaningful and efficient code with few lines, a clear syntax and without
10 years of experience sounds like modern and good science.</p>

<h2 id="citation-file-format-cff-for-software">Citation File Format (CFF) FOR SOFTWARE</h2>

<p>To valorize the coding process in scientific research, the generally accepted procedure recently is to make software citable.
Therefore, we would register packages to Zenodo.org to generate a DOI that can be cited, although this is not considered a
research paper.
Some well-known research journal have a focus on the code either accompanying research or regarding as the main contribution
the code itself or some update of it (Mathematical Programming C, INFORMS Journal of Scientific Software, …).
A complementary project is to write paper about the code itself and not the associated mathematical content.
This is the purpose of journal like Journal of Open Source Software or Journal of Open Research Software.
They are peer-reviewed journal where a short article is reviewed as well as the package itself and its documentation.
The peer-review process is not anonymous and is done via a Github discussion, which I think is in the open-source spirit
we discussed earlier.</p>

<h3 id="what-is-a-citationcff-file">What is a CITATION.cff file?</h3>

<p>According to <a href="https://citation-file-format.github.io/">[1]</a> CITATION.cff files are plain text files with human- and machine-readable citation information for software (and datasets).
Code developers can include them in their repositories to let others know how to correctly cite their software.
It is very easy to correctly cite a paper: all the necessary information (metadata) can be found on the title page or the article website.
Software and datasets have no title page, the relevant information is often less obvious.
People who want to cite your software may ask questions like:
What is the name of the software (it’s probably not my_scripts/run.m or analysis.py)?
What label should I use to uniquely identify the version of the software I have used?
What is the appropriate set of people that should be cited as authors?
The person who wants to cite your software will probably not be able to answer these questions accurately and consistently themselves, but you can!
Give them all the right information in a CITATION.cff file, and they can cite your software correctly.</p>

<p>Create a CITATION.cff file with ease using the form on the <a href="https://citation-file-format.github.io/cff-initializer-javascript/">cffinit website</a>.</p>

<p>According to <a href="https://citation-file-format.github.io/">[1]</a>, the development of CFF is supported by The Institute for Software Technology of the German Aerospace Center (DLR), The Netherlands eScience Center, and The Software Sustainability Institute.</p>

<h3 id="they-choose-cff">They choose CFF</h3>

<p>Github: When you put a CITATION.cff file in the default branch of your GitHub repository, it is automatically linked from the repository landing page, and the citation information is rendered on the repository page, and also provided as BibTeX snippet which users can simply copy! This makes it easy for other users to cite your software project, using the information you’ve provided.
https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files
<a href="https://github.com/citation-file-format/citation-file-format/tree/main">[2]</a> If your repository is hosted on GitHub, they will show the citation information in the sidebar, which makes it easy for visitors to cite your software or dataset correctly.</p>

<p>Zenodo: When you have a CITATION.cff file in your GitHub repository, make a release and publish it on Zenodo via the Zenodo-GitHub integration, Zenodo will use the citation information you’ve provided to populate the publication entry! This makes it easier for software developers and maintainers to publish their software with complete and correct metadata.
https://twitter.com/ZENODO_ORG/status/1420357001490706442
<a href="https://github.com/citation-file-format/citation-file-format/tree/main">[2]</a> When you publish your software on Zenodo via the GitHub-Zenodo integration, they will use the metadata from your CITATION.cff file.</p>

<p>Zotero: When you have a CITATION.cff file in your repository, and someone uses the Zotero browser plugin to import a reference to your repository into their Zotero reference manager, it will use the citation information you’ve provided to populate the reference entry! This makes it easier for users to get a complete and correct reference to your software, that they can use when they cite your software in their work!
https://twitter.com/zotero/status/1420515377390530560
<a href="https://github.com/citation-file-format/citation-file-format/tree/main">[2]</a> People can import the correct reference to your software into the Zotero reference manager via a browser plugin.</p>]]></content><author><name>Tangi Migot</name></author><category term="software" /><category term="publications" /><category term="best practice" /><category term="thoughts" /><summary type="html"><![CDATA[As I started my Ph.D. journey in numerical optimization back in 2014, I noticed something that really stood out to me: despite the abundance of scientific papers discussing algorithms and their numerical results, the availability of corresponding open-source codes lagged far behind.]]></summary></entry><entry><title type="html">ARCqK published in Mathematical Programming</title><link href="https://tmigot.github.io/posts/2023/12/publis/" rel="alternate" type="text/html" title="ARCqK published in Mathematical Programming" /><published>2023-12-15T00:00:00-08:00</published><updated>2023-12-15T00:00:00-08:00</updated><id>https://tmigot.github.io/posts/2023/12/arcqk</id><content type="html" xml:base="https://tmigot.github.io/posts/2023/12/publis/"><![CDATA[<p>I am thrilled to share that the article <em>Scalable adaptive cubic regularization methods</em> has been published in the journal <a href="https://link.springer.com/journal/10107">Mathematical Programming, Series A</a>.
This has been a really exciting journey with my co-authors Jean-Pierre Dussault and Dominique Orban on this really exciting work that I hope will help explore the numerical possibilities of ARC methods.
The proposed implementation is a perfect fit for large-scale application as it solves the subproblem inexactly and only required Hessian-vector products, so no need to evaluate and store the Hessian matrix.
As usual, the code has been done in Julia and is available in the folder <strong>paper</strong> in the Github repository <a href="https://github.com/JuliaSmoothOptimizers/AdaptiveRegularization.jl">AdaptiveRegularization.jl</a>.
Full text published version available from <a href="https://rdcu.be/dpYcM">here</a>, enjoy!</p>

<h2 id="unconstrained-optimization">Unconstrained Optimization</h2>

<p>We consider unconstrained optimization problems of the form
\(\underset{x \in \mathbb{R}^n}{\text{minimize}} f(x)\)
where $f$ is a twice continuously differentiable function, and its Hessian is <a href="https://en.wikipedia.org/wiki/Lipschitz_continuity">Lipschitz continuous</a>. The aim is to study iterative algorithms that converges to a first or second-order stationary points.</p>

<p>A classical approach in this context is to use <a href="https://en.wikipedia.org/wiki/Trust_region"><em>trust-region</em> method</a>, which is a very robust approach. The Julia package <a href="https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl">JSOSolvers.jl</a> implements two of such approach, TRON and TRUNK. The book <a href="https://epubs.siam.org/doi/pdf/10.1137/1.9780898719857.bm">Trust region methods by Conn, Gould, and Toint</a> is a must.</p>

<h2 id="adaptive-cubic-regularization-arc">Adaptive Cubic Regularization (ARC)</h2>

<p>ARC algorithms, recently explored by <a href="https://link.springer.com/article/10.1007/s10107-009-0286-5">Cartis, Gould, and Toint (2011a)</a> and <a href="https://link.springer.com/article/10.1007/s10107-009-0337-y">Cartis, Gould, and Toint (2011b)</a> are closely related to trust region methods in that steps are computed by solving a sequence of regularized subproblems.
A major theoretical appeal of ARC over TR methods is their optimal worst-case complexity property.
Whereas the number of function evaluations required to reach a point $x$ for which $|\nabla f(x)|\le\epsilon$ is $O(\epsilon^{-2})$ for TR, which is no better than steepest descent that number is $O(\epsilon^{-3/2})$ for ARC.</p>

<h2 id="how-we-do-it">How We Do It?</h2>

<p>The standard approach consists in performing aniterative search for the shift akin to solving the secular equation in trust-region methods.
Such search requires computing the <a href="https://en.wikipedia.org/wiki/Cholesky_decomposition">Cholesky factorization</a> of a tentative shifted Hessian at each iteration, which limits the size of problems that can be reasonably considered.
In this article, we propose a scalable implementation of ARC named <em>ARCqK</em> in which we solve a set of shifted systems concurrently by way of an appropriate modiﬁcation of the Lanczos formulation of the <a href="https://en.wikipedia.org/wiki/Conjugate_gradient_method">conjugate gradient (CG) method</a>.
At each iteration of <em>ARCqK</em> to solve a problem with $n$ variables, a range of $m ≪ n$ shift parameters is selected. 
The CG variant only requires one Hessian-vector product and one dot product per iteration, independently of $m$.
Solves corresponding to inadequate shift parameters are interrupted early.
All shifted systems are solved inexactly.
Such modest cost makes our implementation scalable and appropriate for large-scale problems.</p>

<h2 id="numerical-results">Numerical Results</h2>

<p>The numerical results on <a href="https://link.springer.com/article/10.1007/s10589-014-9687-3">CUTEst test problems</a> presented in <a href="https://link.springer.com/article/10.1007/s101070100263">Dolan and Moré performance profile</a>, with respect to the elapsed time, are comparing:</p>
<ul>
  <li><em>ARCqK</em> with the implementation of ARC done in Fortran in the library GALAHAD;</li>
  <li><em>ARCqK</em> with a classical Steihaug-Toint trust-region method implemented in Julia with the same scheme on problems with $\geq 1000$ variables.
More details are given in the article, but overall it shows good prospect for ARCqK as the algorithm is both fast and robust.</li>
</ul>

<p><img src="/images/2022-05-16_ARC_ARCqKOpShift05_cutest_277_1000000_t_3600_elapsed_time.png" alt="" /></p>

<p><img src="/images/2022-05-16_ST_TROp_ARCqKOpShift05_cutest_277_1000000_t_3600_all95_min_1000__elapsed_time.png" alt="" /></p>

<p>Our implementation is designed for large scale problems, so we expect to generalize these results to even larger problems.</p>]]></content><author><name>Tangi Migot</name></author><category term="Julia" /><category term="numerical optimization" /><category term="publications" /><category term="adaptive regularization cubic" /><summary type="html"><![CDATA[I am thrilled to share that the article Scalable adaptive cubic regularization methods has been published in the journal Mathematical Programming, Series A. This has been a really exciting journey with my co-authors Jean-Pierre Dussault and Dominique Orban on this really exciting work that I hope will help explore the numerical possibilities of ARC methods. The proposed implementation is a perfect fit for large-scale application as it solves the subproblem inexactly and only required Hessian-vector products, so no need to evaluate and store the Hessian matrix. As usual, the code has been done in Julia and is available in the folder paper in the Github repository AdaptiveRegularization.jl. Full text published version available from here, enjoy!]]></summary></entry><entry><title type="html">Looking Back at the Winter Session</title><link href="https://tmigot.github.io/posts/2023/10/teaching/" rel="alternate" type="text/html" title="Looking Back at the Winter Session" /><published>2023-10-01T00:00:00-07:00</published><updated>2023-10-01T00:00:00-07:00</updated><id>https://tmigot.github.io/posts/2023/10/teaching</id><content type="html" xml:base="https://tmigot.github.io/posts/2023/10/teaching/"><![CDATA[<p>In the world of numerical optimization, the quest for efficiency, accuracy, and innovation never ceases. At Polytechnique Montréal, students embarking on their educational journey have a unique opportunity to explore this dynamic field through the course <a href="https://www.polymtl.ca/programmes/cours/methodes-doptimisation-et-controle-optimal"><em>MTH8408 Méthodes d’optimisation et contrôle optimal</em></a>. This course, which I had the privilege of teaching during the winter session of 2023, delves into the depths of numerical methods for optimization, variational calculus, and optimal control.</p>

<p><a href="https://tmigot.github.io/posts/2022/06/teaching/">Teaching the same course in 2022</a> provided valuable insights that led to improvements, making the 2023 edition an even more enriching experience. The heart of MTH8408 lies in bridging theory and practice, giving students a well-rounded understanding of optimization. Here, we will take you on a journey through the course, its laboratory sessions, student projects, and the role of the powerful Julia programming language.</p>

<h2 id="course-overview">Course Overview</h2>

<p>MTH8408 is a 36-hour course that equips students with a deep understanding of optimization algorithms, spanning various classes of problems. The primary objective is to ensure that students grasp the core concepts of optimization while gaining hands-on experience. It’s this unique blend of theory and practice that sets the course apart.</p>

<p>One remarkable aspect of the course is the extensive in-class discussions that dissect algorithms, focusing on the intricate details that render them efficient. A prime example is the utilization of matrix-free implementations for some algorithms. Such attention to detail ensures that students not only understand the algorithms but can also implement them effectively.</p>

<h2 id="laboratory-sessions">Laboratory Sessions</h2>

<p>In addition to the classroom sessions, students spend 18 hours in the laboratory. Here, they get to grips with the <a href="https://julialang.org">Julia programming language</a>, known for its power and flexibility in the field of scientific computing. More importantly, students have the opportunity to contribute to existing Julia packages, such as <a href="https://jso.dev/OptimizationProblems.jl/dev/contributing/">OptimizationProblems.jl</a>.</p>

<p>The course uses several Julia packages:</p>
<ul>
  <li><a href="https://github.com/jump-dev/JuMP.jl">JuMP.jl</a>/<a href="https://github.com/JuliaSmoothOptimizers/NLPModelsjuMP.jl">NLPModelsJuMP.jl</a> and/or <a href="https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl">ADNLPModels.jl</a>: for modeling optimization problems;</li>
  <li><a href="https://jso.dev/OptimizationProblems.jl">OptimizationProblems.jl</a>: set of test problems;</li>
  <li><a href="https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl">JSOSolvers.jl</a>: serve as a model for coding new solvers and is used for comparison with the implemented algorithms;</li>
  <li><a href="https://github.com/jump-dev/Ipopt.jl">Ipopt.jl</a>/<a href="https://github.com/JuliaSmoothOptimizers/NLPModelsIpopt.jl">NLPModelsIpopt.jl</a>: use Ipopt as a generic solver;</li>
  <li><a href="https://github.com/JuliaSmoothOptimizers/PDENLPModels.jl">PDENLPModels.jl</a>: model optimal control problems;</li>
  <li><a href="https://github.com/JuliaSmoothOptimizers/SolverBenchmark.jl">SolverBenchmark.jl</a>: set of tools to benchmark solvers and generate performance and data profiles.</li>
</ul>

<p>What’s truly impressive is how quickly students adapt to Julia and these packages. In just a few hours, they are able to code a range of algorithms for unconstrained and equality-constrained optimization problems, as well as linear and nonlinear least squares problems. It’s a testament to both the students’ capabilities and the accessibility of Julia as a programming language.</p>

<h2 id="student-projects">Student Projects</h2>

<p>One of the highlights of MTH8408 is the student projects. These projects allow students to explore areas of interest within the realm of optimization and apply their newfound knowledge and skills. The results from these projects are nothing short of astounding, often reaching the level of numerical results expected in research papers.</p>

<p>Some of the topics that students tackled in 2023 included parameter identification in financial market models, Gaussian process regression, quasi-Newton methods, first-order objective-function-free optimization algorithms, local solutions of the optimal power flow problem, nonsmooth R2 algorithms with constraints, and hybrid methods for nonlinear least squares.</p>

<p>The diversity of these projects demonstrates the breadth of optimization’s applications and the depth of the knowledge acquired during the course. Students are not just learning theory; they are actively contributing to the advancement of optimization research.</p>

<h2 id="teaching-with-julia">Teaching with Julia</h2>

<p>Teaching MTH8408 using Julia and its associated packages has been a revelation. The simplicity and efficiency of Julia make it a powerful tool for teaching optimization. However, what truly makes a difference is the usage of a straightforward yet highly effective API, known as NLPModels, along with refined ideas and subsolvers for algorithms.</p>

<p>The students’ ability to implement algorithms and achieve exceptional results is a testament to both their aptitude and the efficacy of these tools. Julia has undoubtedly earned its place in the optimization classroom.</p>

<h2 id="personal-insights">Personal Insights</h2>

<p>Teaching MTH8408 is not just a professional endeavor; it’s a source of personal fulfillment. The interaction with students, their enthusiasm, and their achievements are incredibly rewarding. Moreover, teaching this course is a two-way street. It guides my research and helps me understand what truly matters in the world of numerical optimization. The students’ exploration of diverse projects continually expands my horizons and enriches my research endeavors.</p>]]></content><author><name>Tangi Migot</name></author><category term="teaching" /><category term="Julia" /><category term="PDE" /><category term="optimization" /><category term="optimal control" /><summary type="html"><![CDATA[In the world of numerical optimization, the quest for efficiency, accuracy, and innovation never ceases. At Polytechnique Montréal, students embarking on their educational journey have a unique opportunity to explore this dynamic field through the course MTH8408 Méthodes d’optimisation et contrôle optimal. This course, which I had the privilege of teaching during the winter session of 2023, delves into the depths of numerical methods for optimization, variational calculus, and optimal control.]]></summary></entry><entry><title type="html">Unveiling JuliaSmoothOptimizers at JuMP-dev Workshop, JuliaCon 2023</title><link href="https://tmigot.github.io/posts/2023/07/talk/" rel="alternate" type="text/html" title="Unveiling JuliaSmoothOptimizers at JuMP-dev Workshop, JuliaCon 2023" /><published>2023-07-30T00:00:00-07:00</published><updated>2023-07-30T00:00:00-07:00</updated><id>https://tmigot.github.io/posts/2023/07/juliacon</id><content type="html" xml:base="https://tmigot.github.io/posts/2023/07/talk/"><![CDATA[<p>I am thrilled to share my experiences from the recent <a href="https://jump.dev/meetings/jumpdev2023/">JuMP-dev workshop</a> that took place at the JuliaCon 2023, held at MIT in Boston, USA.
As a passionate researcher in the field of numerical optimization, this year’s conference was particularly special for me, as it marked my first in-person attendance after the previous year’s online edition (read about it <a href="https://tmigot.github.io/posts/2022/07/talk/">here</a>).
You can check the <a href="https://youtu.be/x52QlIb8E9Y?si=-TRB08B8qoFAvBxT">replay of my talk on youtube</a>.</p>

<p><a href="https://pretalx.com/juliacon2023/talk/HQSUYM/">Talk Title: Optimization solvers in JuliaSmoothOptimizers</a></p>

<p>At this year’s conference, I had the honor of presenting a talk titled “Optimization solvers in JuliaSmoothOptimizers”.
In this presentation, I had the opportunity to provide an overview of the significant strides made in continuous nonlinear nonconvex optimization solvers by the JuliaSmoothOptimizers (JSO) organization.
It has been an exciting journey of growth and innovation, and the conference platform was the ideal place to unveil these remarkable developments.</p>

<h2 id="abstract-revolutionizing-optimization-with-jsosuitejl">Abstract: Revolutionizing Optimization with JSOSuite.jl</h2>

<p>The heart of my talk revolved around a package called JSOSuite.jl.
This new addition to the JuliaSmoothOptimizers ecosystem bridges the gap between users and JSO solvers.
JSOSuite.jl eliminates the need for users to be familiar with the nuances of various solvers like DCISolver.jl, FletcherPenaltySolver.jl, Percival.jl, RipQP.jl, and more. This leap in user-friendliness simplifies the optimization process and streamlines benchmarking algorithms. Notably, it paves the way for automatic algorithm selection based on specific problem characteristics.</p>

<p>One of the most promising features of JSOSuite.jl is its ability to facilitate benchmarking, making it easy to assess algorithm performance across different problems.
This empowers researchers to make informed choices about the best optimization strategies for their particular scenarios.</p>

<p>Furthermore, I highlighted the performance improvements achieved by the solvers in terms of execution speed and memory utilization. This progress is a testament to the dedication and expertise of the JSO community in refining and enhancing their tools.</p>

<h2 id="juliasmoothoptimizers-forging-the-path-forward">JuliaSmoothOptimizers: Forging the Path Forward</h2>

<p>From my vantage point, JuliaSmoothOptimizers has solidified its position as a cutting-edge platform for studying numerical optimization and prototyping new algorithms. Over the past three years, the organization has evolved into a state-of-the-art hub for optimization enthusiasts, fostering collaboration and pushing the boundaries of what is achievable in this dynamic field.</p>

<p>As I reflect on my experience at JuliaCon 2023 and the incredible strides made by JuliaSmoothOptimizers, I am filled with a sense of excitement and anticipation for the future of numerical optimization. The innovations unveiled during this conference represent a significant step forward, and I am grateful to have been a part of this transformative journey.</p>]]></content><author><name>Tangi Migot</name></author><category term="programming" /><category term="Julia" /><category term="optimization" /><category term="talk" /><summary type="html"><![CDATA[I am thrilled to share my experiences from the recent JuMP-dev workshop that took place at the JuliaCon 2023, held at MIT in Boston, USA. As a passionate researcher in the field of numerical optimization, this year’s conference was particularly special for me, as it marked my first in-person attendance after the previous year’s online edition (read about it here). You can check the replay of my talk on youtube.]]></summary></entry><entry><title type="html">PDENLPModels.jl published in JOSS</title><link href="https://tmigot.github.io/posts/2022/12/news/" rel="alternate" type="text/html" title="PDENLPModels.jl published in JOSS" /><published>2022-12-21T00:00:00-08:00</published><updated>2022-12-21T00:00:00-08:00</updated><id>https://tmigot.github.io/posts/2022/12/PDE-JOSS</id><content type="html" xml:base="https://tmigot.github.io/posts/2022/12/news/"><![CDATA[<p>I am very happy to announce the publication in the Journal of Open Source Software of the paper <strong>PDENLPModels.jl: A NLPModel API for optimization problems with PDE-constraints</strong>.</p>

<p>It is accessible in open access <a href="https://joss.theoj.org/papers/10.21105/joss.04736">here</a>. This post was also published on JSO’s website: <a href="https://juliasmoothoptimizers.github.io/news-and-blogposts/2022/2022-12-16-pdenlpmodels/">juliasmoothoptimizers.github.io</a>.</p>

<p><a href="https://github.com/JuliaSmoothOptimizers/PDENLPModels.jl">PDENLPModels.jl</a> is a Julia package that specializes the <a href="https://github.com/JuliaSmoothOptimizers/NLPModels.jl">NLPModel API</a> for modeling and discretizing optimization problems with mixed algebraic and PDE in the constraints.</p>

<p>We consider optimization problems of the form: find functions $y, u$ and $κ \in \mathbb{R}^n$ satisfying
\(\begin{array}{lll}
    \underset{y, u, \theta}{\text{minimize}} \int_\Omega J(y, u, \theta)d\Omega \ \text{ subject to} &amp; e(y, u, \theta) = 0, &amp; \text{(governing PDE on $\Omega$)} \\
    &amp; l_{yu} \leq (y, u) \leq u_{yu}, &amp; \text{(functional bound constraints)} \\
    &amp; l_{\theta} \leq \theta \leq u_{\theta}, &amp; \text{(bound constraints)}
	\end{array}\)</p>

<p>The main challenges in modeling such a problem are to be able to discretize the domain and generate corresponding discretizations of the objective and constraints, and their evaluate derivatives with respect to all variables.
We use <a href="https://github.com/gridap/Gridap.jl">Gridap.jl</a> to define the domain, meshes, function spaces, and finite-element families to approximate unknowns, and to model functionals and sets of PDEs in a weak form. 
PDENLPModels extends <a href="https://github.com/gridap/Gridap.jl">Gridap.jl</a>’s differentiation facilities to also obtain derivatives useful for optimization, i.e., first and second derivatives of the objective and constraint functions with respect to controls and finite-dimensional variables.</p>

<p>After discretization of the domain $\Omega$, the integral, and the derivatives, the resulting problem is a nonlinear optimization problem.
PDENLPModels exports the <code class="language-plaintext highlighter-rouge">GridapPDENLPModel</code> type, an instance of an <code class="language-plaintext highlighter-rouge">AbstractNLPModel</code>, as defined in <a href="https://github.com/JuliaSmoothOptimizers/NLPModels.jl">NLPModels.jl</a>, which provides access to objective and constraint function values, to their first and second derivatives, and to any information that a solver might request from a model. 
The role of <a href="https://github.com/JuliaSmoothOptimizers/NLPModels.jl">NLPModels.jl</a> is to define an API that users and solvers can rely on. It is the role of other packages to implement facilities that create models compliant with the NLPModels API. We refer to <a href="https://juliasmoothoptimizers.github.io">juliasmoothoptimizers.github.io</a> for tutorials on the NLPModel API.</p>

<p>As such, PDENLPModels offers an interface between generic PDE-constrained optimization problems and cutting-edge optimization solvers such as Artelys Knitro via <a href="https://github.com/JuliaSmoothOptimizers/NLPModelsKnitro.jl">NLPModelsKnitro.jl</a>, Ipopt via <a href="https://github.com/JuliaSmoothOptimizers/NLPModelsIpopt.jl">NLPModelsIpopt.jl</a> , <a href="https://github.com/JuliaSmoothOptimizers/DCISolver.jl">DCISolver.jl</a>, <a href="https://github.com/JuliaSmoothOptimizers/Percival.jl">Percival.jl</a>, and any solver accepting an <code class="language-plaintext highlighter-rouge">AbstractNLPModel</code> as input, see <a href="https://juliasmoothoptimizers.github.io">JuliaSmoothOptimizers</a>.</p>

<h2 id="example">Example</h2>

<p>The following example shows how to solve a Poisson control problem with Dirichlet boundary conditions using <a href="https://github.com/JuliaSmoothOptimizers/DCISolver.jl"><code class="language-plaintext highlighter-rouge">DCISolver.jl</code></a>:
find functions $y \in H^1_0$ and $u \in H^1$ satisfying
\(\begin{array}{lll}
    \underset{y, u}{\text{minimize}} \int_{(-1,1)^2} \frac{1}{2}\|y_d - y\|^2 +\frac{\alpha}{2}\|u\|^2 d\Omega \quad \text{subject to} &amp; \Delta y - u - h = 0, &amp; \text{on } \Omega.\\
    &amp; y = 0, &amp; \text{on } \partial\Omega,
  \end{array}\)
for some given functions $y_d:(-1,1)^2 \rightarrow \mathbb{R}$ and $h:(-1,1)^2 \rightarrow \mathbb{R}$, and $\alpha &gt; 0$.</p>

<div class="language-julia highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">using</span> <span class="n">DCISolver</span><span class="x">,</span> <span class="n">Gridap</span><span class="x">,</span> <span class="n">PDENLPModels</span>
<span class="c"># Cartesian discretization of Ω=(-1,1)² in 100² squares.</span>
<span class="n">Ω</span> <span class="o">=</span> <span class="x">(</span><span class="o">-</span><span class="mi">1</span><span class="x">,</span> <span class="mi">1</span><span class="x">,</span> <span class="o">-</span><span class="mi">1</span><span class="x">,</span> <span class="mi">1</span><span class="x">)</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">CartesianDiscreteModel</span><span class="x">(</span><span class="n">Ω</span><span class="x">,</span> <span class="x">(</span><span class="mi">100</span><span class="x">,</span> <span class="mi">100</span><span class="x">))</span>
<span class="n">fe_y</span> <span class="o">=</span> <span class="n">ReferenceFE</span><span class="x">(</span><span class="n">lagrangian</span><span class="x">,</span> <span class="kt">Float64</span><span class="x">,</span> <span class="mi">2</span><span class="x">)</span> <span class="c"># Finite-elements for the state</span>
<span class="n">Xpde</span> <span class="o">=</span> <span class="n">TestFESpace</span><span class="x">(</span><span class="n">model</span><span class="x">,</span> <span class="n">fe_y</span><span class="x">;</span> <span class="n">dirichlet_tags</span> <span class="o">=</span> <span class="s">"boundary"</span><span class="x">)</span>
<span class="n">Ypde</span> <span class="o">=</span> <span class="n">TrialFESpace</span><span class="x">(</span><span class="n">Xpde</span><span class="x">,</span> <span class="n">x</span> <span class="o">-&gt;</span> <span class="mf">0.0</span><span class="x">)</span> <span class="c"># y is 0 over ∂Ω</span>
<span class="n">fe_u</span> <span class="o">=</span> <span class="n">ReferenceFE</span><span class="x">(</span><span class="n">lagrangian</span><span class="x">,</span> <span class="kt">Float64</span><span class="x">,</span> <span class="mi">1</span><span class="x">)</span> <span class="c"># Finite-elements for the control</span>
<span class="n">Xcon</span> <span class="o">=</span> <span class="n">TestFESpace</span><span class="x">(</span><span class="n">model</span><span class="x">,</span> <span class="n">fe_u</span><span class="x">)</span>
<span class="n">Ycon</span> <span class="o">=</span> <span class="n">TrialFESpace</span><span class="x">(</span><span class="n">Xcon</span><span class="x">)</span>
<span class="n">dΩ</span> <span class="o">=</span> <span class="n">Measure</span><span class="x">(</span><span class="n">Triangulation</span><span class="x">(</span><span class="n">model</span><span class="x">),</span> <span class="mi">1</span><span class="x">)</span> <span class="c"># Gridap's integration machinery</span>
<span class="c"># Define the objective function f</span>
<span class="n">yd</span><span class="x">(</span><span class="n">x</span><span class="x">)</span> <span class="o">=</span> <span class="o">-</span><span class="n">x</span><span class="x">[</span><span class="mi">1</span><span class="x">]</span><span class="o">^</span><span class="mi">2</span>
<span class="n">f</span><span class="x">(</span><span class="n">y</span><span class="x">,</span> <span class="n">u</span><span class="x">)</span> <span class="o">=</span> <span class="n">∫</span><span class="x">(</span><span class="mf">0.5</span> <span class="o">*</span> <span class="x">(</span><span class="n">yd</span> <span class="o">-</span> <span class="n">y</span><span class="x">)</span> <span class="o">*</span> <span class="x">(</span><span class="n">yd</span> <span class="o">-</span> <span class="n">y</span><span class="x">)</span> <span class="o">+</span> <span class="mf">0.5</span> <span class="o">*</span> <span class="mf">1e-2</span> <span class="o">*</span> <span class="n">u</span> <span class="o">*</span> <span class="n">u</span><span class="x">)</span> <span class="o">*</span> <span class="n">dΩ</span>
<span class="c"># Define the constraint operator in weak form</span>
<span class="n">h</span><span class="x">(</span><span class="n">x</span><span class="x">)</span> <span class="o">=</span> <span class="o">-</span><span class="n">sin</span><span class="x">(</span><span class="mi">7</span><span class="nb">π</span> <span class="o">/</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">x</span><span class="x">[</span><span class="mi">1</span><span class="x">])</span> <span class="o">*</span> <span class="n">sin</span><span class="x">(</span><span class="mi">7</span><span class="nb">π</span> <span class="o">/</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">x</span><span class="x">[</span><span class="mi">2</span><span class="x">])</span>
<span class="n">c</span><span class="x">(</span><span class="n">y</span><span class="x">,</span> <span class="n">u</span><span class="x">,</span> <span class="n">v</span><span class="x">)</span> <span class="o">=</span> <span class="n">∫</span><span class="x">(</span><span class="n">∇</span><span class="x">(</span><span class="n">v</span><span class="x">)</span> <span class="n">⊙</span> <span class="n">∇</span><span class="x">(</span><span class="n">y</span><span class="x">)</span> <span class="o">-</span> <span class="n">v</span> <span class="o">*</span> <span class="n">u</span> <span class="o">-</span> <span class="n">v</span> <span class="o">*</span> <span class="n">h</span><span class="x">)</span> <span class="o">*</span> <span class="n">dΩ</span>
<span class="c"># Define an initial guess for the discretized problem</span>
<span class="n">x0</span> <span class="o">=</span> <span class="n">zeros</span><span class="x">(</span><span class="n">num_free_dofs</span><span class="x">(</span><span class="n">Ypde</span><span class="x">)</span> <span class="o">+</span> <span class="n">num_free_dofs</span><span class="x">(</span><span class="n">Ycon</span><span class="x">))</span>
<span class="c"># Build a GridapPDENLPModel, which implements the NLPModel API.</span>
<span class="n">name</span> <span class="o">=</span> <span class="s">"Control elastic membrane"</span>
<span class="n">nlp</span> <span class="o">=</span> <span class="n">GridapPDENLPModel</span><span class="x">(</span><span class="n">x0</span><span class="x">,</span> <span class="n">f</span><span class="x">,</span> <span class="n">dΩ</span><span class="x">,</span> <span class="n">Ypde</span><span class="x">,</span> <span class="n">Ycon</span><span class="x">,</span> <span class="n">Xpde</span><span class="x">,</span> <span class="n">Xcon</span><span class="x">,</span> <span class="n">c</span><span class="x">,</span> <span class="n">name</span> <span class="o">=</span> <span class="n">name</span><span class="x">)</span>
<span class="n">dci</span><span class="x">(</span><span class="n">nlp</span><span class="x">,</span> <span class="n">verbose</span> <span class="o">=</span> <span class="mi">1</span><span class="x">)</span> <span class="c"># solve the problem with DCI</span>
</code></pre></div></div>

<h2 id="references">References</h2>

<blockquote>
  <p>Migot, T., Orban D., &amp; Siqueira A. S.
PDENLPModels.jl: A NLPModel API for optimization problems with PDE-constraints
Journal of Open Source Software 7(80), 4736 (2022).
<a href="https://doi.org/10.21105/joss.04736">10.21105/joss.04736</a></p>
</blockquote>]]></content><author><name>Tangi Migot</name></author><category term="programming" /><category term="Julia" /><category term="optimization" /><category term="PDE" /><category term="data science" /><category term="JOSS" /><summary type="html"><![CDATA[I am very happy to announce the publication in the Journal of Open Source Software of the paper PDENLPModels.jl: A NLPModel API for optimization problems with PDE-constraints.]]></summary></entry><entry><title type="html">A new package: FletcherPenaltySolver.jl</title><link href="https://tmigot.github.io/posts/2022/09/news/" rel="alternate" type="text/html" title="A new package: FletcherPenaltySolver.jl" /><published>2022-09-06T00:00:00-07:00</published><updated>2022-09-06T00:00:00-07:00</updated><id>https://tmigot.github.io/posts/2022/09/FPS</id><content type="html" xml:base="https://tmigot.github.io/posts/2022/09/news/"><![CDATA[<p>The package <a href="https://github.com/JuliaSmoothOptimizers/FletcherPenaltySolver.jl">FletcherPenaltySolver.jl</a> is now a Julia package !! Very happy about this one because it has been a long project and the solver with great for large problems. Besides, we always teach penalty methods at the University, but efficient implementations are scarce.</p>

<h2 id="algorithm">Algorithm</h2>

<p><code class="language-plaintext highlighter-rouge">FletcherPenaltySolver.jl</code> is a new Julia implementation of Fletcher’s penalty method, introduced in the ’70s, for equality-constrained nonlinear optimization models</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>min f(x)     s.t.     c(x) = 0.
</code></pre></div></div>

<p>where  $f:\mathbb{R}^n \rightarrow \mathbb{R}$ and  $h:\mathbb{R}^n \rightarrow \mathbb{R}^m$ are twice continuously differentiable.
Fletcher’s penalty method is an iterative method that aims to compute a local minimum using first and second-order derivatives.</p>

<p>Fletcher’s penalty method replaces the problem with a parametric bound-constrained optimization problem via Fletcher’s penalty function, whose local minimum can be found by any solver designed for such problems.
This function is also smooth under classical assumptions, and the penalty function is exact, i.e. local minimizers are minimizers of the penalty function for all values of the parameters sufficiently large. The main computational kernel for evaluating the penalty function and its derivatives is the solution of a certain saddle-point system. If the system matrix is available explicitly, we can factorize it once and reuse the factors to evaluate the penalty function and its derivatives. The penalty function can also be adapted to be factorization-free by solving the linear system iteratively.</p>

<p>It uses other <a href="https://juliasmoothoptimizers.github.io">JuliaSmoothOptimizers</a> packages for development.
In particular, <a href="https://github.com/JuliaSmoothOptimizers/NLPModels.jl">NLPModels.jl</a> is used for defining the problem, and <a href="https://github.com/JuliaSmoothOptimizers/SolverCore.jl">SolverCore.jl</a> for the output.</p>

<p>The algorithm is a regularized Fletcher’s penalty algorithm. For equality-constrained problems, the method iteratively solves an unconstrained problem. Any solver compatible with <a href="https://github.com/vepiteski/Stopping.jl">Stopping.jl</a> can be used. By default, we use <code class="language-plaintext highlighter-rouge">ipopt</code> from <a href="https://github.com/JuliaSmoothOptimizers/NLPModelsIpopt.jl">NLPModelsIpopt.jl</a> to solve the subproblem, but other solvers can be used such as <code class="language-plaintext highlighter-rouge">knitro</code> from <a href="https://github.com/JuliaSmoothOptimizers/NLPModelsKnitro.jl">NLPModelsKnitro.jl</a> or any solvers from <a href="https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl">JSOSolvers.jl</a>. The Stopping version of these solvers is available in <a href="https://github.com/SolverStoppingJulia/StoppingInterface.jl">StoppingInterface.jl</a>. If you have a solver that handles equality-constrained, it is also possible to solve linear equality constraints separately.</p>

<p>It uses <a href="https://github.com/JuliaSmoothOptimizers/LDLFactorizations.jl">LDLFactorizations.jl</a> by default to evaluate the derivatives of the penalized subproblem, but one can also use a matrix-free version with <a href="https://github.com/JuliaSmoothOptimizers/Krylov.jl">Krylov.jl</a>.</p>

<h2 id="installation">Installation</h2>

<p><code class="language-plaintext highlighter-rouge">pkg&gt; add FletcherPenaltySolver</code></p>

<h2 id="example">Example</h2>

<div class="language-julia highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">using</span> <span class="n">FletcherPenaltySolver</span><span class="x">,</span> <span class="n">ADNLPModels</span>

<span class="c"># Rosenbrock</span>
<span class="n">nlp</span> <span class="o">=</span> <span class="n">ADNLPModel</span><span class="x">(</span><span class="n">x</span> <span class="o">-&gt;</span> <span class="mi">100</span> <span class="o">*</span> <span class="x">(</span><span class="n">x</span><span class="x">[</span><span class="mi">2</span><span class="x">]</span> <span class="o">-</span> <span class="n">x</span><span class="x">[</span><span class="mi">1</span><span class="x">]</span><span class="o">^</span><span class="mi">2</span><span class="x">)</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="x">(</span><span class="n">x</span><span class="x">[</span><span class="mi">1</span><span class="x">]</span> <span class="o">-</span> <span class="mi">1</span><span class="x">)</span><span class="o">^</span><span class="mi">2</span><span class="x">,</span> <span class="x">[</span><span class="o">-</span><span class="mf">1.2</span><span class="x">;</span> <span class="mf">1.0</span><span class="x">])</span>
<span class="n">stats</span> <span class="o">=</span> <span class="n">fps_solve</span><span class="x">(</span><span class="n">nlp</span><span class="x">)</span>

<span class="c"># Constrained</span>
<span class="n">nlp</span> <span class="o">=</span> <span class="n">ADNLPModel</span><span class="x">(</span>
  <span class="n">x</span> <span class="o">-&gt;</span> <span class="mi">100</span> <span class="o">*</span> <span class="x">(</span><span class="n">x</span><span class="x">[</span><span class="mi">2</span><span class="x">]</span> <span class="o">-</span> <span class="n">x</span><span class="x">[</span><span class="mi">1</span><span class="x">]</span><span class="o">^</span><span class="mi">2</span><span class="x">)</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="x">(</span><span class="n">x</span><span class="x">[</span><span class="mi">1</span><span class="x">]</span> <span class="o">-</span> <span class="mi">1</span><span class="x">)</span><span class="o">^</span><span class="mi">2</span><span class="x">,</span>
  <span class="x">[</span><span class="o">-</span><span class="mf">1.2</span><span class="x">;</span> <span class="mf">1.0</span><span class="x">],</span>
  <span class="n">x</span><span class="o">-&gt;</span><span class="x">[</span><span class="n">x</span><span class="x">[</span><span class="mi">1</span><span class="x">]</span> <span class="o">*</span> <span class="n">x</span><span class="x">[</span><span class="mi">2</span><span class="x">]</span> <span class="o">-</span> <span class="mi">1</span><span class="x">],</span>
  <span class="x">[</span><span class="mf">0.0</span><span class="x">],[</span><span class="mf">1.0</span><span class="x">],</span>
<span class="x">)</span>
<span class="n">stats</span> <span class="o">=</span> <span class="n">fps_solve</span><span class="x">(</span><span class="n">nlp</span><span class="x">)</span>
</code></pre></div></div>

<h2 id="references">References</h2>

<blockquote>
  <p>Estrin, R., Friedlander, M. P., Orban, D., &amp; Saunders, M. A. (2020).
Implementing a smooth exact penalty function for equality-constrained nonlinear optimization.
SIAM Journal on Scientific Computing, 42(3), A1809-A1835.
<a href="https://doi.org/10.1137/19M1238265">10.1137/19M1238265</a></p>
</blockquote>

<h2 id="how-to-cite">How to Cite</h2>

<p>If you use FletcherPenaltySolver.jl in your work, please cite using the format given in <a href="https://github.com/JuliaSmoothOptimizers/FletcherPenaltySolver.jl/blob/main/CITATION.cff">CITATION.cff</a>.</p>]]></content><author><name>Tangi Migot</name></author><category term="programming" /><category term="Julia" /><category term="optimization" /><category term="PDE" /><category term="data science" /><category term="stopping" /><summary type="html"><![CDATA[The package FletcherPenaltySolver.jl is now a Julia package !! Very happy about this one because it has been a long project and the solver with great for large problems. Besides, we always teach penalty methods at the University, but efficient implementations are scarce.]]></summary></entry><entry><title type="html">JuliaSmoothOptimizers at the JuliaCon 2022</title><link href="https://tmigot.github.io/posts/2022/07/talk/" rel="alternate" type="text/html" title="JuliaSmoothOptimizers at the JuliaCon 2022" /><published>2022-07-30T00:00:00-07:00</published><updated>2022-07-30T00:00:00-07:00</updated><id>https://tmigot.github.io/posts/2022/07/juliacon</id><content type="html" xml:base="https://tmigot.github.io/posts/2022/07/talk/"><![CDATA[<p>I showed how to use JuliaSmoothOptimizers framework to PDE-constrained optimization problems modeled with <a href="https://github.com/JuliaSmoothOptimizers/PDENLPModels.jl">PDENLPModels.jl</a> at this year’s <a href="https://juliacon.org/2022">JuliaCon 2022/JuMP-dev 2022</a>. The conference featured three talks on JuliaSmoothOptimizers in the <a href="https://jump.dev/meetings/juliacon2022/">JuMP-dev</a> stream.</p>

<p>Dominique Orban gave a complete overview in 25 minutes (!!) of the JuliaSmoothOptimizers organization. The talk mentions all the key packages to model optimization problems (<a href="https://github.com/JuliaSmoothOptimizers/NLPModels.jl">NLPModels.jl</a> &amp; Co), solve models (<a href="https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl">JSOSolvers.jl</a> &amp; Co) and do simple yet amazing benchmarks with <a href="https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl">SolverBenchmark.jl</a>.</p>

<p>Geoffroy Leconte presented <a href="https://github.com/JuliaSmoothOptimizers/RipQP.jl">RipQP.jl</a> a multi-precision algorithm for convex quadratic optimization. The multi-precision feature illustrates the strength of pure Julia implementations, and ensuing performance.</p>

<p>You can re-watch the three talks on Youtube:</p>
<ul>
  <li><a href="https://www.youtube.com/watch?v=4xVOfMZwZMA">A multi-precision algorithm for convex quadratic optimization</a></li>
  <li><a href="https://www.youtube.com/watch?v=p5Z5QGOUZhE">The JuliaSmoothOptimizers (JSO) Organization</a>.</li>
  <li><a href="https://www.youtube.com/watch?v=BvReBcMyujQ">PDE-constrained optimization using JuliaSmoothOptimizers</a>.</li>
</ul>]]></content><author><name>Tangi Migot</name></author><category term="programming" /><category term="Julia" /><category term="PDE" /><category term="optimization" /><category term="talk" /><summary type="html"><![CDATA[I showed how to use JuliaSmoothOptimizers framework to PDE-constrained optimization problems modeled with PDENLPModels.jl at this year’s JuliaCon 2022/JuMP-dev 2022. The conference featured three talks on JuliaSmoothOptimizers in the JuMP-dev stream.]]></summary></entry></feed>