# Sensitivity (post-optimality) analysis of a linear model?

**URL:** https://discourse.julialang.org/t/sensitivity-post-optimality-analysis-of-a-linear-model/16785
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [October 25, 2018, 1:57pm UTC](https://discourse.julialang.org/t/sensitivity-post-optimality-analysis-of-a-linear-model/16785 "2018-10-25T13:57:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![amca01](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amca01/32/5853_2.png) [@amca01](https://discourse.julialang.org/u/amca01)
#### Post date: [October 25, 2018, 1:57pm UTC](https://discourse.julialang.org/t/sensitivity-post-optimality-analysis-of-a-linear-model/16785/1 "2018-10-25T13:57:59Z")

</div>

I have been experimenting with simple LP problems using JuMP and the solvers `CbcSolver` and `GLPKSolverLP`. (I’d like to try `ClpSolver` but I keep getting errors when I try to build it.) Now I can solve my models fine, but what I want to do is some sensitivity analysis: shadow prices of the constraints, and ranges of the objective coefficients, for example. However, I can’t find any documentation about how to do this. I know that I could do this with GLPK - which is basically using glpk with its Julia front-end. Is that the best way, or is there some Julia function built into JuMP for sensitivity analysis? Thanks!

---

<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: [October 25, 2018, 4:12pm UTC](https://discourse.julialang.org/t/sensitivity-post-optimality-analysis-of-a-linear-model/16785/2 "2018-10-25T16:12:01Z")

</div>

> I’d like to try `ClpSolver` but I keep getting errors when I try to build it.

What version of Julia and Clp are you using? What platform? What is the full error?

> but what I want to do is some sensitivity analysis: shadow prices of the constraints

Do you want the value (because you can just call `getdual` from JuMP)? Or the range in which the current dual is valid?

> or is there some Julia function built into JuMP for sensitivity analysis?

Not yet. You need to call through to the underlying solver. See this feature request: [Feature Request: sensitivity summary for LPs · Issue #1332 · jump-dev/JuMP.jl · GitHub](https://github.com/JuliaOpt/JuMP.jl/issues/1332)

---

<div class="post-metadata">

### Author: ![amca01](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amca01/32/5853_2.png) [@amca01](https://discourse.julialang.org/u/amca01)
#### Post date: [October 25, 2018, 11:32pm UTC](https://discourse.julialang.org/t/sensitivity-post-optimality-analysis-of-a-linear-model/16785/3 "2018-10-25T23:32:44Z")

</div>

Thank you!

With regard to versions: Julia 1.0.1, Clp v0.5.0 . When I enter `Pkg.build(“Clp”), this is what I get:

```julia
 
Building Clp → `~/.julia/packages/Clp/qWiux/deps/build.log`
┌ Error: Error building `Clp`:
│ % Total % Received % Xferd Average Speed Time Time Time Current
│ Dload Upload Total Spent Left Speed
100 172 0 172 0 0 191 0 --:--:-- --:--:-- --:--:-- 191
100 622 0 622 0 0 525 0 --:--:-- 0:00:01 --:--:-- 525
100 3355 100 3355 0 0 1378 0 0:00:02 0:00:02 --:--:-- 4672
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │ caller = ip:0x0
│ └ @ Core :-1
│ ERROR: LoadError: LoadError: LibraryProduct(nothing, ["libcoinblas"], Symbol(""), "Prefix(/home/amca/.julia/packages/Clp/qWiux/deps/usr)") is not satisfied, cannot generate deps.jl!            
│ Stacktrace:
│ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/amca/.julia/packages/BinaryProvider/1nGWd/src/Products.jl:408                                        
│ [2] write_deps_file(::String, ::Array{LibraryProduct,1}) at /home/amca/.julia/packages/BinaryProvider/1nGWd/src/Products.jl:395                                                                 
│ [3] top-level scope at none:0
│ [4] include at ./sysimg.jl:29 [inlined]
│ [5] include(::String) at ./loading.jl:1076
│ [6] top-level scope at none:0
│ in expression starting at /home/amca/.julia/packages/Clp/qWiux/deps/build_COINBLASBuilder.v1.4.6.jl:45                                                                                           
│ in expression starting at /home/amca/.julia/packages/Clp/qWiux/deps/build.jl:38
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069

```

I’m not sure what is causing this error, but I’d be delighted of any advice!
