Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!