Helical : Optimal Design of a Helical Spring

Reference

  • Neculai Andrei, Nonlinear Optimization Applications Using the GAMS Technology,Springer Optimization and Its Applications, Model Helical (5.22) in chapter Applications of Mechanical Engineering , 2013

Category : GAMS NOA library


Mainfile : helical.gms

$Ontext
Optimization of the helical spring.

Xiao Qimin, Liu Liwei, Xiao Qili, Study on particle swarm algorithm and
its application in mechanical design based on Matlab.
Proc. of the 3rd WSEAS International Conf. on Computer Engineering and
Aplications. (CEA'09) pp.182-185.

x1 = wire diameter,
x2 = spring diameter,
x3 = number of active coils.
eobj = the weight of the spring (to be minimized),
e1   = condition of shear stress,
e2   = condition of maximum axial deflection,
e3   = condition of critical frequency,
e4, e5, e6, e7 = condition of space and dimensions.
$Offtext

Variables x1, x2, x3, obj;
Equations e1, e2, e3, e4, e5, e6, e7, eobj;

* Objective function to be minimized:

eobj.. obj =e= (1.92*(x1**2)*x2*(x3+2))/1000000;

* Constraints:

e1.. -350 + 163*(x2**0.84)/(x1**2.84) =l= 0;

e2.. -2500 - (x1**4)/(x3*(x2**3)) =l= 0;

e3.. 375 - 356000*x1/(x3*(x2**2)) =l= 0;

e4.. 4.5 - x2/x1 =l= 0;

e5.. x2/x1 - 30 =l= 0;

e6.. 10 - x1 - x2 =l= 0;

e7.. x1 + x2 - 30 =l= 0;

* Bounds on variables:
x1.lo = 1;    x1.up = 4;
x2.lo = 0.0000001;
x3.lo = 4.5;  x3.up = 50;

Model helical /all/;
helical.scaleopt = 1;

Solve helical minimizing obj using nlp;
* End helical