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

End-assignment-only results in confusing convergence message #555

Open
zptro opened this issue Nov 23, 2023 · 1 comment
Open

End-assignment-only results in confusing convergence message #555

zptro opened this issue Nov 23, 2023 · 1 comment
Assignees

Comments

@zptro
Copy link
Collaborator

zptro commented Nov 23, 2023

I realized that this line which was added in #537 makes the try clause succeed, even if self.old_car_demand is missing, which in the case of end-assignment-only runs results in a confusing message that the model run has not converged. The intention is originally that the try clause should fail in the first iteration, which forces relative gap to zero.

self.old_car_demand = cast(numpy.ndarray, self.old_car_demand) #type checker hint

@hsl-petrhaj
Copy link
Contributor

@zptro
I investigated this a bit:

  1. End-assignment-only always sets the iterations in helmet.py to zero, thus the warning in roughly helmet.py:125 always gets triggered.
  2. Cast should not do anything in runtime, but since I do not know all its intricacies it is possible that for example None would get turned into something else.
  3. Is it possible that old_car_demand is something else than int or ndarray? Then we should also adjust the type annotation.

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

No branches or pull requests

2 participants