-
Hello, I am aiming to solve single-objective and multi-objective optimization problems with different variables' types. I found out how to model mixed variable problems and have successfully tested continuous and integer variables problems with GA. But I have not understood how to declare a discrete variable, that has N non-equispaced values. For example, there is a cantilevered_beam.py in the problem folder.
It seems that h1 is defined as a non-equispaced discrete variable. For mixed variables, different evolutionary operators must be applied to different types of variables. In pymoo this is supported by instantiating operators with a mask. For example for integers and continues:
How should I modify the mask and operators in order to handle non-equispaced discrete variables and solve this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
An easy fix for that is to map the variables in the Let us say you define the discrete variables [1, 2, 3] and then map 1->10, 2->100, and 3->1000. |
Beta Was this translation helpful? Give feedback.
An easy fix for that is to map the variables in the
_evaluate
function.Let us say you define the discrete variables [1, 2, 3] and then map 1->10, 2->100, and 3->1000.
This way the algorithm just handles ordered integers, but your problem definition uses them in a non-equidistant manner.