Problem using Genetic algorithm in toolbox

조회 수: 7 (최근 30일)
Parikshit  Sharma
Parikshit Sharma 2017년 9월 21일
편집: Walter Roberson 2017년 9월 21일
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