0% found this document useful (0 votes)
30 views2 pages

De Opt Mala

The document describes an objective function and constraint function for an optimization problem involving three variables: x(1), x(2), and x(3). The objective function f calculates a value based on complex mathematical expressions involving the three variables. The constraint function defines eight nonlinear inequality constraints on the variables. The functions are used in a optimization solver (fmincon) to find the minimum of the objective function subject to the constraints, starting from an initial guess of [-1, 1, 1]. However, no feasible solution satisfying all constraints was found.

Uploaded by

khubaib_1987
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

De Opt Mala

The document describes an objective function and constraint function for an optimization problem involving three variables: x(1), x(2), and x(3). The objective function f calculates a value based on complex mathematical expressions involving the three variables. The constraint function defines eight nonlinear inequality constraints on the variables. The functions are used in a optimization solver (fmincon) to find the minimum of the objective function subject to the constraints, starting from an initial guess of [-1, 1, 1]. However, no feasible solution satisfying all constraints was found.

Uploaded by

khubaib_1987
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Objective function

function f = objfun(x)
f = ((-31760*pi/3)*((x(2)^3)-((x(2)-x(3))^3))) + (-7940*pi*(x(1)2*x(2))*((x(2)^2)-((x(2)-x(3))^2)));

constraint
function [c, ceq] = confun(x)
%Nonlinear inequality constraints
c = [ (((-294300*(x(2)-x(3)))/(2*x(3)))^2) + (((-294300*(x(2)x(3)))/(2*x(3)))^2) - (((-294300*(x(2)-x(3)))/(2*x(3)))^2) - (1.89*10^14);
(((-294300*(x(2)-x(3)))/(x(3)))^2) + (((-294300*(x(2)-x(3)))/(2*x(3)))^2)
- (((-294300*(x(2)-x(3)))^2)/(2*(x(3)^2))) - (1.89*10^14);
11 - ((4/3*pi*((x(2)-x(3))^3)) + (pi*(x(1)-2*x(2))*((x(2)-x(3))^2)));
2*x(2) - 2;
x(1) - 7;
x(3) - 0.1*x(2);
1 - (x(1)/2*x(2));
(x(1)/2*x(2)) - 5;
((4000/3*pi*(x(2)^3)) + (1000*pi*(x(1)-2*x(2))*(x(2)^2))) +
((31760*pi/3)*((x(2)^3)-((x(2)-x(3))^3))) + (7940*pi*(x(1)-2*x(2))*((x(2)^2)((x(2)-x(3))^2)))];
%Nonlinear equality constraints
ceq = [];
command window

x0 = [-1,1,1]; %Make a starting guess at the solution


>> lb = [0,0,0];
>> ub = [];
>> options = optimset ('LargeScale','off');
>> [x, fval, exitflag, output] =
fmincon(@objfun,x0,[],[],[],[],lb,ub,@confun,options)
Warning: Options LargeScale = 'off' and Algorithm = 'trustregion-reflective' conflict.
Ignoring Algorithm and running active-set algorithm. To run
trust-region-reflective, set
LargeScale = 'on'. To run active-set without this warning, use
Algorithm = 'active-set'.
> In fmincon at 445
No feasible solution found.
fmincon stopped because the size of the current search direction
is less than
twice the default value of the step size tolerance but
constraints were not

satisfied to within the default value of the constraint


tolerance.
<stopping criteria details>
x =
0.0001 -436.3409 -436.3409
fval =
-1.3815e+012
exitflag =
-2
output =
iterations:
funcCount:
lssteplength:
stepsize:
algorithm:
search'
firstorderopt:
constrviolation:
message:

35
140
1
1.5016e-006
'medium-scale: SQP, Quasi-Newton, line9.4984e+009
1.5555e+012
[1x750 char]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy