Closed mhinsch closed 2 years ago
Just remind me if I do a pull request that does not follow this pattern
Question: You mentioned that the operatorin
is slow. Here it is used.
I maybe said that in a misleading way. in
itself isn't slow, but IIRC you used it to check whether an object was element of a collection. It's easy to forget that in
simply iterates the vector until the element is found, so that check was a very slow operation.
Not important now, but in the medium term it would be good to split model functions into the iteration part, that picks the agents to be modified and the actual modification that operates on single agents. E.g. (simplified example):
That makes the model easier to read and modify (IMO) and would be needed anyway if we ever want to do an event-based version.