Hi
I am using the C Interface of HPIPM (without ACADOS). I need to model 3 path constraints with corresponding soft constraints. Unfortunately I struggle to find a documentation on how to set up the formulation for the variable idxs.
for (unsigned int i{ 0 }; i < N + 1; ++i)
{
ng[i] = 3;
C[i] = [3x3]; // C Matrix defines the path constraints
D[i] = [3x3]; // D Matrix defines the path constraints
lg[i] = [..., ..., ...]; // lg defines the lower bounds on the path constraints
ug[i] = [..., ..., ...]; // ug defines the upper bounds on the path constraints
nsbu[i] = 0; // no slacks for control variables
nsbx[i] = 0; // no slacks for state variables
nsg[i] = 3; // slacks for each of the three path constraints
idxs[i] = [???, ???, ???]; // HOW can I define this variable?
}
Thank you very much for your reply.
The documentation of the python acados interface says:
idxs → Indices of soft nonlinear constraints within the indices of nonlinear constraints.
for (unsigned int i{ 0 }; i < N + 1; ++i)
{
ng[i] = 3;
C[i] = [3x3]; // C Matrix defines the path constraints
D[i] = [3x3]; // D Matrix defines the path constraints
lg[i] = [..., ..., ...]; // lg defines the lower bounds on the path constraints
ug[i] = [..., ..., ...]; // ug defines the upper bounds on the path constraints
nsbu[i] = 0; // no slacks for control variables
nsbx[i] = 0; // no slacks for state variables
nsg[i] = 3; // slacks for each of the three path constraints
idxs[i] = [0 + (nbu[i] + nbx[i]), 1 + (nbu[i] + nbx[i]), 2 + (nbu[i] + nbx[i])];
}
The ordering is u, x, g ?
I guess there is no other way of formulating this OCP using the low level interface of HPIPM.