-
How can I define the sampling method in problem-independent execution? As far as I understood, by setting Below is the simplified code.
And from the second generation, float type Xs are included as shown in the screenshot How can I edit the sampling method codes to get the Xs that are int type? Thank you for your help in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Thanks for using pymoo!
A simple discrete optimization example is provided here: https://pymoo.org/customization/discrete.html |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your reply and guide to the tutorials. I was able to modify my codes by using them. Another question I got is that , as far as I understood, by setting Below is the changed code where defined type_var under the class. And I could get all Xs in
The next one is the one I failed to get all Xs in
I am not sure if I am understanding the definition method correctly and would be glad to know which I should study or if I am misunderstanding something. Thank you so much in advance. |
Beta Was this translation helpful? Give feedback.
Thanks for using pymoo!
Sampling
is used ONLY to create the initial population. From there on, crossover and mutation are applied to create offsprings.We have designed the framework in a way that users have full flexibility for all operators. You can check out this tutorial for customizing crossover and mutation additionally: https://pymoo.org/problems/definition.html
A simple discrete optimization example is provided here: https://pymoo.org/customization/discrete.html