-
Notifications
You must be signed in to change notification settings - Fork 97
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
Updated phasing/_lambert to pygmo2 #142
base: master
Are you sure you want to change the base?
Conversation
Thanks ... update long needed :) Can you merge master into this PR and see if the CI passes? |
…bert install_appveyor_mingw.py was updated
linting failed ... can you fix it? |
yes but I have a question. It fails because it's trying to get f_dimension which I imagine existed in the base class. The dimensions in this case are the departing and arrival times, right? The code seems to allow for a 1 dimensional problem but I would have assumed the dimension is 2. |
I see now the UDP (user defined problem) is malformed. Note that the user problem class is not inheriting from any base anymore: in pygmo2 the syntax has changed considerably w.r.t. version 1.x ... We have no longer base classes, so you need to write this UDP without relying on pygmo at all. It must be self standing, but respecting the pygmo UPD interface, see https://esa.github.io/pygmo2/tutorials/coding_udp_multi_objective.html for an example? In your case you will need to add to the mandatory ones to the To access the problem dimension you will need to use the methods available in your class. |
Yes, that I understood but it wasn't clear to me how to determine the value of f_dimension. After reading the paper and again checking the code I think commit b885ba1 would be correct. The linting passed, but do check the changes. |
Thanks for the modifications .. going in the right direction, You still need something like: def get_nobj(self):
return self.f_dimension ... please test by constructing a pygmo problem with it, like: import pygmo
udp = lambert_metric(....)
prob = pygmo.problem(udp)
print(prob)
pop =pygmo.population(prob, 20) and check all is good. Also if you could update the docstring:
to
it would be great! |
Sorry for the long delay. I did all the changes and tried testing the way you suggest here and when doing
I get this error
|
While correcting errors in the lint test, it was evident that the file phasing/_lambert needed to be updated to use pygmo 2.