rht

Results 789 comments of rht

I didn't "choose" `iter_neighbors` in #1184, since both `iter_neighbors` and `get_neighbors` are already present. That PR specifically deletes only `neighbor_iter`. The further deletion of `iter_*` in favor of `get_*` can...

https://github.com/projectmesa/mesa/pull/815#issue-599858494= contains argument on why it is beneficial to use `get_*` over `iter_*`: a list can be cached, but an iterator cant. With this, I'm convinced that `get_*` that returns...

On reviewing #815, I realized that the caching mechanism of neighborhood has already been incorporated in current main. This means that both `iter_neighbors` and `get_neighbors` use cached result of the...

@LeavesLi1015 can you elaborate your question? It's not specific enough. A code snippet would help if applicable.

If you want determinism, you can specify a random seed to the model (this is not well documented, unfortunately). E.g. https://github.com/projectmesa/mesa/blob/87da503de4a6a77e7f90144b7d43b7fc3d5aeb3e/tests/test_model.py#L29 (but this is not a complete picture either). What...

Can you share a minimum viable code that reproduces your case? Hard to say anything without concrete code.

`BatchRunner` is designed for sensitivity analysis, which is different from your use case. That said, you can modify `BatchRunner` so that you are reusing the same model for new iteration....

Oh, maybe you need to reset `self.model.running` back to be `True`. I suspect that `self.model.running` is set to `False` after first run, and then the model no longer runs.

So, before this line ``` results = self.run_model(self.model) ``` You do `self.model.running = True`.

> It is not possible that the model refreshes its attributes like object size and starting price and gives another run with dynamically increase new agents while not initializing the...