General overview

Table of contents


1. Introduction

The Supervision module of the SALOME platform allows to define and execute a chain of distributed numeric components, as well as to control the progress of this chain. The various calculations to be chained and the exchanged data are specified in a computing scheme, which can be of two types :

Of simple conception, the data flow schemes can be built in a graphic way and validated automatically by the supervision engine.

The script type computing schemes, which offer the possibility of building complex chains, should be conceived by warned users (developers) who master the syntax and the use of the scripting language.

Once specified and validated, certain computing schemes defined by scripts can be made customizable (input and output data, parameter sets) and integrated into the platform to form components. These components can be used to build schemes of higher level.

Besides the definition of computing schemes, the Supervision module must also take care of their execution and follow-up (complete execution or step by step) :

The user can visualize the progress of the scheme and the exchanged data, be informed about the evolution of the execution of a component (errors, warning, tracks, ...), to intervene by stopping, pausing or by resuming the execution of the scheme or a particular component.

Back to the contents

2. Defintions

2.1 Computing scheme of type DataFlow

The computing schemes of type dataflow, feasible by the Supervision module, are directed acyclic graphs, described by a set of nodes and of directed links. A node represents a service of an instance of a computation component.

A node is provided with input port(s) and/or output port(s). The input port(s) (resp. output port(s)) represent the input argument(s) (resp. output argument(s)) of the service. Certain services can possibly require the use of parameters which will be grouped together in configuration files (defined in the Data/Properties module, and recorded in the study).

The computing schemes of type data flow do not contain either loops, conditional branches or any operation of control. They can thus be built easily in a graphic way, by connecting output ports to input ports of nodes. Although the graphic construction is the simplest way, these computing schemes can also be defined in the language of script.

A node represents a service (function, method) of an instance of a component. If the component possesses a unique service (“Run” method), one will omit the term “service of”. Various services of the same component can be used in various nodes of the graph, or the same service can be used several times.

2.2 Types of nodes

In the SUPERVISION module there are the following types of nodes:

The dependance between different types of nodes is shown on the following picture:

2.2.1 Computation node

This node represents a computation algorithm in the graph structure. Nodes of such type can present a service registered in the Component Catalog (Factory Node) or an external service defined in Python script by user (InLine node). Python function of InLine node can be edited in Supervision Graph edit mode.

2.2.2 Loop node

Loop node is a kind of Control nodes. In fact two nodes represent Loop: start loop and end loop nodes. Nodes of such type are always InLine nodes. User have to supply this type of node by service, which will check conditions of end of loop.

With that kind of nodes may be defined all kinds of loops:

“for( initial condition(s) ; end condition(s) ; end loop code )” or

“while( end condition )”

etc…

Here you can see a simple example of Python functions set in a Loop node:


def Init(Index,Min,Max,Incr) :  

    if Min <= Max :  

        Index = Min  

    else :  

        Index = Max  

    return Index,Min,Max,Incr  

 

def More(Index,Min,Max,Incr) :  

    if Index < Max :  

        DoLoop = 1  

    else :  

        DoLoop = 0  

    return DoLoop,Index,Min,Max,Incr  

 

def Next(Index,Min,Max,Incr) :  

    Index = Index + Incr  

    return Index,Min,Max,Incr

2.2.3 Switch node

Switch node is a kind of Control node. In fact two nodes present Switch: start Switch and end Switch. Nodes of such type are always InLine nodes. You have to supply this type of node by service, which will perform switching. That's why nodes of such type can have at least two or more switch ports (Boolean), but only one switch port can have "True" value at a definite moment of graph execution.

With that kind of node you can define all kinds of tests or switches :

“if( condition ) ; else if( condition ) … ; else” or

“switch( variable ) ; case value …; default”.

Etc…

The associated Python function will have all input ports of the Switch node as input arguments. And that function must return a value for all output ports. A simple example of this Python function:


  
def Switch(x):    

	i1=0    

	i2=0    

	i3=0    

	if x>13:    

		i1=1    

	elif x==13:    

		i2=1    

	else:    

		i3=1    

	return i1,i2,i3 
 

In this example i1, i2, i3 parameters of the function correspond to Switch ports of the node. So, depending on the result of execution of the initial condition (in our case it's a comparison of the input parameter with an integer 13), one of the switch ports will get the value 1. And this port will transmit further dataflow to the corresponding node.

2.2.4 GOTO node

GOTO node represents a simple transmitter of data from one port into another. This InLine node can be with service or without it. In the first case the data received by a GOTO node will be processed by this function and only after that it will be transferred to another node. GOTO nodes may have as many Input and Output ports as it's necessary.

Back to the contents

3. SUPERVISION module features and services

The functionality of the SUPERVISION module is provided by a set of classes which are combined into the SUPERV package.

The API reference of the SUPERVISION component can be found here.

3.1 CNode class

This is a base class of the SUPERVISION module. It contains a set of methods allowing:

The API reference for this class can be found here.

3.2 FNode class

This class is necessary for management of Factory nodes in the data flow. Besides the inherited methods it contains some methods allowing to define the component from the container, which will be called for execution of the calculation.

The API reference for this class can be found here.

3.3 INode class

This class is necessary for management of Inline nodes in the data flow. Besides the inherited methods it contains some methods allowing to set the Python function, which will be executed for performing calculations, as well as input and output parameters for the node.

The API reference for this class can be found here.

3.4 GNode class

This class is necessary for management of GOTO nodes in the data flow. Besides the inherited methods it contains some methods allowing to define the couple node, which will be linked to this one.

The API reference for this class can be found here.

3.5 LNode class

This class is necessary for management of Loop nodes (or Start Loop nodes) in the data flow. Besides the inherited methods it contains some methods allowing to define the Python function, which will control the loop.

The API reference for this class can be found here.

3.6 ELNode class

This class is necessary for management of End Loop nodes (or start Loop nodes) in the data flow.

The API reference for this class can be found here.

3.7 SNode class

This class is necessary for management of Switch nodes (or Start Switch nodes) in the data flow.

The API reference for this class can be found here.

3.8 ESNode class

This class is necessary for management of End Switch nodes in the data flow.

The API reference for this class can be found here.

3.9 Graph class

This class is used for management of a data flow. It contains a set of methods, which allows:

The API reference for this class can be found here.

3.10 Link class

This class contains a set of methods used for representation and management of the links connecting nodes in a data flow.

The API reference for this class can be found here.

3.11 Value class

This class contains a set of methods used for management of the values which can be set in the ports of nodes.

The API reference for this class can be found here.

3.12 Port class

This class contains a set of methods used for management of the ports of the nodes in a data flow:

The API reference for this class can be found here.

3.13 SuperG class

The main class of the SUPERVISION ccomponent which is used for construction and initialization of a data flow.

The API reference for this class can be found here.

Back to the contents