What is the incorrect in this Simplex Method code?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
clear all; close all;
if true
% code
end
clc;
FOS= input(' Enter the value for FOS= ');
F= input('Enter Force= ');
L= input('Length= ');
E= input('Enter Youngs Modulus for Material= ');
sigma_y= input('Yield Stress of the Material= ');
def= input(' Maximum allowable deflection= ');
A= F*(L)*FOS/sigma_y;
B= F*(L^3)/E*def;
M1=[A -1;
B -1];
M2= [1/6 ;1/4];
M3 = [-7 -1];
Aeq=[]; Beq=[]; x0=0; lb=[0,0]; ub=[inf,inf]; ans=linprog(M3,M1,M2,Aeq,Beq,lb,ub,x0)
if true
% code
end
when I run this code it results in the command window this:
Enter the value for FOS= 1.5 Enter Force= 1000 Length= 2000 Enter Youngs Modulus for Material= 200000 Yield Stress of the Material= 56 Maximum allowable deflection= 100 The dual-simplex algorithm uses a built-in starting point; ignoring supplied X0.
Problem is unbounded.
ans =
[]
1 Kommentar
Stephan
am 20 Okt. 2018
Bearbeitet: Stephan
am 20 Okt. 2018
Is it possible that you want to optimize the width and height of a beam clamped on one side, which is subjected to bending, under given conditions?
Why do i want to know this?
If so, you are really wrong by using linprog.
Then the question would not be how to get the current code to run, but how to formulate the optimization problem and which solver to use to get useful results.
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!