Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 2.83 KB

root.md

File metadata and controls

65 lines (41 loc) · 2.83 KB

Atoms


Root

The Root atom is represented by the first node of the tree in the Tree View. The context menu of the Root atom allows to create child atoms, also see below.

Source code

/src/root/root.js

Construction

There are two ways to create a new Root atom:

  • Click on the Create root button in the toolbar of the Tree View. This action deletes the current content of the Tree View and creates a new Root atom.

  • Copy the below JavaScript source code to the Editor View, correct the import path if required, and import it to the TreeView:

Example code for stand-alone installation:

import Root from './src/root/root.js';

window.createModel = function () {
    let root = new Root();
    return root;
}

Example code for Jupyter Notebook extension:

import Root from './treezjs/src/root/root.js';

window.createModel = function () {
    let root = new Root();
    return root;
}

Child atoms

If you right-click on the Root atom in the Tree View, you will see some context menu actions that allow you to add child atoms:

As an alternative to the tree node operations, you can also add child atoms to the Root atom by editing the JavaScript source code. Follow the above links to the child atoms for some examples.

Purpose of the child atoms

As already stated in the introduction, the atoms that come with Treez are thought to model an exemplary simulation work flow.

The atom Models Models typically includes, as the name suggest, some models. The first step of the simulation work flow is to fill that part of the tree with meaningful content. A model can be started manually with a specific set of properties.

If you want to run a model many times, for example to perform a sensitivity study, it often makes sense to automate this tedious task. The purpose of the atoms that can be found under the Studies Studies atom is the automated model execution.

Finally, the results of the model runs are inspected and evaluated with the last part of the tree: the Results Results atom and its children.


Models Models