Callable
new to Analytica 7.0
Callable class
A Callable Object is a Variable subclass. Like a Variable, it has a mid-value and a sample-value that are computed by evaluating its Definition.
The result of a Callable is expected to be a value that is itself callable with parameters. For example, its value might be a local function, a handle to an Analytica function, a python function, a python class, or even an array of these.
In other words, the Callable instance is a type of Variable, but its value is a function-like instance.
The Callable class provides two advantages over a Variable class. First, it displays with a function-like shape on an influence diagram, which may better reflect the logical purpose of the node, and second, it allows you to use a X(a,b,c) syntax to call it instead of the X->(a,b,c) syntax that would be required with a normal Variable. This is most useful when intermixing Python code. For example, when a Callable object's definition is set to be a Python expression that contains a function def or a class declaration.
Enable comment auto-refresher