# StructJuMP

**URL:** <https://discourse.julialang.org/t/structjump/27797>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [August 21, 2019, 12:41pm UTC](https://discourse.julialang.org/t/structjump/27797 "2019-08-21T12:41:48Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [August 21, 2019, 12:41pm UTC](https://discourse.julialang.org/t/structjump/27797/1 "2019-08-21T12:41:49Z")

</div>

Any advice on how to get the extensive form from a `StructuredModel`?

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [August 21, 2019, 1:24pm UTC](https://discourse.julialang.org/t/structjump/27797/2 "2019-08-21T13:24:25Z")

</div>

I’m not aware of the functionality within StructJuMP. The best you could do would be to manually construct it yourself using the internal [fields of `StructuredModel`](https://github.com/StructJuMP/StructJuMP.jl/blob/0bcbdd33cbf2d881067ede924f79ea6d1d0b1a2d/src/StructJuMP.jl#L20-L22).

However, if you use SDDP.jl ([https://github.com/odow/SDDP.jl](https://github.com/odow/SDDP.jl)) instead of StructJuMP to formulate problems, then there is a `SDDP.deterministic_equivalent` which will return a JuMP model that is the extensive form. See  
[https://odow.github.io/SDDP.jl/latest/tutorial/08\_debugging/#Solve-the-determinstic-equivalent-1](https://odow.github.io/SDDP.jl/latest/tutorial/08_debugging/#Solve-the-determinstic-equivalent-1)

---

<div class="post-metadata">

**Author:** ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)\
**Post date:** [August 21, 2019, 3:17pm UTC](https://discourse.julialang.org/t/structjump/27797/3 "2019-08-21T15:17:45Z")

</div>

This is implemented here: [https://github.com/JuliaStochOpt/StructDualDynProg.jl/blob/master/src/WaitAndSee/waitandsee.jl](https://github.com/JuliaStochOpt/StructDualDynProg.jl/blob/master/src/WaitAndSee/waitandsee.jl)
