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

Reintroducing the 'Quantity' element #98

Open
tclose opened this issue May 18, 2015 · 1 comment
Open

Reintroducing the 'Quantity' element #98

tclose opened this issue May 18, 2015 · 1 comment

Comments

@tclose
Copy link
Contributor

tclose commented May 18, 2015

In editing earlier versions of the spec I removed the Quantity element as it seemed superfluous i.e. I changed

<Component name="Foo">
  <Definition>Bar</Definition>
  <Property name="param1">
    <Quantity units="mV">
      <SingleValue>-60.0</SingleValue>
    </Quantity>
  </Property>
  <Property name="param2">
    <Quantity units="pA">
      <SingleValue>10.0</SingleValue>
    </Quantity>
  </Property>
</Component>

to

<Component name="Foo">
  <Definition>Bar</Definition>
  <Property name="param1" units="mV">
      <SingleValue>-60.0</SingleValue>
  </Property>
  <Property name="param2" units="uF_per_mm2">
      <SingleValue>1.0</SingleValue>
  </Property>
</Component>

However, I am starting to think Andrew's suggestion in the recent meeting of reintroducing the Quantity tag in order to handle the introduction of "Generators" and PropertySendPorts, which will already provide the dimension of the value passed to the component, was a very good one, e.g.

<Component name="Foo">
  <Definition>Bar</Definition>
  <Property name="param1">
    <Quantity units="mV">
      <SingleValue>-60.0</SingleValue>
    </Quantity>
  </Property>
  <Property name="param2">
    <FromGenerator port="membraneCapacitance">
      <Reference url="http://nineml.net/catalog/1.0/NormallyDistributedCapacitance.xml">NormallyDistributedCapacitance</Reference>
      <Property name="mean">
        <Quantity units="none">
          <SingleValue>20.0</SingleValue>
        </Quantity>
      </Property>
      <Property name="variance">
        <Quantity units="none">
          <SingleValue>2.0</SingleValue>
        </Quantity>
      </Property>
    </FromGenerator>
  </Property>
</Component>

This example also raises another possible use for using Quantity elements, which could be to wrap dimensionless PropertySendPorts to avoid having to recreate new generators for combination of type of random distribution and unit dimension e.g.

<Component name="Foo">
  <Definition>Bar</Definition>
  <Property name="param1">
    <Quantity units="mV">
      <SingleValue>-60.0</SingleValue>
    </Quantity>
  </Property>
  <Property name="param2">
    <Quantity units="uF_per_mm2">
      <FromGenerator port="membraneCapacitance">
        <Reference url="http://nineml.net/catalog/1.0/NormalDistribution.xml">NormalDistribution</Reference>
        <Property name="mean">
          <Quantity units="none">
            <SingleValue>20.0</SingleValue>
          </Quantity>
        </Property>
        <Property name="variance">
          <Quantity units="none">
            <SingleValue>2.0</SingleValue>
          </Quantity>
        </Property>
      </FromGenerator>
    </Quantity>
  </Property>
</Component>

Another solution would be to make PropertySendPorts dimensionless, however I think in more complex examples you may want to generate related values of different dimensions, (weight and delays for example), although perhaps there would be other ways around this.

For dimensionless quantities the Quantity tag could potentially be dropped (especially for integer values) although this could make the parsing a little more complex.

@tclose
Copy link
Contributor Author

tclose commented May 18, 2015

Quantity elements would also be used in the State Layer, e.g.

<DynamicsState name="initialState">
  <Reference>Foo</Reference>
  <InRegime name="subthreshold"/>
  <StateValue name="V">
    <Quantity units="mV">
      <SingleValue>-65.0</SingleValue>
    </Quantity>
  </StateValue>
</DynamisState>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant