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

ConditionalDerivedVariables and DerivedVariables #88

Open
kperun opened this issue Jun 8, 2017 · 3 comments
Open

ConditionalDerivedVariables and DerivedVariables #88

kperun opened this issue Jun 8, 2017 · 3 comments

Comments

@kperun
Copy link

kperun commented Jun 8, 2017

There seems to be a problem with ConditionalDerivedVariables in combination with DerivedVariables, e.g.

<ConditionalDerivedVariable dimension="DIM_mV" name="V_bounded">
               <Case condition="(V_m.leq.V_peak)" value="(V_m)"/>
               <Case condition="(V_m.gt.V_peak)" value="(V_peak)"/>
</ConditionalDerivedVariable>
           
           
<DerivedVariable dimension="none" name="exp_arg" value="(V_bounded-V_th)/Delta_T"/> 

results in an error stating that V_bounded in exp_arg can not be found. However, if we use V_bounded in a state assignment, it seems to work.
Is this a bug or some kind of intended behavior in order to, e.g., avoid circular dependencies?

Regards,
Konstantin

@pgleeson
Copy link
Member

pgleeson commented Jun 9, 2017

@kperun This is a known issue, see #68.

One way around this might be to only use ConditionalDerivedVariables; instead of the DerivedVariable use a ConditionalDerivedVariable with a single Case statement with no condition (or a condition that's always true)

@pgleeson
Copy link
Member

@kperun did you manage to work around that issue?

JustasB added a commit to JustasB/NeuroML2 that referenced this issue Mar 26, 2018
JustasB added a commit to JustasB/NeuroML2 that referenced this issue Mar 26, 2018
@borismarin
Copy link
Contributor

@pgleeson ConditionalDerivedVariables with single Case statements (no condition) are converted to meaningless if-else blocks in backends like neuron-mod. Conditions that are always true are the correct workaround here.

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

3 participants