suggest a method/algorithm to solve Combinatorial optimization

3 vues (au cours des 30 derniers jours)
ANUBHAV Goel
ANUBHAV Goel le 17 Déc 2020
Commenté : ANUBHAV Goel le 21 Déc 2020
I have three different set of variables
SC=[a,b,c,d,e,f]; % each option a, b, etc are actually temperature dependent and can be evaluated using empirical correaltions
AM=[p;q;r]; % each option p,q, etc are actually temp dependent and can be evaluated using empirical correaltions
HF=[m,n,x,y,z]; % each option m,n, etc are actually temp dependent and can be evaluated using empirical correaltions
, need to choose a best combination by picking one option from each set such that the resulting combination maximizes the efficiency
efficiency is the evaluated by putting value of these variables in a mathematical model.
Which opimization technique/algorithm can solve such problem.
Please suggest.
Thanks a lot.
  1 commentaire
Bruno Luong
Bruno Luong le 19 Déc 2020
Modifié(e) : Bruno Luong le 19 Déc 2020
There are 6*3*5 = 90 combinations, can't you just evaluate them all then pick the best?

Connectez-vous pour commenter.

Réponse acceptée

Ameer Hamza
Ameer Hamza le 17 Déc 2020
Modifié(e) : Ameer Hamza le 17 Déc 2020
I don't think there is a function in MATLAB that operate on a list of optimization variables. The closest possible option is to use the optimizer to generate the index of these variables. Only ga() and surrogateopt() will work for nonlinear integer optimization.
For example, consider this
SC = [1 2 3 4 5 6];
AM = [1 2 3];
HF = [5 4 3 2 1];
lb = [1 1 1];
ub = [6 3 5]; % upper bound for indexes
sol = ga(@(x) objFun(x, SC, AM, HF), 3, [], [], [], [], lb, ub, [], 1:3)
SC_sol = SC(sol(1))
AM_sol = AM(sol(2))
HF_sol = HF(sol(3))
function y = objFun(ind, SC, AM, HF)
y = myModel(SC(ind(1)), AM(ind(2)), HF(ind(3)));
end
function y = myModel(sc, am, hf)
y = sc + am + hf;
end
However, I guess surrogateopt() is more appropriate here, since it is explicitly defined for "time-consuing objective function"
SC = [1 2 3 4 5 6];
AM = [1 2 3];
HF = [5 4 3 2 1];
lb = [1 1 1];
ub = [6 3 5]; % upper bound for indexes
opts = optimoptions('surrogateopt', 'PlotFcn', '');
sol = surrogateopt(@(x) objFun(x, SC, AM, HF),lb, ub, 1:3, opts)
SC_sol = SC(sol(1))
AM_sol = AM(sol(2))
HF_sol = HF(sol(3))
function y = objFun(ind, SC, AM, HF)
y = myModel(SC(ind(1)), AM(ind(2)), HF(ind(3)));
end
function y = myModel(sc, am, hf)
y = sc + am + hf;
end
  4 commentaires
Ameer Hamza
Ameer Hamza le 21 Déc 2020
"Here, objective function (efficiency) is not directly dependent on the mentioned variables. choice of these variables influence the calculation of intermediate terms required to evaluate the efficiency and thus indirectly influence the objective function."
Yes, because if you study the optimization problem in my answer, you can see that the algorithm controls the indexes, which are even less relevant to the objective function compared to your variables. I would even say that using an optimizer like this is no better than running an exhaustive search using all the possible values. I don't think there is a direct link between indexes and the objective function value, which an optimizer can exploit. But if such a link exist, these optimizers will exploit it.
ANUBHAV Goel
ANUBHAV Goel le 21 Déc 2020
Thanks a lot for sharing knowledge and your time..

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by