# Is Convex.jl still working?

**URL:** <https://discourse.julialang.org/t/is-convex-jl-still-working/68624>\
**Category:** Optimization (Mathematical)\
**Tags:** question, package\
**Created:** [September 23, 2021, 10:06am UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624 "2021-09-23T10:06:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 23, 2021, 10:06am UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/1 "2021-09-23T10:06:52Z")

</div>

I would like to run an example for a class like the tutorials on Convex.jl, but these no longer work (they fail at the ‘solve’ step). I could use JUMP but I just want to do simple quadratic programming and the syntax of Convex.jl (at least the way it used to work) is nice and simple.

Perhaps there have been further syntax changes? First I tried

```julia
solve!(problem ,SCSSolver(verbose=true))

```

but then read that that had been superceded by

```julia
solve!(problem , () -> SCS.Optimizer(verbose=true))

```

but that doesn’t work, either.

Thanks for any help.

The error message for the latter is

```julia
MethodError: no method matching solve!(::Convex.Problem, ::Main.workspace4.var"#5#6")

Closest candidates are:

solve!(::Convex.Problem; warmstart, check_vexity, verbose) at /Users/d***/.julia/packages/Convex/MaqPQ/src/solution.jl:16

solve!(::Convex.Problem, !Matched::MathProgBase.SolverInterface.AbstractMathProgSolver; kwargs...) at /Users/d***/.julia/packages/Convex/MaqPQ/src/solution.jl:8

top-level scope@Local: 7
top-level scope@Local: 1

```

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [September 23, 2021, 10:10am UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/2 "2021-09-23T10:10:13Z")

</div>

> [@compleat](#):
>
> `Matched::MathProgBase.SolverInterface.AbstractMathProgSolver`

That looks like an old version of Convex.jl. What version do you have? Try

```julia
using Pkg
Pkg.add(name="Convex", version="0.14.5")

```

to get the latest (or hopefully get an informative error message about what packages are holding it back, if you can’t get the latest).

Convex definitely should still be working and every release is tested with a large test suite of problems by CI.

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 23, 2021, 10:24am UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/3 "2021-09-23T10:24:30Z")

</div>

Thanks - I’ll check that  
That was it! Thanks!

PS There are some tutorials on Convex.jl that are still using the old syntax.

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [September 23, 2021, 12:25pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/4 "2021-09-23T12:25:51Z")

</div>

> [@compleat](#):
>
> PS There are some tutorials on Convex.jl that are still using the old syntax.

Oh? Can you link them? (All the examples in the sidebar [in the docs](https://jump.dev/Convex.jl/stable/) are tested, so they should be working, unless something went wrong with the tests…)

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 23, 2021, 2:07pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/5 "2021-09-23T14:07:33Z")

</div>

Thanks. I teach a Masters’ Finance class, and I was going to ask them to run:  
[https://jump.dev/Convex.jl/v0.12/examples/portfolio\_optimization/portfolio\_optimization2/](https://jump.dev/Convex.jl/v0.12/examples/portfolio_optimization/portfolio_optimization2/)

I got this via search on google, and it looked like the official documentation, but looking now I see that the link address may not be the ‘official’ repo…

I would say that if it were updated, it would be an extremely useful example.

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [September 23, 2021, 3:09pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/6 "2021-09-23T15:09:06Z")

</div>

I guess I (another MSc finance teacher…) updated those portfolio examples some time ago and they look like here:  
[https://jump.dev/Convex.jl/stable/examples/portfolio\_optimization/portfolio\_optimization2/](https://jump.dev/Convex.jl/stable/examples/portfolio_optimization/portfolio_optimization2/)

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 23, 2021, 3:12pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/7 "2021-09-23T15:12:03Z")

</div>

Awesome! Thanks!

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [September 23, 2021, 3:55pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/8 "2021-09-23T15:55:42Z")

</div>

btw, here are some more finance applications of Convex (from my own teaching repository):

([https://github.com/PaulSoderlind/FinancialTheoryMSc/blob/master/Ch03b\_MV\_NoShortSales.ipynb](https://github.com/PaulSoderlind/FinancialTheoryMSc/blob/master/Ch03b_MV_NoShortSales.ipynb))

([https://github.com/PaulSoderlind/FinancialTheoryMSc/blob/master/Ch08\_PerfEval.ipynb](https://github.com/PaulSoderlind/FinancialTheoryMSc/blob/master/Ch08_PerfEval.ipynb))

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 23, 2021, 4:06pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/9 "2021-09-23T16:06:30Z")

</div>

Cool. Much obliged for that! Those will be really helpful [Got a class of 200 starting in 2 weeks!].  
Is there any Teaching Materials repository for Julia? [I have a few things myself.]

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [September 23, 2021, 5:14pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/10 "2021-09-23T17:14:15Z")

</div>

> [@compleat](#):
>
> I got this via search on google, and it looked like the official documentation, but looking now I see that the link address may not be the ‘official’ repo…

Ah, that is the official docs, but just an old version. You can see in the bottom left-corner that it says version `v0.12.7`; if you click on that, you can choose “stable” which means the latest released version of Convex.

Search engines giving old versions of docs is a common issue; we don’t really want to delete them because someone might be still using v0.12.7 and want to have the right docs for that version. But I filed [Add banner to old versions of Convex.jl docs · Issue #460 · jump-dev/Convex.jl · GitHub](https://github.com/jump-dev/Convex.jl/issues/460) to use some new Documenter features to add a warning banner in this case (maybe I or another open source contributor will get a chance to implement that, to avoid this issue).

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 23, 2021, 5:23pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/11 "2021-09-23T17:23:29Z")

</div>

That would be a very good idea, as this has happened to me dozens of times!  
[sometimes the package has been discontinued - which could also be flagged]

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [September 23, 2021, 6:04pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/12 "2021-09-23T18:04:12Z")

</div>

> Is there any Teaching Materials repository for Julia?

My own attempts are at ([GitHub - PaulSoderlind/JuliaTutorial: Julia Tutorial for Finance and Econometrics Students](https://github.com/PaulSoderlind/JuliaTutorial)). Maybe it can be of some use.

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 23, 2021, 6:19pm UTC](https://discourse.julialang.org/t/is-convex-jl-still-working/68624/13 "2021-09-23T18:19:30Z")

</div>

🙂
