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

Fix handlers #286

Merged
merged 3 commits into from
Feb 14, 2019
Merged

Fix handlers #286

merged 3 commits into from
Feb 14, 2019

Conversation

whzup
Copy link
Collaborator

@whzup whzup commented Feb 11, 2019

Description

The memory of the BoundaryHandler in the Optimizers are now populated before the optimization loop starts. This prevents the Optimizers from generating positions that are out of the bounds in the first two iterations.
Also added newlines for the documentation of the "reflective" strategy because I forgot them.

Related Issue

Resolves #285

Motivation and Context

See the issue.

How Has This Been Tested?

Ran the test.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This fixes a bug where the BoundaryHandler would not handle the positions
correctly because its memory wasn't populated.
Added newlines for the reflective strategy.
@whzup whzup requested a review from ljvmiranda921 February 11, 2019 19:59
@whzup whzup self-assigned this Feb 11, 2019
@whzup whzup added bug Bugs, bug fixes, etc. documentation Documentation improvements or fixes labels Feb 11, 2019
@ljvmiranda921 ljvmiranda921 self-assigned this Feb 13, 2019
@ljvmiranda921
Copy link
Owner

Let me work on this on the weekend, thanks for the quick fix @whzup!

Copy link
Owner

@ljvmiranda921 ljvmiranda921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good to go. Will merge next week! Sorry, work happened

@@ -177,13 +177,14 @@ def reflective(self, position, bounds, **kwargs):
:nowrap:

\begin{gather*}
\text{while } x_{i, t, d} \not\in \left[lb_d,\,ub_d\right] \text{ do the
following:}
\text{while } x_{i, t, d} \not\in \left[lb_d,\,ub_d\right] \\
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I didn't see this. Can you give me visual confirmation if this will render properly once generated?
(Just generate the docs and screenshot what this will look like)

@ljvmiranda921
Copy link
Owner

Note to self: Merge on master and tag v1.0.1

@ljvmiranda921 ljvmiranda921 merged commit e87a451 into ljvmiranda921:master Feb 14, 2019
@whzup whzup deleted the fix-handlers branch February 22, 2019 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs, bug fixes, etc. documentation Documentation improvements or fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BoundaryHandler's memory is not populated in the Optimizers
2 participants