필터 지우기
필터 지우기

Resolution of the gamultiobj's variable

조회 수: 9 (최근 30일)
Xiaowei
Xiaowei 2024년 5월 23일
댓글: Walter Roberson 대략 5시간 전
Hi community!
To what resolution does the random search algorithm generates new samples? Is it possible to specify a certain resolution to search for a varible?
For example, the independent variable I want to search over, a, has the limit of . Is it possible to only search for a that is as accurate as the level of 0.01? It reduces the search space to only 200 points.
I assume doing this would make the search converge faster and also, in my application, I do not really care about a at the decimal of 0.001.
Thank you in advance for your help!
Xiaowei

답변 (2개)

Nipun
Nipun 2024년 6월 11일
편집: Walter Roberson 2024년 7월 19일 18:15
Hi Xiaowei,
I understand that you want to specify a resolution for the random search algorithm. You can discretize the search space manually:
a_values = -1:0.01:1; % Set resolution to 0.01
This approach limits the search space, making the search process faster.
For more details on generating a random scalar, refer to MATLAB documentation: https://www.mathworks.com/help/comm/ref/randsrc.html
Hope this helps.
Regards,
Nipun
  댓글 수: 1
Xiaowei
Xiaowei 2024년 7월 19일 18:07
편집: Xiaowei 2024년 7월 19일 18:07
Hi Nipun,
Thank you for your answer! Sorry for the late response as I didn't receive any notification from the forum that my question has been answered.
In gamultiobj, how can I discretize the search space? Because when I am setting up the algorithm, it only asks me to specify a lower bound and upper bound for the search space. I didn't find where I can specify the discretization.
Best regards,
Xiaowei

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


Walter Roberson
Walter Roberson 2024년 7월 19일 18:18
Search over integers -100 to +100 and divide by 100 before use.
  댓글 수: 2
Xiaowei
Xiaowei 대략 8시간 전
Hi Walter,
Do you mean I should
  1. make my variables integer
  2. specify the range according to my needs?
Thank you!
Xiaowei
Walter Roberson
Walter Roberson 대략 4시간 전
nvars = 1; %number of variables
intcon = 1; %first variable has integer constraints
A = []; b = [];
Aeq = []; beq = [];
lb = -100; ub = 100;
nonlcon = [];
options = [];
results = gamultiobj(@(vars) ObjectiveFunction(vars/100), nvars, A, b, Aeq, beq, lb, ub, nonlcon, intcon, options);

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

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by