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:
- If I simply copy the Van der Pol operator from PyRates, I get the following error:
invalid literal for int() with base 10
- If I use my actual equations, I get the following error:
TypeError: _lambdifygenerated() missing 1 required positional argument: 'Pin'
My operator for my use case is the following:
# A simple MRR without graphene.
mrr_si_no_gr:
base: OperatorTemplate
equations:
- "d/dt * a = Pin^0.5"
- "d/dt * n = - n / tau + abs(a)^4."
variables:
a: output(0.0 + 0.0j)
n: variable(1000000000000.0)
Pin: input(0.0)
tau: 0.0
n_kerr: 0.0
theta_fcd: 0.0
gamma_fca: 0.0
alpha_tpa: 0.0
i: 0.0+1.0j
# A simple node with a single MRR.
MRRNODE:
base: NodeTemplate
operators:
- mrr_si_no_gr
# Example circuit for Aashu's paper.
AASHU:
base: CircuitTemplate
nodes:
mrr: MRRNODE
edges:
And my current Python code is the following:
from pycobi import ODESystem
import numpy as np
import matplotlib.pyplot as plt
ode = ODESystem.from_yaml(
"aashu/AASHU",
working_dir="target/",
auto_dir="~/auto-07p",
node_vars={
"mrr/mrr_si_no_gr/Pin": 19.54,
}
)
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.