Hi Can any one help me converting the values of the decision variables to double or real values
I would suggest looking at some of the example problems in src/org/moeaframework/problem/. Below is an example reading the real value from decision variables:
@Override public void evaluate(Solution solution) { double x = EncodingUtils.getReal(solution.getVariable(0)); double y = EncodingUtils.getReal(solution.getVariable(1)); double f1 = Math.pow(x, 2.0) + Math.pow(y, 2.0); double f2 = Math.pow(x+2.0, 2.0) + Math.pow(y, 2.0); solution.setObjective(0, f1); solution.setObjective(1, f2); }
You seem to have CSS turned off. Please don't fill out this field.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
I would suggest looking at some of the example problems in src/org/moeaframework/problem/. Below is an example reading the real value from decision variables: