Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/src/model_creation/dsl_advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,33 @@ plot(sol)
```
Please note that `X₀` is still a parameter of the system, and as such its value must still be designated to simulate the model (even if it is not actually used).

### [Accessing species and parameter names](@id species_and_parameter_names)
Sometimes you may need to access the name for a part of a model as a `Symbol` (which you could then convert to a `String`).
This can be done with `ModelingToolkit.getname`.

```@example species_and_parameter_names
rn = @reaction_network begin
@species X(t)
@parameters k
k, X --> 0
end
```

```@example species_and_parameter_names
rn.X

ModelingToolkit.getname(rn.X)

rn.k

ModelingToolkit.getname(rn.k)
```

For parameters you can also use `nameof`
```@example species_and_parameter_names
nameof(rn.k)
```

### [Designating metadata for species and parameters](@id dsl_advanced_options_species_and_parameters_metadata)
Catalyst permits the user to define *metadata* for species and parameters. This permits the user to assign additional information to these, which can be used for a variety of purposes. Some Catalyst features depend on using metadata (with each such case describing specifically how this is done). Here we will introduce how to set metadata, and describe some common metadata types.

Expand Down