What is the incorrect in this Simplex Method code?

조회 수: 2 (최근 30일)
Warda Panondi
Warda Panondi 2018년 10월 20일
편집: Stephan 2018년 10월 20일
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
Stephan
Stephan 2018년 10월 20일
편집: Stephan 2018년 10월 20일
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.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Stress and Strain에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by