[Bonmin] Constraints order and Solution
Edson Cordeiro do Valle
edsoncv at enq.ufrgs.br
Wed Jun 25 14:41:42 EDT 2008
Hello all
If I run the cpp example that comes with Bonmin trunk, with
constraints written int the following way:
-inf <= g(x) <= constant
g_l[0] = -DBL_MAX;
g_u[0] = 1./4.;
g_l[1] = -DBL_MAX;
g_u[1] = 0;
g_l[2] = -DBL_MAX;
g_u[2] = 2;
g[0] = (x[1] - 1./2.)*(x[1] - 1./2.) + (x[2] - 1./2.)*(x[2] - 1./2.);
g[1] = x[0] - x[1];
g[2] = x[0] + x[2] + x[3];
I got the optimal with obj function at -2.5
and if I write the above constraint of the following way:
0 <= -g(x) + const <= inf
g_l[0] = 0;
g_u[0] = DBL_MAX;
g_l[1] = 0;
g_u[1] = DBL_MAX;
g_l[2] = 0;
g_u[2] = DBL_MAX;
g[0] = -1*((x[1] - 1./2.)*(x[1] - 1./2.) + (x[2] - 1./2.)*(x[2] -
1./2.)-1/4);
g[1] = -1*(x[0] - x[1]);
g[2] = -1*(x[0] + x[2] + x[3]-2);
I got the optimal with obj function at -1.0
For me this both formulations are similar, aren't they?
Any clue for this behavior?
Thanks
--
Edson C. do Valle
edsoncv at enq.ufrgs.br
Skype: edson.cv
More information about the Bonmin
mailing list