I'm trying to create a convex optimization code in Matlab , to deal with inequality constraints I'm using logarithmic barrier.Suppose we have inequality $g(x) =< 0$ to satisfy,so I define $\varphi (x) = -log(-g(x))$,What if in an iteration $g(x)$ becomes positive? as $\varphi$ is not defined when $g(x) > 0$ ,the algorithm stuck in that $x$,I tried the code segment bellow but sometimes it cause the code to stuck in this" while" for ever:(beta is line search parameter)

while (g(x+ s*delta) > 0),
     s = BETA*s;
end % first get feasible point ... then search minimum

Do you have any idea how to deal with this?

  • $\begingroup$ If $g(x)\geq 0$ then there is definitely no way to exit that loop. So the point is that $g(x)$ itself must always be negative. Your code has to explicitly ensure that is the case before you even get here. Unfortunately we don't have context here. $\endgroup$ – Michael Grant Mar 23 '18 at 14:06
  • $\begingroup$ @MichaelGrant So you mean defining logarithmic barrier is not enough to force $g(x)$ remain negative,and I have to take care of this before I even define logarithmic barrier am I right?If that's not the point can you give me some more hints? $\endgroup$ – MAh2014 Mar 23 '18 at 14:59
  • $\begingroup$ That's correct. You still have to take explicit steps in your code to make sure that $g(x)$ stays positive. $\endgroup$ – Michael Grant Mar 23 '18 at 15:00
  • $\begingroup$ @MichaelGrant Thank you so much for your hint. $\endgroup$ – MAh2014 Mar 23 '18 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.