Minimize mean, but also set a constraint on the standard deviation

7 views (last 30 days)
I have the following global optimization problem setup (please note that this is a simplification):
%constraints:
Aeq = [1 1 1];
beq = 1;
lb = .10 * [1 1 1];
ub = .8 * [1 1 1];
w = [weight1, weight2, weight3];
wstart = randn(3,1);
options = optimset('Algorithm','interior-point');
% function handle for the objective function (note that variables
% aa through hh are additional parameters that the solver does not modify):
h = @(w)NameOfFunction(w(1),w(2),w(3), aa, bb, cc, dd, ee, ff, gg, hh);
% problem structure:
problem = createOptimProblem('fmincon','x0',wstart,'objective',h,...'
'Aeq',Aeq,'beq',beq,'options',options,'lb',lb,'ub',ub);
gs = GlobalSearch;
run(gs,problem)
My objective function (NameOfFunction) uses the three decision variables (w(1), w(2), and w(3)) to generate a vector containing 180 values. The function then calculates and returns the mean of these values (the mean is the value I am minimizing).
I would like to add an additional constraint into the optimization that sets the standard deviation of the vector containing the 180 values to be less than some specific number. In addition, I would like to set a constraint on the maximum value any of the 180 members can take on. I have been unable to figure out how to do this. Any help would be greatly appreciated.

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 16 Jul 2013
  3 Comments
Anthony
Anthony on 16 Jul 2013
Thank you. I think that got me to what I needed. I have a follow-up question. How would I implement a constraint on the minimum value that any member of the 180-member vector can take on (rather than on the standard deviation)?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!