Help on decision to choose Julia for my convex optimization project


#1

I have 2 weeks for my term project (basically simulation of convex optimization problem based on a paper). I’m quite comfortable with Matlab and Python and know CVX. However, I wanted to use this chance and dive into Julia. What I don’t know is how mature the language and its package (e.g. support of CVX) is? I want to decide the Julia as my language of choice and use this opportunity to learn the language but in the meantime I have an approaching deadline in 2 weeks and I want to know a comparison in support of CVX or disciplined solver for a convex optimization problem (or JuMP?) For example in Python I just write the problem in cvx and it’s mostly done. Is this the case with Julia as well?


#2

Convex.jl is updated and works on julia v1.0 and is fairly straightforward to use. Convex.jl is the julia version of CVX.
JuMP is more actively developed and can just solve far more kinds of problems, so there might be a point learning JuMP even if your current problems are convex.

Edit: Browsing around in the repos a bit, it seems that Convex.jl has some nasty bugs that have gone unadressed for a long time, also worth considering.


#3

I think JuMP should be very well-suited for this kind of project.

That should be the case with JuMP as well. However, it may be the case that CVXPY does more problem reformulations automatically. For example, CVXPY has a log_sum_exp function that is automatically transformed into an exponential cone constraint (https://www.cvxpy.org/api_reference/cvxpy.transforms.html, https://docs.mosek.com/modeling-cookbook/expo.html#log-sum-exp). JuMP doesn’t recognize log(sum(exp(...))) as a convex, exponential-cone-representable expression, so you might have to do more of these transformations manually. In contrast, Convex.jl does do these kinds of transformations (and probably in a nicer way than CVXPY), but is perhaps not as actively maintained.