Limit the number of decimals in x variable paretosearch

1 次查看(过去 30 天)
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