nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Support different implementations of `Node` in the nestkernel

Open med-ayssar opened this issue 2 years ago • 5 comments

EDIT: Please refer to New-Node-Strcuture

Project: Vectorization:Infrastructure

With the current implementation of the Node class in the nestkernel, adding any new class that should behave like the Node class but with different internal logic won't be a very smooth transition, as the new class must be used everywhere and replace all occurrences of the Node class with the new implementation.

As a requirement, we don't want to simply delete the Node class or replace its internal logic with a new one. We want both Classes to be part of the kernel and to freely choose which implementation is the most suitable for the underlying model.

The main idea is to have a pure C++ interface that only exposes functions without any member fields. All derived Classes should then override those functions and implement their own internal logic. In such scenario, as a pure interface, we would have the NodeInterface, and as derived classes we have Node class and NodeVector class that represents the vectorized implementation of the node.

NodeInterface

All functions that should return an Object or data to the python interface should have a variable number of arguments. As an example, we have the get_status that returns information about the node. In the single Node class, the get_status function will receive zero arguments, however for the Vectorized case, we would get a set of IDs that represent the nodes that we are interested in. Each implementation of the get_status should know how to handle its arguments and return the sorted data for the model instances.

med-ayssar avatar Feb 09 '23 08:02 med-ayssar

Part of the DeviceNG

med-ayssar avatar Apr 06 '23 12:04 med-ayssar

Pull request automatically marked stale!

github-actions[bot] avatar Jun 06 '23 08:06 github-actions[bot]

@jougs Are there any future plans for this PR?

JanVogelsang avatar Jul 20 '23 13:07 JanVogelsang

Discussed together with #2372.

JanVogelsang avatar Aug 24 '23 12:08 JanVogelsang

Pull request automatically marked stale!

github-actions[bot] avatar Oct 24 '23 08:10 github-actions[bot]