Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How to add condition for X in simulannealbnd

Asked by Khoo

Khoo (view profile)

on 21 Aug 2013

for X = SIMULANNEALBND(FUN,X0,LB,UB), the vector X0 starts the point finding so that the answer LB<=X<=UB. How if i want to add a certain condition to vector X, say exp(X(1)+X(2))<X(3)?

Another word to say besides the X must in between LB and UB, X has to fulfill the condition as well.




Khoo (view profile)

1 Answer

Answer by Shashank Prasanna

Shashank Prasanna (view profile)

on 21 Aug 2013
Accepted answer

Simulated Annealing does not allow for non-linear constraints, it only allows bound constraints. Hence simulannealibnd.

If you have non-linear constraints such as the one you shared in the questions, you can use GA instead


Shashank Prasanna

Shashank Prasanna (view profile)

Contact us