nmodl icon indicating copy to clipboard operation
nmodl copied to clipboard

NMODL fails on simple ODE.

Open 1uc opened this issue 2 years ago • 0 comments

The following MOD file

NEURON {
    SUFFIX leonhard
}

STATE {
 x
}

INITIAL {
  x = 42
}

BREAKPOINT {
    SOLVE dX METHOD cnexp
}

DERIVATIVE dX {
 x' = sin(x*x)
}

fails as follows:

$ nmodl leonhard.mod host sympy --analytic
terminate called after throwing an instance of 'std::runtime_error'
  what():  NMODL Parser Error : syntax error, unexpected / [Location : 1.25]
------------------------^

$ nmodl leonhard.mod --verbose debug host sympy --analytic
[NMODL] [debug] :: SympySolverVisitor :: -> solution: x = // Not supported in C:
// Integral
dt + Integral(1/sin(_y**2), (_y, x))
libc++abi: terminating with uncaught exception of type std::runtime_error: NMODL Parser Error : syntax error, unexpected / [Location : 1.25]
------------------------^

[1]    68964 abort      PYTHONPATH=./lib/ ./bin/nmodl test.mod --verbose debug host sympy --analytic

1uc avatar Dec 18 '23 16:12 1uc