In my final answers regarding pressure vessel design problem can't satisfy the constraints , which needs to be muliple of 0.0625

93 Views Asked by At

I need to solve a pressure vessel design problem. The objective is to minimize the total cost, including the cost of material, forming and welding.

The solution has four values x1, x2, x3 and x4 where:
x1 is the thickness of the shell
x2 is the thickness of the head
x3 is the inner radius (R)
and x4 is the length of cylindrical section of the vessel.

One constraint of this problem is, x1 and x2 should be integer multiples of 0.0625. Despite getting superior result, my algorithm doesn't satisfy this constraint. I have provided the objective function and function for constraints in my MATLAB code. How to satisfy those constraint in my final answer?

The minimization problem can be stated as:

function y = PrPf(x)
y = 0.6224*x(1)*x(3)*x(4)+1.7781*x(2)*x(3)^2+3.1661*x(1)^2*x(4)+19.84*x(1)^2*x(3);

And the function for constraints in MATLAB is:

function [g,geq]=constraint(x)
%Inequality constraints 
g(1)=-x(1)+0.0193*x(3);
g(2)=-x(2)+0.00954*x(3);
g(3)=-pi*x(3)^2*x(4)-(4/3)*pi*x(3)^3+1296000;
g(4)=x(4)-240;
% If no equality constraint at all, put geq=[] as follows
geq=[];

where:

0 <= x1 <= 99
0 <= x2 <= 99
10 <= x3 <= 200 
10 <= x4 <= 200 `

The result obtained by my algorithm is:

x1 = 0.8221372
x2 = 0.4063913
x3 = 42.59778
x4 = 170.5458

As you can see, the values of x1 and x2 are not multiple of 0.0625. After checking so many articles, I found that many approaches got the values:

x1 = 0.812500
x2 = 0.437500

which are multiple of 0.0625. What needs to be done to force my algorithm to satisfy these constraints.