-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing population when using decorator meta-problem #144
Comments
You cannot replace a problem in a population, as it is supposed to be an "immutable" property of the population. What you can do is to change the internal state of a problem. E.g., if the UDP stored in a population has a data member, you can alter that data member - that does not count as "changing the problem". I am not sure whether this helps in your situation though... |
Hi @bluescarni, thanks for your reply! I'm slightly confused by what you mean by the UDP's data member. So for example, say I have a population defined with some associated UDP, can I change attributes of the UDP between evolutions? For example, given some UDP that depends on a variable self.myvar, could I instantiate the population with the some seed in the fitness function, then update it manually after some number of evolutions (i.e. is this what you mean by changing its data members)? (Just to be clear I'm not talking about a multi-objective function here or any optimisation of self.myvar, I just want to be able to 'perturb' the problem after solving). |
(This should be under the feature-request/help labels, I'm just not sure how to add them)
I have written code that changes a problem using a decorator, but I'd also like to change the problem in an instantiated population. Is there currently a way to do this? For example, given some population with an associated problem at initialisation, is there a way to update the problem to the new decorated one without creating a new population? I know this is potentially very un-pygmonic (against the way PyGMO is designed), but I think it could be useful for some upcoming projects.
E.g.
Any help is much appreciated!
The text was updated successfully, but these errors were encountered: