Skip to content
프로젝트

소개

규율화된 볼록 프로그래밍을 위한 Julia 패키지

기타 프로젝트

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Convex.jl

CI Coverage

Convex.jl is a Julia package for Disciplined Convex Programming (DCP).

Convex.jl can solve linear programs, mixed-integer linear programs, and DCP-compliant convex programs using a variety of solvers, including Mosek, Gurobi, ECOS, SCS, and GLPK, through MathOptInterface.

Convex.jl also supports optimization with complex variables and coefficients.

Getting help

For usage questions, please contact us via Discourse.

If you have a reproducible example of a bug, please open a GitHub issue.

Installation

Install Convex using the Julia package manager:

import Pkg
Pkg.add("Convex")

Quick Example

# Let us first make the Convex.jl module available
using Convex, SCS

# Generate random problem data
m = 4;  n = 5
A = randn(m, n); b = randn(m, 1)

# Create a (column vector) variable of size n x 1.
x = Variable(n)

# The problem is to minimize ||Ax - b||^2 subject to 0 <= x <= 1
# This can be done by: minimize(objective, constraints)
problem = minimize(sumsquares(A * x - b), [x >= 0, x <= 1])

# Solve the problem by calling solve!
solve!(problem, SCS.Optimizer)

# Check the status of the problem
problem.status

# Get the optimal value
problem.optval

Using with JuMP

Convex.jl contains an experimental JuMP solver. This solver reformulates a nonlinear JuMP model into a conic program using DCP. Note that it currently supports only a limited subset of scalar nonlinear programs, such as those involving log and exp.

julia> using JuMP, Convex, Clarabel

julia> model = Model(() -> Convex.Optimizer(Clarabel.Optimizer));

julia> set_silent(model)

julia> @variable(model, x >= 1);

julia> @variable(model, t);

julia> @constraint(model, t >= exp(x))
t - exp(x) ≥ 0

julia> @objective(model, Min, t);

julia> optimize!(model)

julia> value(x), value(t)
(0.9999999919393833, 2.7182818073461403)

More Examples

A number of examples can be found here. The basic usage notebook gives a simple tutorial on problems that can be solved using Convex.jl.

Citing this package

If you use Convex.jl for published work, we encourage you to cite the software using the following BibTeX citation:

@article{convexjl,
 title = {Convex Optimization in {J}ulia},
 author = {Udell, Madeleine and Mohan, Karanveer and Zeng, David and Hong, Jenny and Diamond, Steven and Boyd, Stephen},
 year = {2014},
 journal = {SC14 Workshop on High Performance Technical Computing in Dynamic Languages},
 archivePrefix = "arXiv",
 eprint = {1410.4821},
 primaryClass = "math-oc",
}

관련 프로젝트 살펴보기

불러오는 중…