Adding spesific constraint for optimization problem in MATLAB usin fmincon function

1 vue (au cours des 30 derniers jours)
omer faruk gemici
omer faruk gemici le 28 Juin 2018
Modifié(e) : Matt J le 2 Juil 2018
I'm using the fmincon Function of Matlab to find an optimal solution of power assignments of users in a communication system.
An example scenario includes 3 users and the optimization function tries to find optimal power level assignment. The 'x' variable represents the power level assignments of each users.
Total power is equal to 1 and added as Linear equality constraint for the problem. Aeq*x=beq.
The lower bound and upper bound of each user power level is 0 and 1 consecutively.
The script below solves this optimization problem clearly and gives optimal power levels for all three users.
x0=[0.3,0.2,0.5];
lb=[0 0 0];
ub=[1 1 1];
Aeq = [1,1,1];
beq = [1];
options = optimoptions('fmincon','Algorithm','interior-point','Display','iter');
[x,fval,exitflag,output] = fmincon(@myOpt,x0,[],[],Aeq,beq,lb,ub,[],options);
-----------------------------------------------------------------------------
Here is my question.
I want to add a constraint that maximum two users can be assigned power level at the same time (i.e., x1=[0.1,0.9,0], x2=[0.2,0,0.8] or x2=[0,1,0]).
How can enable this constraint in the fmincon function or other functions in optimization toolbox?

Réponses (1)

Matt J
Matt J le 28 Juin 2018
You cannot handle this through constraints. Just solve the problem 3 times corresponding to the three cases x1=0,x2=0, and x3=0. Then see which of the 3 cases leads to the lowest myOpt value.
  9 commentaires
omer faruk gemici
omer faruk gemici le 2 Juil 2018
The given parameters 2 active users in given 3 three users are just simplified example of the original problem.
In the original problem we have around 50 users (max 2 active users) for each subcarrier and total number of subcarrier is 20.
In this scenario, for each subcarrier we have C(50,1) + C(50,2) = 1275 possible combinations to determine active users. Then totally we have 20^1275 possible solution which very large search space.
Matt J
Matt J le 2 Juil 2018
Modifié(e) : Matt J le 2 Juil 2018
No, I don't think so. Firstly, there are only C(50,2)=1225 combinations per sub-carrier. The C(50,1) combinations are already accounted for, as I explained to Stephan.
Secondly, the optimization as you've described it is separable across sub-carriers. There are no constraints which cause pik, k=1...50, for the i-th carrier to interact with pjk,k=1...50 for the j-th carrier. Therefore, you can solve for each carrier separately, as if it is a 50 variable, 1-carrier problem.
So there are 20*1225=24500 combinations. Doesn't seem too bad.

Connectez-vous pour commenter.

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by