Hello,
I want to run an optimisation using surrogateopt and I have the constraint, that certain parameters can't be smaller than others. So, I guess for other methods my constraint function would look like this (?):
params = [param1, param2, param3, param4]
function [c, ceq] = simple_constraint(params)
c = [params(2)-params(1);
As far as I understood in surrogateopt the constraints are set in the objective function.
What is the best way to implement these parameter constraints which are independent of the objective function value?
Just setting and arbitrary high value as value of the objective function? So, something like this:
function f = objFun_surrogateopt(param)
if params(2)> params(1) || params(4) > params(3)
f.Ineq = [params(2)-params(1);
Or is there a smarter and more efficient way?
I'm looking forward to any hint on how to improve this!