Problem using Genetic algorithm in toolbox

7 visualizaciones (últimos 30 días)
Parikshit  Sharma
Parikshit Sharma el 21 de Sept. de 2017
Editada: Walter Roberson el 21 de Sept. de 2017
How to specify your own penalty function while using optimization tool box for genetic algorithm??
  2 comentarios
Brendan Hamm
Brendan Hamm el 21 de Sept. de 2017
A penalty function would be part of the objective function you are trying to minimize. Without more information, there is little one could do to elaborate more.
Parikshit  Sharma
Parikshit Sharma el 21 de Sept. de 2017
Editada: Walter Roberson el 21 de Sept. de 2017
My objective function is
function f = objecfunn(x)
syms t
f = (700/x(1))*((((140/2)^x(1))*(1/factorial(x(1))))/(symsum(((140/2)^t)*1/factorial(t),t,0,x(1))))+(2100/x(2))*((((140/2)^x(2))*(1/factorial(x(2))))/(symsum(((140/2)^t)*1/factorial(t),t,0,x(2))))+ 100*(x-400);
Subject to :
x(1) + 4*x(2) <= 800
((((140/2)^x(1))*(1/factorial(x(1))))/(symsum(((140/2)^t)*1/factorial(t),t,0,x(1)))) <= .6
((((140/2)^x(2))*(1/factorial(x(2))))/(symsum(((140/2)^t)*1/factorial(t),t,0,x(2)))) <= .6
x(1) , x(2) are integers
So it would be very helpful if you can answer these questions
1. Is it possible to use toolbox to solve this problem??
2. If yes then how to incorporate these constraints, i know we can write in space for non linear constraint given in toolbox but then how to change penalty function as x(1) >= 800 and x(2) >= 200 is not possible and so if i include a penalty function 100*(x(1)-800)+100*(x(2)-200),then using if statement should i add this term in objective function?
Please do reply, Thanking you in advance!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by