Giter Site home page Giter Site logo

Comments (6)

NinaOmejc avatar NinaOmejc commented on May 23, 2024 1

Hi,

the setting vectorize=False worked and solve my issue, thank you very much!

from pyrates.

Richert avatar Richert commented on May 23, 2024

Hi Nina,

Thank you for bringing this to my attention! There indeed seems to be a bug when using edge operators with multiple input variables in combination with the vectorize=True keyword argument of the CircuitTemplate.run method (which is also the default value of that keyword argument).

I will look into this and make sure that this bug is fixed as soon as possible. Until then, you should be able to use vectorize=False as a temporary bugfix.

Best, Richard

from pyrates.

NinaOmejc avatar NinaOmejc commented on May 23, 2024

I have one more question, somehow related to this, if you are willing to discuss.

Currently, my time varying variable of coupling strength is inside the node operator and is thus affecting the coupling strength to all other nodes inside a network. Is there a way to add a time varying parameter to the edge operator? I read that the "weight" can only be a scalar. Also, when I tried to add an "input variable" to the "equation" and "variables" inside edge operator and set it inside the edge dictionary (next to the weigth and other parameters), pyrates didnt like it.

So, since the weights of the edges have to be fixed, there is no way to vary them in time, except to design and run the model again, so a bit more manually? Or is there a way with some internal settings?

A similar topic has already been discussed inside the "Continuous data generation" issue, but it was only discussed in the relation to the variables inside the node operator..

Thank you!

from pyrates.

Richert avatar Richert commented on May 23, 2024

Hi Nina,

indeed external inputs cannot be placed on edges at the moment. It is a feature to consider for the future, for sure, but currently it's not supported.
What is supported is to define edge operators via differential equations on edges, if it were possible to express the edge dynamics you are interested in via a differential equation.

Another possibility is that you define a node-specific output variable that is scaled by some extrinsic input and that you could use as the source variable of any edge. This way, you could scale all the outputs (rather than the inputs) of a given node in a time-dependent fashion.

Finally, as a work-around, there is always the possibility to define multiple input variables on a node and define separate extrinsic inputs for them (for example in_total = ext_1*in_1 + ext_2*in_2 + in_3). Then you connect the edges to different input variables and achieve a separation like that.

Hope that helps!

Best, Richard

from pyrates.

NinaOmejc avatar NinaOmejc commented on May 23, 2024

Hi,

thanks for the last comments! I've been trying to figure out what exactly you meant by your proposals and somehow came up with the version attached below, which works for me. I post it here in case some one is interested or if you have any comments on it. I guess the downside is that for e.g. 20 couplings, I would have 20 new variables + 20 new inputs, but I guess that is inevitable to some degree.

The approach is also great, because now I can use delays with any issue (as compared to separate runs of simulation).

Thanks again for all the help!

test_kuramoto.zip

from pyrates.

Richert avatar Richert commented on May 23, 2024

Hi Nina,

well if you really want to control 20 different incoming connections via 20 distinct extrinsic signals, that is true. However, if you, for example, want to apply one extrinsic input pattern to one group of incoming connections, and a different input to the second group, you would still be fine with 2 new variables + inputs.

Of course, always happy to help!

from pyrates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.