[Ipopt] Problem in using IPOPT.

Keven Xie ke.xie at tu-ilmenau.de
Sat Aug 23 09:17:46 EDT 2008


Hi, dear sir,
now I use IPOPT to solve a problem with my own routine:
void trans_x2z(double *x, double *z, double *dzdx).
It calculates the nonlinear vector function z=func(x) and the jacobian dz/dx.

I simplify my problem as following and send you the codes as attachment.

1,primal variables x=[x1, x2, x3, x4]'(a 4*1 vector);
2,intermediate variables z=[z1, z2]' (2*1 vector);
3,the jacobian dzdx=[dz1/dx, dz2/dx]' (2*4 matrix);

A,objfun: f(x, func(x))=f(x,z)= x4 + z2;
B,gradient of objfun: 1*4 vector: grad_f(x,z)= dx4/dx + dz2/dx
   = [0,0,0,1] + dz2/dx;
C,constraints functions (only 1): g1(x,z): 0<=z1<=1;
D,jacobian of g: jac_g= dz1/dx;

My routine is tested to be stable and right( using SNOPT with Matlab interface).
In IPOPT I am not sure where and how to call my routine to garantee the real
updated x as input.
I find that IPOPT call its functions in every iteration sequentially(CADB),so in
my code, my routine is called in C(eval_g). In this way it comes out the falsh
result. The same happens when it is called simultanously in A(eval_f) and
B(eval_grad_f). And it is impossible to call the function in D(eval_jac_g),
why?
When the start value is changed, it leads to indefine iteration or a too small
step size.
Could you have a look on my code and give me some cluds?
Regards
Keven Xie





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example_ipopt.cpp
Type: application/octet-stream
Size: 4898 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/ipopt/attachments/20080823/6ecec860/attachment.obj 


More information about the Ipopt mailing list