New Particulator creation flow
reasons:
- avoid modifying env and backend by Builder::init(..., env, backend)
user-perspective:
- backend = Backend()
- Env(backend)
- create list of dynamics
- create dictionary of attributes (old init_attributes logic should go )
- create list of products
- Particulator(env, dynamics, attributes, products)
steps:
- [ ] remove Builder class?
- [ ] release 3.0
idea for decorator name:
@pysdm.product_prototype (with a method instantiate(backend) returning a Product instance)
Stale issue message
it is probably Backend(env) what we need rather than Env(backend)! The reason is that backend should leverage the information on dimensionality of the environment and, e.g., avoid multi-threading for cell-wise operations if there is just one cell. Similarly, the displacement code will get much simpler and will no longer need repeated if-else statements checking the dimensionality at runtime on every call.
... or Backend(n_dims: int) ?
idea for decorator name:
@pysdm.product_prototype(with a methodinstantiate(backend)returning a Product instance)
Done in #1370
dynamic-reuse issue addressed in #1372 with a new @register_dynamic decorator
environment reuse issue addressed in #1373 with a new @register_environment decorator