Skip to content

AmirHosseinNamadchi/SLP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

SLP

Successive Linear Programming (SLP) algorithm

In the SLP technique, the solution of the original nonlinear programming problem is obtained by solving a series of linear programming problems. Each linear programming problem is generated by linearizing the nonlinear objective and constraint functions about the current design vector. This is done using Taylor's theorem for multi-variable functions.

Problem Definition

SLP algorithm is employed for design of a hollow square-cross-section cantilever beam to support a load of 20 (KN) at its end (Adopted from this book). The beam is 2 (m) long. The failure conditions for the beam are as follows:

  • the material should not fail under the action of the load
  • the deflection of the free end should be no more than 1 (cm).

The width-to-thickness ratio for the beam should be no more than 8. A minimum-mass beam is desired. The width and thickness of the beam must be within the following limits:
60 (mm) <= w <=300 (mm)
10 (mm) <= t <= 40 (mm)

Dependencies

  • numpy
  • scipy

Example

pr = Problem()
opt = SLPOptimization()
x,f,viol = opt.run_SLP(pr,100,17)

Here, pr and opt is an instance of Problem and SLPOptimization class, respectively. run_SLP method starts SLP algorithm with initial guess w = 100 and t=17. x, f and viol represent optimal design vector, the corresponding cost function value and violation amount.

Results

iteration = 1    ----- cost = 13078551.025196 ----- violation = 37.081199 
iteration = 2    ----- cost = 14338541.070713 ----- violation = 8.968533  
iteration = 3    ----- cost = 17331301.240654 ----- violation = 1.363611  
iteration = 4    ----- cost = 18386760.232021 ----- violation = 0.096440  
iteration = 5    ----- cost = 18474679.338877 ----- violation = 0.000573  
iteration = 6    ----- cost = 18475208.595235 ----- violation = 0.000000  
SLP terminated at iteration 6
w=145.308376, t=18.163547, Weight=18475208.595235

About code

This code is mainly developed to solve the aforementioned problem. Gradients of the objective and constraint functions is required and I've used finite difference approximations to evaluate them. In each step of SLP a linear optimization problem must be solved. linprog was used for this purpose.

Amir Hossein Namadchi, February 2017

Releases

No releases published

Packages

No packages published

Languages