%% computeConstraintIndices
% Computes the indices of the individual constraint functions.
%
%% Syntax
%
% <html>
%        <div class="syntax">
% obj = computeConstraintIndices(obj,X,U) <br>
%        </div>
% </html>
%
%% Description
% To formulate the optimal control problem (OCP) in the generic form
% of a nonlinear programming problem, i.e.,
% min f(y) s.t. lb <= g(y) <= ub,
% the equality and inequality constraints have to be lumped into a
% single vector-valued fuction. To, e.g., easily access the value of
% individual constraint functions, this function computes the indices
% of the entries storing the value of the respective constraint
% function.
% These indices are stored in the property idxCon - a structure with
% the following fields:
% .initState:     initial state constraint
% (integer array of dimension [obj.nx,1])
% .dynamics:      dynamic feasibility
% (integer array of dimension [obj.nx,obj.N])
% .bu:            admissibility of the control inputs
% (integer array of dimension [U.dim,obj.N])
% .bx:            admissibility of the states
% (integer array of dimension [X.dim,obj.N+1])
% .nIneqCon:      number of inequality constraints
% (integer)
% .nEqCon:        number of equality constraints
% (integer)
% .nCon:          total number of constraints
% (integer)
%
%% 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">
%            obj
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            instance of class optimalControl
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            X
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            set of admissible states
%            (class: polytope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            U
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            set of admissible control inputs
%            (class:polytope)
%        </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">
%            obj
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            updated instance of class optimalControl
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% See Also
% <optimalControlhelp.html |optimalControl|>
%

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