Hi Guys,
I am doing an optimisation with four design variables X. All four variables must be a positive integers (i.e) not a floating value. I gave diffminchange as 1, but in iterations, FMINCON has floating value for X.
Is there anyway to force FMINCON to increase/decrease by a round number, hence my design variable will always be a round number.
Thanks in advance!!!

 Respuesta aceptada

Alan Weiss
Alan Weiss el 2 de Sept. de 2015

0 votos

As the documentation states, all Optimization Toolbox solvers except for intlinprog are for continuous variables. If you need discrete variables such as integers, either use intlinprog or use the Global Optimization Toolbox ga function for mixed-integer optimization.
Alan Weiss
MATLAB mathematical toolbox documentation

1 comentario

Selvavignesh
Selvavignesh el 2 de Sept. de 2015
Thanks Alan for response. I am executing the code now with ga.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Preguntada:

el 2 de Sept. de 2015

Comentada:

el 2 de Sept. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by