-
Notifications
You must be signed in to change notification settings - Fork 161
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
Tutorials/examples for multi-objective custom UDPs #149
Comments
If you pass me some snippets I could also integrate in in the docs via PR.. |
Or is it as simple as returning a multi-dimensional array in the fitness function?
But where can I pass the senses (min/max) or weights, etc.. Some information would be nice ;-) |
I am writing quickly from mobile .... sorry for the brevity. In your case it's the method 'get_nobj(self)' that needs to be implemented and needs to return the number of objectives .... In case you do write a new tutorial on how to write a moo problem and solve it .... we do welcome PR |
Thanks for your quick answer! I'll give it a try and post my progress here. |
It works now! I have implemented the Fonseca and Fleming function for
Result: Nevertheless, I think some simple examples within the documentation would help new users getting started.
If you want, I can adapt my example to be more generic (variable Thanks already for your help! |
Sure, a tutorial on coding and solving the Fonseca and Fleming UDP would be helpful. Feel free to issue a PR. Do not import pandas though as we do not force it as a third party dep. |
I have now tried to model the "Constr.-Ex problem" since it also contains some (linear) constraints and would be a bit more illustrative than the example from above:
But i get an error due to non-linear constraints:
From my point of view the constraints are linear and only one of the objectives is non-linear. Am I missing something here? Thanks in advance! |
The error message is, in this case, misleading it should be: Algorithms that have constarints (also linear) cannot be solved by nsga-II. Box constraints (i.e. the bounds) though can. |
Thanks for your answer. Is there any algorithm implemented that can solve constrained multi-objective problems? |
Looking at the algorithm list, only improved harmony search seems to be able to solve constr. MO problems: https://esa.github.io/pagmo2/docs/algorithm_list.html Note that IHS is not avaialble yet in any released PaGMO/PyGMO version (it will be in the next version, 2.7). Another possibility is to unconstrain your problem using the unconstrain meta problem: https://esa.github.io/pagmo2/docs/python/problems/py_problems.html#pygmo.unconstrain This will transform your constrained problem into an unconstrained one, which can then be solved with NSGA2. Of course, whether this approach is sound depends highly on your problem. |
Thanks for your answer and explanation! I'll check it and then provide a suitable example via PR |
Where exactly in the documentation can I place the example? My first idea would be here within the section I have created a simple example using an archipelago with three islands:
If the code is fine for you, I could provide a PR. Or I just start with the PR and we keep on discussing there. As you like it.. |
Before opening the PR:
|
Allright. I'll then provide a PR! |
Cool, thanks! |
For PR, see: #191 |
Hi @ckaldemeyer , thanks for your great example. Could you elaborate on the reasons why you evolve your archipelago multiple times (10x) in your multiprocessing example ? Knowing that the nsga algorithm is already working on 10 generations ? Is it a requirement that the number of evolutions should match the number of generations ? |
Hi everybody,
I have read the complete python tutorials and have successfully tested my
pagmo2/pygmo
installation with some simple mono-objective examples.Since I intend to use it for multi-objective optimization, I have been looking for some examples on how to do this. In the mono-objective UDP example tutorial is says that the number of objectives can be defined similarly to the number of constraints (eqs/iqs) but " Since we do not define, in this case, any other method pygmo will assume a single objective, no constraints, no gradients etc…" and in the MOO tutorial a pre-defined standard problem is chosen.
Are there any tutorials or code examples that show how to set up multi-objective customized UDPs such as in the simple UDP tutorial?
Your packages seems really promising but I got stuck here..
Thanks in advance!
Cord
The text was updated successfully, but these errors were encountered: