Hi all! I'm writing a model that needs to minimize 6 variables through FMINCON: o, a, b, w, kappa, gamma. The variable options is defined as follows:
The variables are already subject to the following lower/upper boundaries:
- o, a, b, w between 0 and Inf;
- kappa, gamma strictly positive between (2 * options.TolCon) and Inf;
I need to ensure a few constraints are respected:
- o, a, b, w must approximately sum to 1;
- kappa * gamma must be approximately equal to 1;
If I didn't have to consider the last two variables, I would have probably used A and b parameters of FMINCON as follows:
A = [-eye(3); ones(1,3)];
b = [(zeros(3,1) + (2 * options.TolCon)); (1 - (2 * options.TolCon))];
But going for that approach with two distinct constraints (an additive one and a multiplicative one) is pretty weird and I really have no clue about how to set A and b.
It seems that the nonlcon parameter may be what I'm looking for, but it's unclear to me how to formulate it properly.