MATLAB Answers

0

Use "solution converged to an infeasible point" as an input

Asked by Maria Sanz on 20 Sep 2019
Latest activity Edited by Stephan
on 20 Sep 2019
i am using fmincon to optimize f:
[X,f]=fmincon(@(X) obj_function(X,P,Pd,intervalotiempo),X0,A,B,Aeq,Beq,LB,UB,nonlin);
I would like to use the output of this operation in a way that if the solution converged to an infeasible point the program stops. How could I make this possible?

  0 Comments

Sign in to comment.

1 Answer

Answer by Stephan
on 20 Sep 2019
Edited by Stephan
on 20 Sep 2019
 Accepted Answer

Use the output exitflag to find out if there was no feasible point:
[x,fval,exitflag,output] = fmincon(@(X) obj_function(X,P,Pd,intervalotiempo),X0,A,B,Aeq,Beq,LB,UB,nonlin);
If the exitflag = -2 then there was no feasible point found.

  0 Comments

Sign in to comment.