%% cvx_zonoContSoftConstraint
% implements the constraint functions encoding
% the (softened) sufficient conditions for zonotope containment.
%
%% Syntax
%
% <html>
%        <div class="syntax">
% [cEq,cIneq] = cvx_zonoContSoftConstraint(cIn,GIn,cOut,GOut,Gamma,gamma,Gamma_abs,gamma_abs,ub,slack) <br>
%        </div>
% </html>
%
%% Description
% This function implements the sufficient conditions for zonotope
% containment from [2, Corollary 4] in the softened version presented
% in [1, Remark 4], i.e.
% GIn = Gout*Gamma
% cOut - cIn = GOut*gamma
% norm([gamma, Gamma],|'inf'|) <= ub + slack
% slack >= 0
% The input argument ub can either be a vector full of ones (for
% fixed circumbodies zonotope(cOut,Gout), see [2, Corollary 4]) or a
% vector of generator scaling factors for variable circumbodies of
% the form zonotope(cOut,Gout*diag(ub)), see [1, Remark 4]).
% The output arguments are in the form
% Ceq = 0, cIneq >= 0.
%
%% 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">
%            cIn
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            center of the inbody
%            (double array of dimension [nx,1])
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            GIn
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            generator matrix of the inbody
%            (double array)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            cOut
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            center of the inbody
%            (double array of dimension [nx,1])
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            GOut
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            generator matrix of the inbody
%            (double array)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            Gamma
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            auxiliary variable
%            (double array of dimension [size(GOut,2),size(GIn,2)])
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            gamma
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            auxiliary variable
%            (double array of dimension [size(GOut,2),1])
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            Gamma_abs
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            absolute value of Gamma
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            gamma_abs
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            absolute value of gamma
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            ub
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            upper bound in the norm condition
%            (double array of dimension [size(GOut,2),1])
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            slack
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            slack variable to soften upper bound in the norm
%            condition
%            (double array of dimension [size(GOut,2),1])
%        </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">
%            cEq
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            constraint functions of the equality constraints
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            cIneq
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            constraint functions of the inequality constraints
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% See Also
% <matlab:doc('-') ->
%
%% References
% [1] L. Schäfer et al. "Scalable Computation of Robust Control
% Invariant Sets of Nonlinear Systems", in IEEE Transactions
% on Automatic Control, vol. 69, no. 2, pp. 755-770, 2024
% [2] S. Sadraddini and R. Tedrake, "Linear Encodings for Polytope
% Containment Problems," IEEE Conference on Decision and Control,
% 2019, pp. 4367-4372.
%

%%
% <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>
