Hi.(adsbygoogle = window.adsbygoogle || []).push({});

This is just a general question about a problem I think I'm having. If I have a function f(x1,x2,x3) and I want to find it's global minimum for x1>0,x2>0,x3>0 using unconstrained minimization, I've read that I can use a penalty function to make the function increase monotonically if any of the variables become less than 0. This way a minimum will never be found below 0.

BUT what if f(...) is decreasing at the time when (for instance) x1 goes below zero? Then I've created a valley in my function that is not supposed to be there, and the optimization routine thinks this is the minimum. At least I suspect.

Is this not a general problem with penalty functions?

Regards,

Anders

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Penalty Function

**Physics Forums | Science Articles, Homework Help, Discussion**