How to find max fuction with Genetic Algorithm

25 ビュー (過去 30 日間)
Andy Rahmawan
Andy Rahmawan 2012 年 10 月 30 日
コメント済み: Adeline War 2023 年 2 月 22 日
Hi all,,
i know that doc 'ga' tell me about Find minimum of function using genetic algorithm. How to find max fuction using genetic algorithm?
thanks..
  1 件のコメント
Adeline War
Adeline War 2023 年 2 月 22 日
Got any solution?

サインインしてコメントする。

採用された回答

Sachin Ganjare
Sachin Ganjare 2012 年 10 月 30 日

その他の回答 (1 件)

Jan
Jan 2012 年 10 月 30 日
While you find a lot of tools to minimize a function F, you find no functions to maximize F. Fortunately you can minimize G = -F, such that you do not need to program your own maximization tool.
  7 件のコメント
tayyaba ilyas
tayyaba ilyas 2021 年 12 月 11 日
hello to all,
I am trying to solve an optimization problem to find maximum value of my fitness function that calculate rate. My fitness function for each individual return the value for 1/rate , as GA solver minimizes so I used 1/rate to maximize rate. once the GA solver executes and return the minimum value, then I used to take another inverse to get the actual maximized value for the rate. Is the procedure is correct? As also you people suggested to include a (-) negative sign in front of the function in the objective function code. i didnot understand the actuall way to do it. Shall i have to take negative of fun (-fun) when calling it in ga solver below?
suggest me how to perform maximizing optimization problem with GA solver.
Thanks in advance
Adeline War
Adeline War 2023 年 2 月 17 日
I have
f = fitnessfunction(h)
I tried placing a negative sign infront of the function but it did not work.

サインインしてコメントする。

カテゴリ

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