From Release 10 on, EBSILONProfessional allows an evaluation of neural networks created by means of the NN-Tool by Professor Bärmann (FH Gelsenkirchen).
Please note that EBSILON supports only the evaluation of networks. The creation of new networks and also the configuration and training of existing networks are not possible
within Ebsilon. That means that a network that was loaded one time will always yield the same output for the same input.
For loading as well as for the evaluation of a neural network an additional license is required.
The integration is effected via Component 93 (Kernel-Scripting).
Networks can either be imported into the model (and are thus part of the .ebs file) or they can be loaded on-the-fly.
The import is effected on the sheet "Basic Properties" of Component 93 in the Properties dialog.
The evaluation is carried out by means of the EbsScript unit "@NNTool". The core of the unit consists in the evaluation functions that expect as input an "nntoolreference" (or a path) and an array with input values in each case and write the results into the "output" array.
The "real" variants expect only double values, also for category values (ie 0 or 1 for each of the possible values, and thus correspondingly more input values), each of which has an "nntoolreference" (or path) and an array expect input values as input and write the result into the "output" array.
Name |
Purpose |
Arguments |
Return value |
Example |
Evaluation functions |
||||
nnEvalReal |
Evaluates a loaded neural network with input and output values of type REAL |
Input: 1. CNNTOOLREFERENCE: Structure containing the ID reference code on the previously loaded network Output: |
NNTOOLRESULTENUM (details see Unit @NNTool) |
|
nnEvalString |
Evaluates a loaded neural network with input and output values of type STRING |
Input: 1. const NNTOOLREFERENCE: Structure containing the ID reference code on the previously loaded network Output: |
NNTOOLRESULTENUM (details see Unit @NNTool) |
|
nnEvalVariant |
Evaluates a loaded neural network with input and output values of type VARIANT |
Input: 1. const NNTOOLREFERENCE: Structure containing the ID reference code on the previously loaded network Output:
|
NNTOOLRESULTENUM (details see Unit @NNTool) |
Function for of single Evaluation
With each call, the net is loaded from the file (use nnLoad and nnEval [Real] with repeated evaluation for higher efficiency).
Name |
Purpose |
Arguments |
Return value |
Example
|
Functions for a single evaluation |
||||
nnLoadAndEvalReal |
Loads and evaluates a neural network for the given path with input and output values of type REAL |
Input: 1. STRING: Path to the neural network including filenames 3. ARRAY OF REAL: network output parameters |
NNTOOLRESULTENUM (details see Unit @NNTool) |
|
nnLoadAndEvalString |
Loads and evaluates a neural network for the given path with input and output values of type STRING |
Input: 1. STRING: Path to the neural network incl. file name 3. ARRAY OF STRING: network output parameters |
NNTOOLRESULTENUM (details see Unit @NNTool) |
|
nnLoadAndEvalVariant |
Loads and evaluates a neural network for the given path with input and output values of type Variant |
Input: 1. STRING: Path to the neural network including filenames
3. ARRAY OF VARIANT: network output parameters
|
NNTOOLRESULTENUM (details see Unit @NNTool) |
The nnLoad / nnUnload functions load or unload a network for the given path, whereas the
Function nnGetKsNNToolReference returns the references of an imported network.
Name |
Purpose |
Arguments |
Return value |
Example
|
nnLoad |
Loads a neural network for the given path and returns the network reference (a variable of type NNTOOLRESULTENUM) |
Input: 1. STRING: Path to the neural network including filenames Output: 2. NNTOOLRESULTENUM: |
NNTOOLREFERENCE - Structure containing the ID reference code on the loaded network |
|
nnUnload |
Discharges a previously charged neural network |
Input NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network |
NNTOOLRESULTENUM (details see Unit @NNTool) |
|
nnGetKsNNToolReference |
Returns the reference of a network loaded in component 93 |
Input: 1. EBSCOMP93: Reference to Comp. 93 2. NNTOOLRESULTENUM: |
NNTOOLREFERENCE - Structure containing the ID reference code on the loaded network |
Info-Functions:
Name |
Purpose |
Arguments |
Return value |
Example
|
nnGetPath |
Returns the path of the loaded net as a string |
Input: NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network |
STRING: the complete path incl. file name |
|
nnGetInputCount |
Returns the total number (real and string) of the input parameters of a network |
Input: NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network |
INTEGER: Number of |
|
nnGetInputRealCount |
Returns the number of input parameters of a network of the real type |
Input: NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network |
INTEGER: |
|
nnGetOutputCount |
Returns the total number (real and string) of the output parameters of a network |
Input: NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network |
INTEGER: Number of |
|
nnGetOutputRealCount |
Returns the number of output parameters of a net of the type Real |
Input: NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network |
INTEGER: |
|
nnGetName |
Returns the name of the parameter (input or output) for the specified index |
Input: 1. NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network 2. BOOLEAN: if true, then an input parameter, if false, then an output parameter 3. INTEGER: Index des Parameters |
STRING: Name of the parameter |
|
nnIsCategory |
It returns true or false depending on whether the requested parameter is a discrete value or a value of type Real |
Input: 1. NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network 2. BOOLEAN: if true, then an input parameter, if false, then an output parameter 3. INTEGER: index of the parameter |
BOOLEAN: true, if it is a discrete value (Category), otherwise false (Real) |
|
nnGetCategoryNames |
Returns the ARRAY of discrete parameter names |
Input: 1. NNTOOLREFERENCE: Structure containing the ID reference code on the loaded network |
ARRAY OF STRING: Names of the discrete parameters |
In the “examples” directory, there is an example model Optimierungsstudie_Shortcut_Modell_V10.ebs and the example network files Optimierung_100000_Datensaetze.wgt and Optimierung_100000_Datensaetze.dsc.