Cleanup Rosenbrock tutorial #315
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first time I've ever made a pull request to a repo, so please let me know if I made a mistake anywhere here.
This edits the Rosenbrock tutorial to fix a few things:
Test
andRandom
are not needed.OptimizationProblem
s were missing the_p
argument.So the reader should now be able to just copy paste all this code without getting errors.
At the end, I changed
BBO()
toBBO_adaptive_de_rand_1_bin()
because it didn't seem likeBBO()
is an algorithm, it's just an abstract type(?).The lines
are commented out because it seems to error with some iteration over
Nothing
issue. Something to worry about?I also added some comments that help the reader understand issues with the constraints (as discussed with #291). For example, I didn't understand the first time I read this why I could set
cons(x, p) = [x[1]^2 + x[2]^2]
and then just have it be not satisfied - maybe my comments help? Also changed some constraints / added a constraint problem to hopefully give more examples here.