98 casadi_int* sz_iw, casadi_int* sz_w) {
100 *sz_arg = *sz_res = 0;
103 *sz_w += p->
nx + p->
ng;
104 *sz_w += p->
nx + p->
ng;
105 *sz_w += p->
nx + p->
ng;
106 *sz_w += p->
nx + p->
ng;
126 template<
typename T1>
128 casadi_int** iw, T1** w) {
135 d->
z = *w; *w += nx + ng;
136 d->
lbz = *w; *w += nx + ng;
137 d->
ubz = *w; *w += nx + ng;
138 d->
lam = *w; *w += nx + ng;
157 template<
typename T1>
163 casadi_int nx = p_nlp->
nx;
164 d_bounds->
arg[0] = d_nlp->
p;
165 d_bounds->
res[0] = d_bounds->
a;
166 d_bounds->
res[1] = d_bounds->
b;
170 for (casadi_int i=0;i<p_bounds->
nb;++i) {
171 if (d_bounds->
a[i]==0) {
172 casadi_int k = p_bounds->
target_g[i];
173 if (d_nlp->
lbg[k]>d_bounds->
b[i])
return 1;
174 if (d_nlp->
ubg[k]<d_bounds->
b[i])
return 1;
178 T1* lbz = d_nlp->
lbz+nx;
179 T1* ubz = d_nlp->
ubz+nx;
180 T1* lam = d_nlp->
lam+nx;
182 for (casadi_int i=0;i<nx;++i) {
187 for (casadi_int i=0;i<nx;++i) {
194 for (casadi_int i=0;i<p_bounds->
ng;++i) {
198 T1 lb = (d_nlp->
lbg[i]-d_bounds->
b[k])/d_bounds->
a[k];
199 T1 ub = (d_nlp->
ubg[i]-d_bounds->
b[k])/d_bounds->
a[k];
200 if (d_bounds->
a[k]<0) {
205 casadi_int j = p_bounds->
target_x[k];
207 if (lb==d_nlp->
lbz[j]) {
209 }
else if (lb>d_nlp->
lbz[j]) {
215 if (ub==d_nlp->
ubz[j]) {
217 }
else if (ub<d_nlp->ubz[j]) {
227 *lbz++ = d_nlp->
lbg[i];
228 *ubz++ = d_nlp->
ubg[i];
234 for (casadi_int i=0;i<nx;++i) {
241 template<
typename T1>
246 casadi_int nx = p_nlp->
nx;
248 casadi_fill(d_nlp->
lam_x, nx, 0.);
249 casadi_fill(d_nlp->
lam_g, p_bounds->
ng, 0.);
252 casadi_int k_normal = 0;
253 for (casadi_int i=0;i<p_bounds->
ng;++i) {
255 casadi_int j = p_bounds->
target_x[k];
256 if (d_nlp->
g) d_nlp->
g[i] = d_bounds->
a[k]*d_nlp->
z[j]+d_bounds->
b[k];
259 if (d_nlp->
g) d_nlp->
g[i] = d_nlp->
z[nx+k_normal];
265 for (casadi_int i=0;i<nx;++i) {
281 for (casadi_int i=0;i<p_bounds->
ng;++i) {
283 if (d_nlp->
lam_g) d_nlp->
lam_g[i] /= d_bounds->
a[k];
const casadi_nlpsol_prob< T1 > * prob
casadi_oracle_data< T1 > * oracle
casadi_nlpsol_detect_bounds_data< T1 > detect_bounds
const casadi_int * target_g
int(* callback)(const T1 **arg, T1 **res, casadi_int *iw, T1 *w, void *callback_data)
const casadi_int * target_x
casadi_nlpsol_detect_bounds_prob< T1 > detect_bounds