Module

Modules simplify the creation of large models.

What is a module?
Modules are building blocks which can be used to create models with less effort compared to using only basic elements like neurons and pipes.

In principle, a module is nothing more than a model From a technical point of view, it can therefore be said that a module is a model and every model can be used as a module. The main difference lies in the use. Modules are created and specially prepared to be used as building blocks, which can be used in different models. Modules can also be used multiple times in one model.
 * All commands and features working for models also work for modules
 * The external storage format of models and modules is identical
 * Module files have the extension ".mod" as do model files

Creating modules
As every model can be considered a module, creating a module basically means nothing else as saving a model to disk. However, in order to optimally fulfil its purpose as a reusable building block, a module should be prepared in a special way. A module should be equipped with connectors. The purpose of a module is to be reused several times. That means, modules will be connected to models and to other modules. Connecting means to plug output liness of one module into input liness of another module. Typically input/output lines do not occur individually but in groups. Often a large number of lines must be connected, which can be tedious and time consuming.

For example a group of ten output lines has to be connected to a corresponding group of ten input lines. This can be done with ten connect operations. Move the mouse cursor over an output line. Press the left mouse button and drag the output line over an input line, then release the mouse button. Repeat ten times. Done.

If you imagine that a module is used many times, there will be a lot of manual connection work, including including numerous false clicks and other errors. This is where connectors come into play. A connector is a group of input or output lines that are firmly connected to each other. In analogy to sockets and plugs in electronic devices, connectors come in two different flavours: Input connectors, consisting of input lines and output connectors, consisting of output lines. Connectors allow multiple connections to be established in one step. The user can plug an input connector into an output connector, similar to plugging connectors in electronic devices.

Select a group of input (or output) lines and choose the Make connector command. The input (output) lines will automatically move close to each other and build a unit. Repeat this process with all peripheral lines of the module.

Now the module is prepared to be reused efficiently. Save it with a descriptive name.

Adding modules to models
The decisive point for the usage of a module is the command Add module. In contrast to Open model, the "Add Model" command does not replace the current model by a different model, but the newly read model is added to the the current model. This way, any large models can be constructed in a short time, by adding prefabricated components. Typically, the first action after adding a module is to move the module to another position. The added module will appear at the absolute position where it was, when it was saved to disk. Often this means that it ends up in the middle of the existing model and is difficult to separate from it. Therefore the newly added module is selected and any existing selection will be deleted beforehand. S0 you can move the new module with the move selection operation immediately. A newly added module initially has no connection to the rest of the model. The user's next task is to connect input neurons and output neurons to form a coherent network. If you equipped the module with connectors, this can be done with ease. Just move an input connector over a fitting output connector (or vice versa) and release the mouse button. With a nice animation the two connectors will plug. See plug connector for details.

List of commands related to modules

 * Add module
 * Make connector
 * Disconnect
 * Plug connector
 * Split