フィルターのクリア

Generating numbers whose sum is 1 during genetic algorithms optimization

1 回表示 (過去 30 日間)
Terry
Terry 2023 年 12 月 10 日
編集済み: Matt J 2023 年 12 月 10 日
I need to run a GA optimization and I have 12 parameters whose values must be between 0 and 1. However, their sum must always be 1, as they represent fractions of a component.
How do I make sure that my genetic algorithm will generate numbers that satisfy these two conditons simultaneously?
Thank you!

回答 (1 件)

Matt J
Matt J 2023 年 12 月 10 日
編集済み: Matt J 2023 年 12 月 10 日
lb=zeros(12,1);
ub=lb+1;
Aeq=ub';
beq=1;

カテゴリ

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