Closed NatOnera closed 1 year ago
I just made a commit that should fix the issue. Thank you so much for finding this bug.
What happened? Numpy uses a fixed string length of 7, whenever the array only contains nothing
. When the mutation now brings up multiply
, while setting it only the first 7 characters are copied over and the y
is ignored. Took me quite a bit to figure this out.
Please let me know if the issue is resolved in the current master branch. If not please reopen the issue.
Thank you! I will try the new version.
Even with the latest version, I'm having the same issue! I'm using NSGA3 with MixedVariableMating, which is different from the example above. It seems to cut values so that all them in a categorical variable are the same length. For example, if the shortest value in col1 is "AA", then all the others in col1 will eventually be sliced to 2.
+1 I use NSGA-2 with MixedVariableMating() and MixedVariableSampling(). After 2 generations the last element in my population contains the value 'nor_' instead of 'nor_conv_1x1'. All other elements contain only valid choices.
I tried to modify the example to perform Multi Objective with mixed variables (version 0.6) with 2 choices "x": Choice(options=["nothing", "multiply"]),
If I have to use the value associated to x, sometimes the last character of x is skipped (depending on the size of the float z): "multip" instead of "multiply".
here is the few lines of code to try and get the message error