필터 지우기
필터 지우기

how can i make ga code to set a specific values to a parameter

조회 수: 2 (최근 30일)
zenhom mohamed
zenhom mohamed 2018년 11월 25일
답변: Alan Weiss 2018년 11월 27일
hallo, i am making optimization by genetic algorithm (ga)...i know that when you run the code, random values for each parameter are assumed..my question: if there is a parameter i want the code to assume a specific values to it at each iter?

답변 (2개)

Star Strider
Star Strider 2018년 11월 25일
I am not certain what you are asking.
If you have a parameter you want not to vary (you already know the optimum value), fix it in your fitness function, and optimise the other parameters you want to estimate. This is likely more efficient than fixing it with the ‘lb’ and ‘ub’ arguments, alghtough if you want it to vary only within a narrow range, you can use those arguments to constrain it.
  댓글 수: 2
zenhom mohamed
zenhom mohamed 2018년 11월 27일
thank you for your answer @star strider
i mean that: if x(1) represents a size of a generator which takes a specific values according to the manifacture (for ex. 50, 100, 150 kw only), i want the ga code not to set any random value for x(1), i want it to set one value of these three values at each iteration
Star Strider
Star Strider 2018년 11월 27일
My pleasure.
Set ‘x(1)’, and whatever other parameters you want not to vary, to constant values in your fitness function, and do not include them in the parameters you want to optimise.

댓글을 달려면 로그인하십시오.


Alan Weiss
Alan Weiss 2018년 11월 27일
It sounds to me as if you have a discrete set of values to choose from. Use the technique of Mixed Integer Optimization, as shown in the example Solving a Mixed Integer Engineering Design Problem Using the Genetic Algorithm.
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

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