MATLAB: How to perform an optimization with constraints that are interdependent

constraintsglobal optimization

I have a need to perform an optimization (using the Global Optimization Toolbox) where the optimization parameters are interdependent. One parameter p may vary in the interval (0, v] where v is some user defined max value. The second parameter s may vary in the interval [0, p]. s may vary up to v but only if it is less than p. How would I apply this type of constraint when using the Global Optimization Toolbox?
Using MATLAB 2015b on Windows 7 Professional

Best Answer

[0 v] can be done through lower bound 0, upper bound v. Use that for both parameters. Then s in 0 to p can be done as a linear constraint that 1 * s + (-1) * p <= 0 . If you need a strict inequality then make the upper limit -eps(realmin) as that is the least-negative representable negative number.