Closed microprediction closed 1 year ago
This issue is stale and will be closed soon. If you feel this issue is still relevant, please comment to keep it active. Please also consider working on a fix and submitting a PR.
Hello bot. Um, yeah maybe worth keeping open and a PR might even be forthcoming
@microprediction How are you creating feasible_solution_obj
? Any chance you have a complete example I could run to reproduce the issue?
The list of variables, objectives, and constraints are stored in a FixedLengthArray
, but that should behave just like any regular list. I did notice it's not overloading __repr__
so it displays like <platypus.core.FixedLengthArray object at 0x000001DD0EEFA610>
. If that's the root of the problem, I'm going to merge a fix shortly.
Closing as the fix I mentioned above is releases.
Hi there. First, thanks for the library, and anything named after a monotreme can't be bad. I'm filing this ticket because I noticed an inconsistency in the return type for CMA-ES versus all the others.
One has to do something like this...
best_obj, best_x = feasible_solution_obj[0] if isinstance(best_x,FixedLengthArray): best_x = best_x._data # CMA-ES returns it this way for some reason
in order to enforce consistency across different algos. Perhaps this could be cleaned up? The change would simply be to return x._data in the feasible solution list in place of x.