Constraint on objective value
a-jp opened this issue · 7 comments
Hi,
I'm used to using ipopt for minimisation problems that additionally have constraints as part of the problem. Now I'd like to minimise an objective function subjective to the objective itself being required to be >=0. That is to say the variables must be found while minimising an objective but the objective itself only means something if its value is >=0. Can I have a constraint on the objective? Is a normal constraint that just enforces this the way to do it? I think my confusion is that my constraints normally relate to the variables or some other function that must be satisfied but here the constraint is to be enforced on the objective itself. Any help and thoughts welcome.
Thanks
Andy
You could do some min z s.t. z = f(x), z >= 0, where f(x) is your original objective function. I cannot really say whether that gives some numerical problems. Or you run it once without bound on the objective function and if it turns out to give feasible solutions with f(x) < 0, then run again without objective function but constraint f(x)=0.
Thanks for the idea. Should I read into this, that what I'm trying is ill defined, just not something commonly done, or something else?
It would help me to understand where to look if I could get an idea of whether this was valid? What is it called in the literature? Am I trying something unstable?
Many thanks
Andy
Just to follow up to make sure I'm not missing something. Is there any reason I can't just do min f(x) s.t f(x) >=0 ? As in, what is the f(x)=z constraint giving?
Just want to make sure I'm not missing something here.
Constraint qualifications and objective parallelisms are the keywords to look for.
There are only a few possibilities on the table to do what you try to do, so I would suggest to just try them all and see what works best in practice.
Just to follow up to make sure I'm not missing something. Is there any reason I can't just do min f(x) s.t f(x) >=0 ? As in, what is the f(x)=z constraint giving?
Just want to make sure I'm not missing something here.
Thanks for the key words I really appreciate that. Did you have a comment on the above? That seems quite specific, not sure I understand the difference. Thanks
You can also try min f(x) s.t f(x) >=0. Ipopt will internally handle this as min f(x) s.t. f(x) = z, z >= 0. Replacing the f(x) by z in the objective looks to me less nonlinear. I'm not sure what will happen.
Ok thanks. Do you know of a typical test problem that's posed like this (constrained objective) such that I can show which ipopt solution is better against that test problem before trying my problem?; mainly for me because it will be significant work to undertake this so would be nice to know I'm heading in the right direction. Thanks again