필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

My code is not returning any feasible point. The error says no point satisfies the constraints.Kindly suggest what is the error in my code?

조회 수: 1 (최근 30일)
if true
cost=[0.09,0.08,0.08,0.09,0.1,0.1,0.08,0.1,0.11,0.11,0.11,0.11,0.11,0.11,0.09,0.1,0.12,0.11,0.12,0.11,0.12,0.11,0.12,0.11];
f=[cost,cost,cost,cost,cost]
size(f)
y=ones(1,24);
z=zeros(1,24);
Aeq=[y,z,z,z,z;z,y,z,z,z;z,z,y,z,z;z,z,z,y,z;z,z,z,z,y]
size(Aeq)
Beq=[1;3;2.88;3;5];
lb1=zeros(1,24);
lb1(:,19:20)=1;
ub1=zeros(1,24);
ub1(:,19:20)=1;
lb2=zeros(1,24);
lb2(:,3:5)=0
lb2(:,21:22)=0
ub2=zeros(1,24);
ub2(:,3:5)=1
ub2(:,21:22)=1
lb3(:,1:24)=0.12;
ub3(:,1:24)=0.12;
lb4=zeros(1,24);
ub4(:,1:24)=1.5;
lb5=zeros(1,24);
lb5(:,1:8)=0.1;
lb5(:,20:24)=0.1;
ub5=zeros(1,24);
ub5(:,1:8)=3;
ub5(:,20:24)=3;
lbi=[lb1 lb2 lb3 lb4 lb5 ];
ubi=[ub1 ub2 ub3 ub4 ub5 ];
lb=lbi';
ub=ubi';
A=[];B=[];
[x,fval] = linprog(f,A,B,Aeq,Beq,lb,ub)
end

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by