Limit the number of decimals in x variable paretosearch

조회 수: 1 (최근 30일)
Pascual Ferrans Ramírez
Pascual Ferrans Ramírez 2022년 6월 8일
답변: SAI SRUJAN 2023년 11월 1일
Hi dear community,
I am currently working with a multiobjective optimization problem, involving 2 objective variables and multiple (250) X variables. I am using paretosearch. I want to limit to 0 the number of decimal digits that my X variables values may have (actually, I just want it to select between 0 and 1). Is there any way to do this from the options in paretosearch?
Thanks

답변 (1개)

SAI SRUJAN
SAI SRUJAN 2023년 11월 1일
Hi Pascual Ferrans Ramirez,
I understand that you are trying to limit the number of decimals in "x" variable returned by "paretosearch".
To address the issue, normalize the Pareto points and subsequently map them to discrete values of either 0 or 1.
You can follow the given example to proceed further.
% pareto search returns pareto points as one amongst the outputs.
% Let us consider 'x' as pareto points.
X=[0.1 0.2 0.4 0.6]
% normalize or Scale the pareto points
scaled_X = (X-min(X))/(max(X)-min(X))
% Round pareto points to either 0 or 1.
rounded_X = round(scaled_X, 0)
You can refer to the following documentation to understand more about "paretosearch" MATLAB function.

카테고리

Help CenterFile Exchange에서 Multiobjective Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by