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

PSL Systems to Neuromancer Blocks #215

Open
drgona opened this issue Jan 31, 2025 · 0 comments
Open

PSL Systems to Neuromancer Blocks #215

drgona opened this issue Jan 31, 2025 · 0 comments

Comments

@drgona
Copy link
Collaborator

drgona commented Jan 31, 2025

Discussed in #200

Originally posted by cjb873 October 16, 2024
The PSL system library has a lot of systems that are not implemented in neuromancer.dynamics, such as the Boid's system, RC Networks, etc. I see that the base classes have a forward function defined so that these dynamical systems can be wrapped with a Node and used with the System class, yet these forward functions as currently implemented do not support minibatching. I believe this is due to the fact that integrators are called within the forward function, as well as the actual equations of these systems not being able to act on two dimensional tensors.

I think it could be useful to pursue an implementation of forward for these systems that can be wrapped and placed in an integrator, in an example like:

sys = RC_Network(nx=5)


class RC_Block(ode.ODESystem):

    def __init__(self, net):
        super().__init__(net.nx, net.nu)
        self.net = net

    def ode_equations(self, x, u):
        return self.net(x, u)

integrator = integrators.Euler(RC_Block(sys), h=ts)
integrator_node = Node(integrator, ['x', 'u'], ['x'])

Or, it may be best to just implement a version of these dynamical systems inside of neuromancer.dynamics. Either way, I personally would like it to be easier to use white-box representations of these coupled systems to do DPC.

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

1 participant