Limit the number of decimals in x variable paretosearch
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
SAI SRUJAN
on 1 Nov 2023
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.
0 Comments
See Also
Categories
Find more on Multiobjective Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!