November 2017
Beginner
316 pages
6h 40m
English
Convex.jl is a Julia package for disciplined convex programming. To use Convex, we also need a solver, which in this case will be SCS:
julia> Pkg.add("Convex")
julia> Pkg.add("SCS")
The following is a simple example of how to use Convex.jl. More can be found out at the official documentation of Convex.jl listed at http://nbviewer.jupyter.org/github/JuliaOpt/Convex.jl/tree/master/examples/:
julia> using Convexjulia> X = Variable(2, 2) Variable of size: (2, 2) sign: Convex.NoSign() vexity: Convex.AffineVexity() julia> y = Variable() Variable of size: (1, 1) sign: Convex.NoSign() vexity: Convex.AffineVexity() julia> p = minimize(vecnorm(X) + y, 2 * X <= 1, X' + y >= 1, X >= 0, y >= 0) Problem: minimize AbstractExpr with head: + size: ...
Read now
Unlock full access