From: Rox W on
I've been using the version of differential evolution for matlab from the DE site:
http://www.icsi.berkeley.edu/~storn/code.html#matl

Up until now I've been working without inequality constraints (only bound).
I was wondering if anyone was familiar with how to apply inequality constraints in this algorithm.

I believe the function in which to apply it would be fminobj, which contains the following info:

% Function: S_MSE= objfun(FVr_temp, S_struct)
% Author: Rainer Storn
% Description: Implements the cost function to be minimized.
% Parameters: FVr_temp (I) Paramter vector
% S_Struct (I) Contains a variety of parameters.
% For details see Rundeopt.m
% Return value: S_MSE.I_nc (O) Number of constraints
% S_MSE.FVr_ca (O) Constraint values. 0 means the constraints
% are met. Values > 0 measure the distance
% to a particular constraint.
% S_MSE.I_no (O) Number of objectives.
% S_MSE.FVr_oa (O) Objective function values.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----strategy to put everything into a cost function------------
S_MSE.I_nc = 0;%no constraints
S_MSE.FVr_ca = 0; %no constraint array
S_MSE.I_no = 1;%number of objectives (costs)
S_MSE.FVr_oa(1) = F_cost;

I have:
S_MSE.I_nc = 1;%no constraints
S_MSE.FVr_ca = [(sigma_exp(100) - (sigma_th(100)))]<=0.01; %no constraint array

What happens is that the program just runs as usual and essentially completely ignores my constraint. I'm not sure what the problem is. So if anyone has any insight, it would be greatly appreciated.

Thank you :)