How to make/create a fitness/objective function for GA problem

5 ビュー (過去 30 日間)
Rudi Martin
Rudi Martin 2013 年 4 月 5 日
hello,
how do we define , or how do we make a fitness/objective function that match with our problem in GA? Are there any specific rules?
there are many fitness/objective function such as rastrigin function, ackley, griewank etc. But what if we want to use our own function? How do we create it? Based on what?

採用された回答

Gavin
Gavin 2013 年 4 月 5 日
I have a bit of experience in this! I developed a fitness function for an extremely specific problem. In fact, I coded my own specific GA to work on a particular problem with a specific set of variables.
What sort of GA are you intending to use? The MATLAB builtin one?
What is your problem optimising, and what are the design variables?
Gav
  2 件のコメント
Rudi Martin
Rudi Martin 2013 年 4 月 6 日
Thanx for your response sir, my problem is actually very simple.
yes... I'm using matlab for my GA problem, but i dont know how to make my own fitness function.
It's about welding optimization. I have three parameters (design variables), each has a different limitation :
Current : 80 100 ampere
Voltage : 80 - 90 volt
Weld time : 13 - 15 second
thank you
Alan Weiss
Alan Weiss 2013 年 4 月 8 日
You might be interested in a welding example in the documentation.
Alan Weiss
MATLAB mathematical toolbox documentation

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

その他の回答 (1 件)

Shashank Prasanna
Shashank Prasanna 2013 年 4 月 5 日
I would start with the documentation to see how to write your own objective/fitness function in MATLAB. This is however a step that comes after you already have your fitness function on paper or know what it is.
There are some examples on how to MATLAB them in MATLAB:
Also scroll down to see some example on how these fitness functions were created:
That being said, you will have to come up with you specific fitness function, and GA can help find the parameters that minimize it.

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by