%% updateTrustRegion
% updates the trust region according to the rules
%proposed in [1, Appendix II].
%
%% Syntax
%
% <html>
%        <div class="syntax">
% opts = updateTrustRegion(termReg_init,termReg_opt,var_exploitTR,opts) <br>
%        </div>
% </html>
%
%% Description
% Given the solution of the convex program proposed in [1], this
% function updates the trust region for the successive
% convexification approch according to the rules in [1, Appendix II].
% The goal is to ensure that the value of the parameterized
% approximation of the abstraction error is sufficiently close to its
% true value.
%
%% Input Arguments
%
% <html>
% <table cellspacing="0" cellpadding="4" width="" border="1" frame="box" rules="none" class="">
% <tbody valign="top">
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            termReg_init
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            initial guess for the terminal region
%            (class: zonotope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            termReg_opt
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            updated candidate for the terminal region
%            (class: zonotope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            var_exploitTR
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            scalar indicating (/over-approximating) the
%            exploited share of the trust region
%            (class: double)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%             opts
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            structure containing the algorithm settings
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% Output Arguments
%
% <html>
% <table cellspacing="0" cellpadding="4" width="" border="1" frame="box" rules="none" class="">
% <tbody valign="top">
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%             opts
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            structure containing the (updated) trust region
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% See also
% <terminalRegionhelp.html |terminalRegion|>, <termRegNonlinSysLinApproachhelp.html |termRegNonlinSysLinApproach|>
%
%% References
% [1] L. Schäfer et al. "Scalable Computation of Robust Control
% Invariant Sets of Nonlinear Systems", 2023, IEEE Transactions
% on Automatic Control
% [2] M. Althoff et al. "Reachability Analysis of Nonlinear Systems
% with Uncertain Parameters using Conservative Linearization",
% 2008 47th IEEE Conference on Decision and Control, 2008,
% pp. 4042-4048
%

%%
% <html>
%   <hr>
%   <p class="copy">&copy; 2018-2026 I6 Technische Universit&auml;t M&uuml;nchen
%        <tt class="minicdot">&#149;</tt>
%        <a href="https://tumcps.github.io/AROC/">Website</a>
%        <tt class="minicdot">&#149;</tt>
%        <a href="file:txts/LICENSE.txt">License</a>
%   </p>
% <div>
% <table>
%  <tr>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%             <img src="img/logoAroc.png" alt="logoAroc" height="40px">
%      </td>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%      <img src="img/logoCora.png" alt="logoCora" height="40px"></td>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%      <img src="img/logoChair.png" alt="logoChair" height="40px"></td>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%      <img src="img/logoTum.png" alt="logoTum" height="40px"></td>
%  </tr>
% </table>
% </div>
% </html>
