Problem using Genetic algorithm in toolbox

7 次查看(过去 30 天)
How to specify your own penalty function while using optimization tool box for genetic algorithm??
  2 个评论
Brendan Hamm
Brendan Hamm 2017-9-21
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 2017-9-21
编辑:Walter Roberson 2017-9-21
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!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by