Skip to content
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

PyOptSparse + SNOPT example #329

Closed
MYMahfouz opened this issue Feb 22, 2022 · 3 comments · Fixed by #339
Closed

PyOptSparse + SNOPT example #329

MYMahfouz opened this issue Feb 22, 2022 · 3 comments · Fixed by #339

Comments

@MYMahfouz
Copy link

I am trying to reproduce the work done in this paper "Wind plant system engineering through optimization
of layout and yaw control" https://doi.org/10.1002/we.1836

I am using PyOptSparse with SNOPT for wind farm layout optimization. At the beginning of the optimization, I tried to verify that my gradients are ok, and well calculated, but I get an error that some of my Jacobian matrix elements and objectives derivatives are not well calculated.
If I turn off the "Verify level" option and run the optimization, SNOPT terminates after numerical difficulties, so I am not sure I can trust my outputs

Describe the solution you'd like

I would like to know if there is an existing example using SNOPT, or if there are specific options I need to modify. I have currently modified the tolerance as specified in the paper and scaled my variables and constraints.

I would really appreciate any input and help. Thanks.

@bayc bayc linked a pull request Feb 25, 2022 that will close this issue
@MYMahfouz
Copy link
Author

First of all thanks for adding the layout optimization to FLORIS v3.

I tried to use the new version with SNOPT, but it doesn't work and I get that the problem is infeasible.

In FLORIS v2.4, I amanged to make SNOPT work. I was only getting that the gradients are calculated wrong if I activate the option "Verify level" and set it to 3. But when I set it to zero I got a result that was very reasonable.

With the new update I am not getting a result, even when i deactivate the "Verify level" option. I didnt check yet what might be causing the problem but wanted to share what I found.

Thanks again for all the effort.

@bayc
Copy link
Collaborator

bayc commented Mar 7, 2022

Did the pull request #367 fix this new issue you commented above?

@MYMahfouz
Copy link
Author

MYMahfouz commented Mar 7, 2022

Hi, I was just about to send another update.

It solves part of the issue but not completely. Before the pull request, I was getting no answer at all.

Now I am getting an output, but still not as good as the results I used to get using FLORIS v2.4.

With v3, the layout configuration is not reaching the same optimum layout and producing much less AEP. The turbines now seem to be allowed to relocate only slightly.
I tried decreasing the tolerance value, but still not working. I am unable to tell for sure, but I think there is still something that needs modifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants