필터 지우기
필터 지우기

Difficulty in defining Aeq in linprog

조회 수: 2 (최근 30일)
bus14
bus14 2019년 4월 19일
댓글: bus14 2019년 4월 19일
Hi community,
As I am now scaling up the problem with having two values for Z and 4 values of Y the dimensional problem becomes more difficult once again. As eye(2),eye(3)... does not work any more for adding values of Y. new Matrix A1[1 1 0 0;0 0 1 1] makes determining Aeq for me rather difficult as the transpose of A1 makes it difficult to calculate.
I tried writing the whole equation out in terms of V as you did above. But, where I am stuck is that Z(1) --> V(5) needs to be multiplied with 2 variables of A1 instead of only one variable as in the previous problem.
l =[0.25; 0.3];
q =[6;5];
s = [1;1.2;1.1;1];
A1 = [1 1 0 0; 0 0 1 1];
x =[20; 25; 28; 26];
d =[120;110];
f =[-s.',(l-q).'];
Aeq =[1 1 0 0;0 0 1 1, A1.'];
beq =x;
lb =[0, 0, 0, 0, 0, 0];
ub =[inf, inf, inf, inf, d(1), d(2)];
sol = linprog(f,[],[],Aeq,beq,lb,ub);
y = [sol(1);sol(2);sol(3);sol(4)]
z= [sol(5); sol(6)]
Hope you can help me out!
  댓글 수: 1
bus14
bus14 2019년 4월 19일
Objective function of this question is: Min (l-q).'*z-s.'*y where .' indicates the transpose.
the constraints are Y=x-A1.'*z 0<z<d , y.0 in whihc Z=[Z1;Z2] Y=[Y1;Y2;Y3;4]

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by