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;
159 template<
typename T1>
165 casadi_int nx = p_nlp->
nx;
166 d_bounds->
arg[0] = d_nlp->
p;
167 d_bounds->
res[0] = d_bounds->
a;
168 d_bounds->
res[1] = d_bounds->
b;
172 for (casadi_int i=0;i<p_bounds->
nb;++i) {
173 if (d_bounds->
a[i]==0) {
174 casadi_int k = p_bounds->
target_g[i];
175 if (d_nlp->
lbg[k]>d_bounds->
b[i])
return 1;
176 if (d_nlp->
ubg[k]<d_bounds->
b[i])
return 1;
180 T1* lbz = d_nlp->
lbz+nx;
181 T1* ubz = d_nlp->
ubz+nx;
182 T1* lam = d_nlp->
lam+nx;
184 for (casadi_int i=0;i<nx;++i) {
189 for (casadi_int i=0;i<nx;++i) {
196 for (casadi_int i=0;i<p_bounds->
ng;++i) {
199 T1 lb = (d_nlp->
lbg[i]-d_bounds->
b[k])/fabs(d_bounds->
a[k]);
200 T1 ub = (d_nlp->
ubg[i]-d_bounds->
b[k])/fabs(d_bounds->
a[k]);
201 casadi_int j = p_bounds->
target_x[k];
203 if (lb==d_nlp->
lbz[j]) {
205 }
else if (lb>d_nlp->
lbz[j]) {
211 if (ub==d_nlp->
ubz[j]) {
213 }
else if (ub<d_nlp->ubz[j]) {
223 *lbz++ = d_nlp->
lbg[i];
224 *ubz++ = d_nlp->
ubg[i];
230 for (casadi_int i=0;i<nx;++i) {
237 template<
typename T1>
242 casadi_int nx = p_nlp->
nx;
244 casadi_fill(d_nlp->
lam_x, nx, 0.);
245 casadi_fill(d_nlp->
lam_g, p_bounds->
ng, 0.);
248 casadi_int k_normal = 0;
249 for (casadi_int i=0;i<p_bounds->
ng;++i) {
251 casadi_int j = p_bounds->
target_x[k];
252 if (d_nlp->
g) d_nlp->
g[i] = d_bounds->
a[k]*d_nlp->
z[j]+d_bounds->
b[k];
255 if (d_nlp->
g) d_nlp->
g[i] = d_nlp->
z[nx+k_normal];
261 for (casadi_int i=0;i<nx;++i) {
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