Open Dherse opened 3 months ago
Hi!
Thank you for bringing this to my attention.
Regarding the Van der Pol operator issue, could you please provide some minimal code that allows to replicate the error?
Regarding the error with your actual operator: That was caused by an issue with the automated optimization routines of PyRates that were not able to handle differential equations where the right-hand side ends up being a mere constant. I fixed that with the most recent release PyRates 1.0.5 though.
Here is a piece of code that I created based on what you provided above that runs without error using the most recent versions of PyCoBi and PyRates:
from pyrates import OperatorTemplate, NodeTemplate, CircuitTemplate
from pycobi import ODESystem
# create operator template
mrr_op = OperatorTemplate(name="mrr_op",
equations=["d/dt * a = p_in^(0.5)",
"d/dt * n = - n / tau + abs(a)^4."],
variables={"a": "output(0.0 + 0.0j)",
"n": "variable(1000000000000.0)",
"p_in": "input(19.54)",
"tau": 1.0,
})
# create node template
mrr_node = NodeTemplate(name="mrr_node", operators=[mrr_op])
# create circuit template
mrr_net = CircuitTemplate(name="mrr", nodes={"p": mrr_node})
# create pycobi instance
ode = ODESystem.from_template(mrr_net, auto_dir="~/PycharmProjects/auto-07p", init_cont=False,
float_precision="complex64", working_dir="tmp")
Here, I used "tmp" as my working directory, so that would have to be altered for your setup. Hope that helps!
Best, Richard
Hello,
I am currently trying to use PyCoBi to simulate non-linear effects in microring resonators for photonic neuromorphic computing and I am exploring continuation analysis of some of our (potential) neuron structures. I have rate equations obtained from the literature but I encounter the following errors in various scenarios:
invalid literal for int() with base 10
TypeError: _lambdifygenerated() missing 1 required positional argument: 'Pin'
My operator for my use case is the following:
And my current Python code is the following:
Note that Aashu is a reference to the file name I gave to my YAML file since I am trying to recreate a paper from Aashu Jha, et al. I should also mention that this is a somewhat minimal reproduction example because the actual rate equations are much longer and more complicated.
As far as I know, I am using the latest version of the library, of auto-07b, and Python 3.10.14.