Difference between revisions of "Component Guide IV: Plugins"

From Numerus
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
Plugins are additional components that provide special functionality. In future releases it will be possible for the user to create and add plugins of his/her own creation (a plugin writers guide is planned). We also anticipate future releases with plugin sets designed for specific application domains.
Plugins are additional components that provide special functionality. In future releases it will be possible for the user to create and add plugins of his/her own creation (a plugin writers guide is planned). We also anticipate future releases with plugin sets designed for specific application domains.


The current release of Numerus includes 2 plugins, which are described below.
The current release of Numerus includes 4 plugins, which are described below.


==Discrete State==
==Tabulator==
[[File: discretestate.png|left]]
[[File: tab.png|left]]
A Discrete State is an alternative to a Sequence in which a fixed number of named discrete states serve as possible values. A discrete state is initialized with one such value, and transitions are structured based on the current value.
A Tabulator is a special component that works with an aggregator in which a constituent (agent, cell, node) has either a Discrete State component or uses a Sequence to model a discrete state. The Tabulator counts the number of elements in each state and outputs the totals on separate pins. The states are expected to be consecutive numbers such as 0, 1, 2, etc. The sequence need not start at 0.
 
A Tabulator may include a specification for either a line graph or bar chart. When one of these is selected, the Property Pane shows properties for defining that graph. These same properties would be found on the Property Pane of the type of selected graph. (See the Wiki entries for [[Component Guide III: Displays and Controls#LineGraph|line graph]] and [[Component Guide III: Displays and Controls#BarChart|bar chart]] for details).
 
See ''Firespread'' in the model library for an example using the Tabulator. (The Property Pane from that model is shown below).
<br clear="all">
<br clear="all">
{|
 
|
[[File:tabprop1.png|200px|thumb|right]]
===Properties===
===Properties===
*'''State Names'''. States are identified initially as integers 0, 1, ... . Names can be substituted for clarity; note however that these names are constants bound to the integer values, and that the integers are actually still used as state values.
*'''Discrete Value Set Input'''. If this is unchecked, you must specify the numerical spread of the input states by providing the Base Value (i.e. starting point) and size.
*'''Next'''. A tab is provided for each state. Code implementing the transition from that state is entered into each tab. The rules for this code are identical to the rules specifying the value of a [[Component_Guide_I:_Atomic_Components#Component_Formulas|Component Formula]]. The result produced by the code must be another state.
**'''Size'''. The number of possible states. This determines the number of output pins on the Tabulator.
|[[File:discretestateprop.png]]
**'''Base Value'''. States run from Base Value through Base Value + Size - 1. For example, with a base value of -1 and and a size of 4, the states would be -1, 0, 1, 2.
|}
:If '''Discrete Value Set Input''' is checked, you must specify the Discrete Value Set (DSV) from the list of defined DSV's. Shortcut: You may click into the text field, open the list of DSV's, and right-click on the selected DSV.


==Tabulator==
*'''Graph'''. You may optionally define a graph within the Tabulator component. If a graph is selected, complete the property specification as you normally would for that type of graph.
[[File: tab.png|left]]
**'''Exclude'''. This list shows all of the states defined by the type of input selected. You may opt to exclude 1 or more of these from the graph by selecting (using the multiple-selection gesture of '''Shift-Down-Click''' if necessary) them in the list.
A tabulator is a special component that works with an aggregator in which a constituent (agent, cell, node) has either a Discrete State component or uses a Sequence to model a discrete state. The tabulator counts the number of elements in each state and outputs the totals on separate pins, primarily for graphing or displaying in a table. The states are expected to be consecutive numbers such as 0, 1, 2, etc. The sequence need not start at 0. (The sequence will, or course, always start at 0 if a Discrete State component is used.)


See ''Firespread'' in the model library for an example using the Tabulator.
<br clear="all">
<br clear="all">
{|
 
|
==Stats==
===Properties===
[[File: stats.png|left]]
*'''Size'''. The number of possible states. This determines the number of output pins on the Tabulator.
The Stats component computes mean and standard deviation of some parameter across the set of agents, cells or nodes at each point in time. Its 4 pins respectively output the mean, standard deviation, mean+standard deviation and mean-standard deviation. An optional line graph may also be specified.
*'''Base Value'''. States run from Base Value through Base Value + Size - 1.
 
|[[File:tabprop.png]]
See ''Foraging'' in the model library for an example using the Stats component.
|}

Latest revision as of 17:01, 14 October 2019

Plugins are additional components that provide special functionality. In future releases it will be possible for the user to create and add plugins of his/her own creation (a plugin writers guide is planned). We also anticipate future releases with plugin sets designed for specific application domains.

The current release of Numerus includes 4 plugins, which are described below.

Tabulator

Tab.png

A Tabulator is a special component that works with an aggregator in which a constituent (agent, cell, node) has either a Discrete State component or uses a Sequence to model a discrete state. The Tabulator counts the number of elements in each state and outputs the totals on separate pins. The states are expected to be consecutive numbers such as 0, 1, 2, etc. The sequence need not start at 0.

A Tabulator may include a specification for either a line graph or bar chart. When one of these is selected, the Property Pane shows properties for defining that graph. These same properties would be found on the Property Pane of the type of selected graph. (See the Wiki entries for line graph and bar chart for details).

See Firespread in the model library for an example using the Tabulator. (The Property Pane from that model is shown below).

Tabprop1.png

Properties

  • Discrete Value Set Input. If this is unchecked, you must specify the numerical spread of the input states by providing the Base Value (i.e. starting point) and size.
    • Size. The number of possible states. This determines the number of output pins on the Tabulator.
    • Base Value. States run from Base Value through Base Value + Size - 1. For example, with a base value of -1 and and a size of 4, the states would be -1, 0, 1, 2.
If Discrete Value Set Input is checked, you must specify the Discrete Value Set (DSV) from the list of defined DSV's. Shortcut: You may click into the text field, open the list of DSV's, and right-click on the selected DSV.
  • Graph. You may optionally define a graph within the Tabulator component. If a graph is selected, complete the property specification as you normally would for that type of graph.
    • Exclude. This list shows all of the states defined by the type of input selected. You may opt to exclude 1 or more of these from the graph by selecting (using the multiple-selection gesture of Shift-Down-Click if necessary) them in the list.


Stats

Stats.png

The Stats component computes mean and standard deviation of some parameter across the set of agents, cells or nodes at each point in time. Its 4 pins respectively output the mean, standard deviation, mean+standard deviation and mean-standard deviation. An optional line graph may also be specified.

See Foraging in the model library for an example using the Stats component.