Genetic Algorithm in Matlab oop

1 回表示 (過去 30 日間)
kanuri venkata mohana
kanuri venkata mohana 2020 年 9 月 3 日
コメント済み: Walter Roberson 2020 年 9 月 4 日
Hi,
Could anyone tell me the syntax of genetic algorithm in matlab oop?
I would like to have a small example with what should be involved in properties and methods, how to add packages etc.
For example
classdef GA
properties
clsystem % this is the folder where all myclasses and subclasses are included
end
methods (Static)
function
% Here goes my algorithm with fitness function
end
end
end
Could anyone give me a small example of the GA syntax using them.
Thank you
  9 件のコメント
kanuri venkata mohana
kanuri venkata mohana 2020 年 9 月 4 日
Thankyou for your explanation. Could you please tell me how to make the field lT to be used by gaoptimize(). The field lT is represented in the cltransformer. How to make use of it. Iam attaching clTransformer file as well.
Walter Roberson
Walter Roberson 2020 年 9 月 4 日
Could you please tell me how to make the field lT to be used by gaoptimize()
No, I cannot.
You call clTransformer and assign the result to objT, but you never do anything with objT . In order to use the field lT of objT, gaoptimize() would have to evalin('caller') to deliberately look for objT in its calling environment, which would be a bad interface design that would be contrary to the principles of using object oriented design.
Perhaps you should be passing objT in some of the gaoptimize() calls, instead of passing objDS in all of them?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeConstruct and Work with Object Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by