# Nested task exception while using Cbc (COIN-OR Branch and Cut) solver inside SDDP.jl

**URL:** <https://discourse.julialang.org/t/nested-task-exception-while-using-cbc-coin-or-branch-and-cut-solver-inside-sddp-jl/128683>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [May 4, 2025, 9:06am UTC](https://discourse.julialang.org/t/nested-task-exception-while-using-cbc-coin-or-branch-and-cut-solver-inside-sddp-jl/128683 "2025-05-04T09:06:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Engr\_Moiz\_Ahmad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/engr_moiz_ahmad/32/214621_2.png) [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Post date:** [May 4, 2025, 9:06am UTC](https://discourse.julialang.org/t/nested-task-exception-while-using-cbc-coin-or-branch-and-cut-solver-inside-sddp-jl/128683/1 "2025-05-04T09:06:56Z")

</div>

I am dealing with a multi-stage mixed-integer stochastic global supply chain optimization problem and want to solve the stage-wise problem instances using the Cbc (and other solvers) within the SDDiP algorithm using the [SDDP.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/SDDP) package in Julia.

In this regard, I am getting the following nested task exception while trying to use the Cbc solver to solve stagewise subproblems.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/e/4e43d865d8ae88b4e3b160141f8294ac22bbb5a1.png)

---

<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:** [May 4, 2025, 7:42pm UTC](https://discourse.julialang.org/t/nested-task-exception-while-using-cbc-coin-or-branch-and-cut-solver-inside-sddp-jl/128683/2 "2025-05-04T19:42:26Z")

</div>

Cbc.jl doesn’t support dual solutions. You cannot use it with SDDP.jl.

---

<div class="post-metadata">

**Author:** ![Engr\_Moiz\_Ahmad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/engr_moiz_ahmad/32/214621_2.png) [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Post date:** [May 5, 2025, 12:48pm UTC](https://discourse.julialang.org/t/nested-task-exception-while-using-cbc-coin-or-branch-and-cut-solver-inside-sddp-jl/128683/3 "2025-05-05T12:48:19Z")

</div>

Got it. Is it the issue with the rapper the Cbc.jl or the solver the Cbc itself?

If its a solver issue, can you explain why the Cbc is usable to provide dual solutions?

---

<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:** [May 5, 2025, 7:11pm UTC](https://discourse.julialang.org/t/nested-task-exception-while-using-cbc-coin-or-branch-and-cut-solver-inside-sddp-jl/128683/4 "2025-05-05T19:11:11Z")

</div>

It’s a bit of both. Cbc is the MIP solver. It uses the LP solver Clp to solve the LP subproblems. But there is no API in Cbc to query the dual value found by Clp.

Regardless though, you should not use Cbc.jl or Clp.jl with SDDP.jl. The way that the Julia wrappers are structured mean that they will not be efficient. Just use HiGHS instead.

---

<div class="post-metadata">

**Author:** ![Engr\_Moiz\_Ahmad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/engr_moiz_ahmad/32/214621_2.png) [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Post date:** [May 5, 2025, 7:17pm UTC](https://discourse.julialang.org/t/nested-task-exception-while-using-cbc-coin-or-branch-and-cut-solver-inside-sddp-jl/128683/5 "2025-05-05T19:17:40Z")

</div>

Got it.
