suggest a method/algorithm to solve Combinatorial optimization

조회 수: 2 (최근 30일)
ANUBHAV Goel
ANUBHAV Goel 2020년 12월 17일
댓글: ANUBHAV Goel 2020년 12월 21일
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
Bruno Luong
Bruno Luong 2020년 12월 19일
편집: Bruno Luong 2020년 12월 19일
There are 6*3*5 = 90 combinations, can't you just evaluate them all then pick the best?

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 12월 17일
편집: Ameer Hamza 2020년 12월 17일
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
Ameer Hamza
Ameer Hamza 2020년 12월 21일
"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 2020년 12월 21일
Thanks a lot for sharing knowledge and your time..

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by