Skip to content

Commit c5781a5

Browse files
wouterwlnbvdmitri
andauthored
Update docs/src/plugins/constraint_specification.md
Co-authored-by: Bagaev Dmitry <[email protected]>
1 parent 9db5a94 commit c5781a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/plugins/constraint_specification.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ end
7373
While we can specify constraints over all instances of a submodel at a specific layer of the hierarchy, we're not guaranteed to have all instances of a submodel at a specific layer of the hierarchy. To this extent, we can specify default constraints that apply to all instances of a specific submodel. For example, we can define the following model, where we have a `recursive_model` instance at every layer of the hierarchy:
7474
```@example constraints
7575
@model function recursive_model(n, x, y)
76-
z ~ Normal(x, y)
76+
z ~ Gamma(1, 1)
7777
if n > 0
78-
y ~ recursive_model(n = n - 1, x = x)
78+
y ~ Normal(recursive_model(n = n - 1, x = x), z)
7979
else
80-
y ~ Normal(0, 1)
80+
y ~ Normal(0, z)
8181
end
8282
end
8383
```

0 commit comments

Comments
 (0)