# Where can I find documentation for instream()

**URL:** https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355
**Category:** Modelling & Simulations
**Tags:** modelingtoolkit
**Created:** [June 26, 2022, 12:18pm UTC](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355 "2022-06-26T12:18:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dodoplus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dodoplus/32/30148_2.png) [@dodoplus](https://discourse.julialang.org/u/dodoplus)
#### Post date: [June 26, 2022, 12:18pm UTC](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355/1 "2022-06-26T12:18:53Z")

</div>

It seems that MTK has an `instream()` operator.  
I think this is inspired by Modelica’s similarly named operator.

Are there any examples using `instream()`? I could only find a single test using it (in state\_selection.jl).

Thanks,  
DD

---

<div class="post-metadata">

### Author: ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)
#### Post date: [June 26, 2022, 2:08pm UTC](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355/2 "2022-06-26T14:08:46Z")

</div>

Not really an example

> <https://github.com/SciML/ModelingToolkit.jl/blob/44405a796d9e91ebe67ec1dec2caed06a81885dc/test/state_selection.jl#L49>

---

<div class="post-metadata">

### Author: ![dodoplus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dodoplus/32/30148_2.png) [@dodoplus](https://discourse.julialang.org/u/dodoplus)
#### Post date: [June 26, 2022, 2:29pm UTC](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355/3 "2022-06-26T14:29:07Z")

</div>

Yeah - that’s the one I found. Not very illuminating.

I more-or-less understand Modelica `inStream`. However, there they also have an `actualStream` operator which is missing here. I _think_ `actualStream` can be implemented via `ifelse`, so I’m not sure we need it.

---

<div class="post-metadata">

### Author: ![dodoplus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dodoplus/32/30148_2.png) [@dodoplus](https://discourse.julialang.org/u/dodoplus)
#### Post date: [June 26, 2022, 2:30pm UTC](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355/4 "2022-06-26T14:30:36Z")

</div>

PS:

[https://github.com/SciML/ModelingToolkit.jl/issues/1666](https://github.com/SciML/ModelingToolkit.jl/issues/1666)
