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

Bug in NAUTILUS I implementation #47

Closed
light-weaver opened this issue Dec 16, 2023 · 1 comment · Fixed by #48
Closed

Bug in NAUTILUS I implementation #47

light-weaver opened this issue Dec 16, 2023 · 1 comment · Fixed by #48
Assignees
Labels
bug Something isn't working

Comments

@light-weaver
Copy link
Member

Technically, you don't need two extra elements in these arrays. Only one will do the trick if the bug is fixed.

self._xs = [None] * (self._n_iterations + 2)
self._fs = [None] * (self._n_iterations + 2)
self._ds = [None] * (self._n_iterations + 2)
self._zs = [None] * (self._n_iterations + 2)
self._lower_bounds = [None] * (self._n_iterations + 2)
self._upper_bounds = [None] * (self._n_iterations + 2)

Initially, the zeroth element should be set, not the first element as done here (first step number is 1):

self._lower_bounds[self._step_number] = self._ideal
self._upper_bounds[self._step_number] = self._nadir

In all subsequent steps, you should not add 1 to the step number:

self._lower_bounds[self._step_number + 1] = new_lower_bounds
self._upper_bounds[self._step_number + 1] = self._zs[self._step_number]

There are multiple instances of that error, that should be fixed.

Finally, changing the number of iterations does not work as intended:

extra_space = [None] * (resp["n_iterations"] - self._n_iterations)

The above line implies that the user provided number is the total number (including iterations that have already taken place).

self._n_iterations_left = resp["n_iterations"]

The line above implies that the user provided number is the new remaining steps.

The two lines are in conflict, leading to the algorithm never working if one takes a step back.

@light-weaver light-weaver added the bug Something isn't working label Dec 16, 2023
@light-weaver
Copy link
Member Author

Accept the pull request if you agree with the changes. Check if similar changes need to be made to other NAUTILUS implementations.

I also did not reduce the number of elements in the arrays in case they were being used for some other reason. Though in my test, the last element is always left to be None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants