Local minimum possible. Constraints satisfied.

33 vues (au cours des 30 derniers jours)
Sarv
Sarv le 12 Oct 2017
so I am trying to use the function fmincon to minimize my gibbs energy function. I am quit sure the result I get is totally wrong. although exitflag=2. The program is as follows: (the parts concerning fmincon)
Aeq = [0 1 2 0 1 0 2 0
4 0 0 2 2 0 0 0
1 1 1 0 0 0 0 1
0 0 0 0 0 2 0 0];
beq = [0.046 % moles of oxygen atoms coming in
4.02 % moles of hydrogen atoms coming in
0.023 % moles of carbon atoms coming in
0.252]; % moles of nitrogen atoms coming in
x0 = [0.1; 0.1; 0.1; 0.1; 0.1; 0.1; 0.1; 0.1]; % initial guess
LB = zeros (1, length(x0));
options=optimset('Algorithm', 'interior-point','Display','iter');
[x, fval, exitflag, output] = fmincon(@myGfunc,x0,[],[],Aeq,beq,LB,[],[],options);
the message I get is:
Local minimum possible. Constraints satisfied.
fmincon stopped because the size of the current step is less than
the default value of the step size tolerance and constraints are
satisfied to within the default value of the constraint tolerance.
Optimization stopped because the relative changes in all elements of x are
less than options.StepTolerance = 1.000000e-10, and the relative maximum constraint
violation, 0.000000e+00, is less than options.ConstraintTolerance = 1.000000e-06.
Optimization Metric Options
max(abs(delta_x./x)) = 6.26e-11 StepTolerance = 1e-10 (default)
relative max(constraint violation) = 0.00e+00 ConstraintTolerance = 1e-06 (default)
I changed the values for initial point, stepTolerance & ConstraintTolerance to different values but the result does not really change..
  1 commentaire
Evangelia Pontika
Evangelia Pontika le 7 Jan 2021
I am trying to do the same thing. Minimization of gibbs energy function using fmincon, but with more variables. My results were not very good initially, but after decreasing all the Tolerances, and increasing the MaxIterations and MaxFunctionEvaluations, my results improved. However, the problem now is that it takes forever to find the solution. I am currently trying to find a good trade-off between getting reliable results and reducing computational time.
A good tip for setting initial points is to first solve the linear part of the gibbs energy function using linprog. The moles will be distributed to the dominant species, so it is a good first approximation that can be then used in the fmincon initial points.
Did you manage to overcome your problem? If you could please share some advice or solution it would be great.

Connectez-vous pour commenter.

Réponses (1)

David Ding
David Ding le 18 Oct 2017
Hi Sarv,
I see that after running "fmincon" to minimize Gibbs Energy Function, you are receiving unexpected results. It is entirely possible, given the fact that when you tried different starting points you still obtained the same results, that the problem set up has something incorrect. Please double check the values in your "Aeq" matrix and "beq" vector. The results of "fmincon" shows that a minimum within the specified tolerance, for the problem that you input, has indeed been found.
Thanks,
David

Community Treasure Hunt

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

Start Hunting!

Translated by