Skip to content

Minimize power | ASB + Neuralfoil #109

Answered by peterdsharpe
kjayawar asked this question in Q&A
Discussion options

You must be logged in to vote

Hey Kanishka,

Thanks for writing in, and for including the code snippet!

The "diverging iterates" error means that the problem appears to be unbounded - some variable is being driven towards infinity.

To determine which it is, we can modify our opti.solve() command to instead say:

opti.solve(behavior_on_failure="return_last")

This will make it so that the optimizer will ignore any RuntimeError that is raised (such as the diverging iterates error) and return the last value of the variables anyway. The reason this is not the default behavior (and is instead "opt-in" with the behavior_on_failure keyword argument) is to ensure that users are 100% aware that the result is not a converged solut…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kjayawar
Comment options

Answer selected by peterdsharpe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants