You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A self contained unit of evaluation receiving input from other nodes on InputPort(s). The values from these are processed via a number of Function(s) and one or more final values are calculated on the OutputPort(s)
Allowed parameters
metadata
Optional
Optional metadata field, an arbitrary dictionary of string keys and JSON serializable values.
The OutputPort(s) containing evaluated quantities from the node
InputPort
The InputPort is an attribute of a Node which allows external information to be input to the Node
Allowed parameters
metadata
Optional
Optional metadata field, an arbitrary dictionary of string keys and JSON serializable values.
id
str
The unique (for this Node) id of the input port,
default_value
Union
Value to set at this input port if no edge connected to it.
shape
Optional
The shape of the input port. This uses the same syntax as numpy ndarray shapes (e.g., numpy.zeros(shape) would produce an array with the correct shape
type
Optional
The data type of the input received at a port.
reduce
Optional
Specifies how to deal with multiple inputs to one port during a single timestep: add: add up all the values; multiply: multiply the values, overwrite: just use the last value supplied (default)
Function
A single value which is evaluated as a function of values on InputPort(s) and other Functions
Allowed parameters
metadata
Optional
Optional metadata field, an arbitrary dictionary of string keys and JSON serializable values.
id
str
The unique (for this Node) id of the function, which will be used in other Functions and the OutputPorts for its value
Dictionary of values for each of the arguments for the Function, e.g. if the in-built function is linear(slope),the args here could be {"slope":3} or {"slope":"input_port_0 + 2"}
value
Union
If the function is a value expression, this attribute will contain the expression and the function and args attributes will be None.
Parameter
A parameter of the Node, which can be: 1) a specific fixed value (a constant (int/float) or an array) 2) a string expression for the value referencing other named Parameter(s). which may be stateful (i.e. can change value over multiple executions of the Node); 3) be evaluated by an inbuilt function with args; 4) or change from a default_initial_value with a time_derivative.
Allowed parameters
metadata
Optional
Optional metadata field, an arbitrary dictionary of string keys and JSON serializable values.
id
str
value
Union
The next value of the parameter, in terms of the inputs, functions and PREVIOUS parameter values
default_initial_value
Union
The initial value of the parameter, only used when parameter is stateful.
time_derivative
Optional
How the parameter changes with time, i.e. ds/dt. Units of time are seconds.
Dictionary of values for each of the arguments for the function of the parameter, e.g. if the in-build function is linear(slope), the args here could be {"slope": 3} or {"slope": "input_port_0 + 2"}
The shape of the output port. This uses the same syntax as numpy ndarray shapes (e.g., numpy.zeros(shape) would produce an array with the correct shape
type
Optional
The data type of the output sent by a port.
Edge
An Edge is an attribute of a Graph that transmits computational results from a sender's OutputPort to a receiver's InputPort.
Allowed parameters
metadata
Optional
Optional metadata field, an arbitrary dictionary of string keys and JSON serializable values.
id
str
A unique string identifier for this edge.
sender
str
The id of the Node which is the source of the edge.
receiver
str
The id of the Node which is the target of the edge.
sender_port
str
The id of the OutputPort on the sender Node, whose value should be sent to the receiver_port