Filed modules and libraries

Revision as of 01:53, 11 February 2016 by Bbecane (talk | contribs)

Models and modules

Modules and libraries can be components of a model. If you are building several similar models, or if you are building a large model composed of similar components, you can create modules and libraries for reuse. (See Building Functions and Libraries for details about libraries.) To use a module or library in more than one model, create a filed module or filed library.

Creating a filed module or library

To create a filed module or library:

  1. Create a module by dragging the module icon from the node palette onto the diagram, and give it a title.
  2. Create functions and variables in the module, or create them elsewhere and move them into the module.
  3. Change the class of the module to Module Chapter19 14.png or Library Chapter19 15.png
  4. The Save As dialog appears. Give the filed module or library a name and save it.
  5. If you want the original model to load the new filed module or library the next time it is opened, save the model using the Save command.

Locking a filed module or library

To prevent a filed module or library from being modified, lock it:

  1. Close the filed module or library, or close Analytica.
  2. In Windows Explorer, select the filed module or library.
  3. Select Properties from the File menu.
    Chapter19 16.png
  4. Check the Read-only checkbox.
  5. Close the Properties window

Adding a module to a model

To add a filed module to the active model, use the Add Module dialog. You can either embed a copy of the module or link to the original of the filed module.

Adding library to a model

To add a filed library to the active model, use the Add Module dialog. You can either embed a copy of the library or link to the original of the filed library. When you select Add Library from the File menu, the Open File dialog always opens up to fixed directory, regardless of the current directory settings or previous changes of directories. The directory is determined by a registry setting in /Lumina Decision Systems/Analytica/ 3.0/AddLibraryDir, which is set by the Analytica installer to INSTALLDIR/Libraries.

Removing a module or library from a model

To remove a filed module or library from a model, first select it. Then, select Cut or Clear from the Edit menu. An embedded copy is deleted; a linked original still exists as a separate file.

Saving changes

After you have linked to a filed module or library, the Save command saves every filed module and library that has changed, as well as the model containing them, in their corresponding files. The Save As and Save A Copy In commands save only the active (topmost window’s) model, filed module or filed library.

See Also


Comments


You are not allowed to post comments.