Skip to content

Commit b26d580

Browse files
Merge pull request #2936 from contradict/document_irreducible
Add documentation for `irreducible` metadata
2 parents e037dfe + 42e5ea1 commit b26d580

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/src/basics/Variable_metadata.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ hasdist(m)
133133
getdist(m)
134134
```
135135

136+
## Irreducible
137+
138+
A variable can be marked `irreducible` to prevent it from being moved to an
139+
`observed` state. This forces the variable to be computed during solving so that
140+
it can be accessed in [callbacks](@ref events)
141+
142+
```julia
143+
@variable important_value [irreducible = true]
144+
```
145+
136146
## Additional functions
137147

138148
For systems that contain parameters with metadata like described above, have some additional functions defined for convenience.

0 commit comments

Comments
 (0)