Skip to content

Commit

Permalink
include table - minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Jun 1, 2022
1 parent 38d4fe9 commit c56df46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
12 changes: 6 additions & 6 deletions actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ S_0 @Const {units: uM} = 1e-2;

## include

The `include` action is an alternative to [include statement](./syntax?id=include-statement).
The `include` action is an alternative to [include statement](./syntax#include-statement).

The include action works at the modules level. It does not create or update the component but loads another file inside the current one.

Expand Down Expand Up @@ -258,7 +258,7 @@ The `setNS` action (or the `namespace` statement) must be used prior to the crea

The `setScenario` action creates a "scenario" object that describes model simulations.
Scenario describes the particular simulation conditions for a model with the updated constants, switchers, outputs and time ranges.
Using Scenarios one can create a series of model variants which are based on the same expressions but must be simulated separately.
Using `Scenario`s one can create a series of model variants which are based on the same expressions but must be simulated separately.

Scenarios have their own identifier and do not rewrites components. You can create `scn1` scenario and `scn` `@Const` at the same time and use them independently.

Expand Down Expand Up @@ -322,17 +322,17 @@ s1 @Species {compartment: comp1} .= 0;

## importNS

1. The `importNS` clones all content of the namespace to another one. This action allows us to share components between different namespaces.
1. The `importNS` clones all content of the namespace into another one. This action allows us to reuse components within different namespaces.

1. When using `importNS` both namespaces declared in `space` and `fromSpace` must exist.

1. The ids of components can be changed using `prefix`, `suffix`, `rename` properties. If no `prefix`, `suffix`, `rename` is declared the ids remain the same.
1. Identifiers of components can be updated using `prefix`, `suffix`, `rename` properties. If no `prefix`, `suffix`, `rename` is declared identifiers remain the same.

1. If `prefix` or `suffix` are declared (for example as `pref_`, `_suf`) the id updates follows the rules: `old_id` => `pref_old_id_suf`. `prefix` and `suffix` do not work for component of classes: `unitDef`.
1. If `prefix` or `suffix` are declared (for example as `pref_`, `_suf`) the id changes follows the rules: `old` => `pref_old_suf`. `prefix` and `suffix` do not act on a component of classes: `unitDef`.

1. `rename` states the rename rule directly. If `rename` set rule for id, `suffix` and `prefix` not used for the particular id.

1. Renaming id rules change references.
1. Renaming id rules updates also references.

| property | type | required | default | ref | description |
| ---------|------|----------|---------|-----|-------------|
Expand Down
12 changes: 3 additions & 9 deletions modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,11 @@ This might be useful for very large-scale models.
The first row must include property identifiers, the other rows includes the values of the properties.
The column with reserved header `on` can be used to turn off the import of the row. Zero value here means: "do not compile this line".

Path rules:

- nested properties are shown by dot (.) notation
- arrays are noted by `[]` at the end of path. Array items are splitted by `;` symbol.
- empty cells do not define any value.

Additional properties in insert action:
Additional properties of `#include` action:

- `omitRows` property can be set to skip several rows between header (first row) and component rows.
- `sheet` property clarify which sheet should be loaded starting from 0, the default value is `0`;
The XLSX file can include any number of sheets but each sheet must be included separately.
- `sheet` property clarify which sheet should be loaded starting from `1`, the default value is `1`;
This is useful for formats supporting multiple sheets like XLSX. For this case file can include any number of sheets but each sheet must be included separately by a separate `#include` statement.

**Example:**

Expand Down

0 comments on commit c56df46

Please sign in to comment.