Problem using Genetic algorithm in toolbox

3 ビュー (過去 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 Center および File ExchangeGenetic Algorithm についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by