I need that the values of x(1) and x(2) are not higher than 1 using the Genetic algorith for optimization

1 回表示 (過去 30 日間)
Hi, I am having some questions with the use of Genetic algorith for optimization, here is my program
clc
clear all
fun_objetivo = @(par,pfrac)FunObjetivo(par);
A=[];
b=[];
Aeq=[];
beq=[];
lb=[0 0];
ub=[];
nonlcon=[];
IntCon=[];
nvar=3;
options = gaoptimset('TolCon',1.0e-19,'TolFun',1.0e-30,...
'Display','iter','PlotFcn', @gaplotbestf);
par_optimos = ga(fun_objetivo,nvar,A, b, Aeq, beq,lb,ub,nonlcon,IntCon,options);
I wanted to know if someone can help me please, since I need that the values of par_optimos(1) and par_optimos(2) are not higher than 1.

回答 (1 件)

Matt J
Matt J 2021 年 6 月 17 日
ub=[1,1,inf];
  2 件のコメント
Matt J
Matt J 2021 年 6 月 17 日
You're welcome, but please Accept-click the answer to indicate that it provided a solution.

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

カテゴリ

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