# \#convex-optimization

**URL:** https://discourse.julialang.org/tag/convex-optimization/782.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Solving Projection onto Linear Equality for Multiple Input Vectors](https://discourse.julialang.org/t/solving-projection-onto-linear-equality-for-multiple-input-vectors/133428)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 11\
**Last updated:** [October 31, 2025, 8:52pm UTC](https://discourse.julialang.org/t/solving-projection-onto-linear-equality-for-multiple-input-vectors/133428 "2025-10-31T20:52:18Z")

</div>

I am after solving the projection onto a Linear Equation problem: \\arg \\min\_{\\boldsymbol{x}} \\frac{1}{2} {\\left\\| \\boldsymbol{x} - \\boldsymbol{y} \\right\\|}\_{2}^{2} \\; \\text{ subject to } \\boldsymbol{A} \\boldsymbol{x} =…

---

## [Solving Optimization of Least Squares Term with Quadratic Term with Memory Infeasible Matrix](https://discourse.julialang.org/t/solving-optimization-of-least-squares-term-with-quadratic-term-with-memory-infeasible-matrix/132599)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 2\
**Last updated:** [September 24, 2025, 2:41pm UTC](https://discourse.julialang.org/t/solving-optimization-of-least-squares-term-with-quadratic-term-with-memory-infeasible-matrix/132599 "2025-09-24T14:41:15Z")

</div>

I want to solve: \\arg \\min\_{\\boldsymbol{x}} \\frac{\\lambda}{2} \\boldsymbol{x}^{T} \\boldsymbol{E}^{T} \\boldsymbol{K} \\boldsymbol{E} \\boldsymbol{x} + \\frac{\\rho}{2} {\\left\\| \\boldsymbol{A} \\boldsymbol{x} - \\boldsymbol{y} …

---

## [Solving a Shifted Linear System of 2 Symmetric Positive Semi Definite (SPSD) Matrices](https://discourse.julialang.org/t/solving-a-shifted-linear-system-of-2-symmetric-positive-semi-definite-spsd-matrices/131636)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 31\
**Last updated:** [August 18, 2025, 6:20pm UTC](https://discourse.julialang.org/t/solving-a-shifted-linear-system-of-2-symmetric-positive-semi-definite-spsd-matrices/131636 "2025-08-18T18:20:18Z")

</div>

I have the following linear system: \\left( \\boldsymbol{A} + \\lambda \\boldsymbol{C} \\right) \\boldsymbol{x} = \\boldsymbol{A}^{T} \\boldsymbol{b} Where \\boldsymbol{A}, \\boldsymbol{C} \\in \\mathcal{S}\_{+}^{n} are Symmetric …

---

## [Monotonic smoothing of noisy data](https://discourse.julialang.org/t/monotonic-smoothing-of-noisy-data/93184)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 21\
**Last updated:** [May 17, 2025, 3:47pm UTC](https://discourse.julialang.org/t/monotonic-smoothing-of-noisy-data/93184 "2025-05-17T15:47:46Z")

</div>

Is there a package in Julia, or a simple algorithm, to perform monotonic smoothing of noisy data? See this Python example. NB: it is assumed that we do not know of any monotonic function or model that could fit the da…

---

## [Boyd is a Julia fan!](https://discourse.julialang.org/t/boyd-is-a-julia-fan/126317)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 5\
**Last updated:** [March 3, 2025, 6:51am UTC](https://discourse.julialang.org/t/boyd-is-a-julia-fan/126317 "2025-03-03T06:51:07Z")

</div>

Just saw this interesting talk by Stephen Boyd: It’s an older video but he says some very interesting stuff about Julia at 51:10 :slight\_smile: (entire talk is super interesting, highly recommend watching…

---

## [Choosing a package for univariate (convex) optimization in Julia](https://discourse.julialang.org/t/choosing-a-package-for-univariate-convex-optimization-in-julia/109089)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 8\
**Last updated:** [November 28, 2024, 4:34pm UTC](https://discourse.julialang.org/t/choosing-a-package-for-univariate-convex-optimization-in-julia/109089 "2024-11-28T16:34:55Z")

</div>

I need to solve 1d convex optimization programs, where I have access to all derivatives. Ideally I’d use Optim.jl but the interface only supports vectors. The backend NLSolvers.jl works but the documentation is not as de…

---

## [Reformulating Logarithmic Objective Function for Gurobi in Julia with JuMP](https://discourse.julialang.org/t/reformulating-logarithmic-objective-function-for-gurobi-in-julia-with-jump/121961)

<div class="topic-metadata">

**Author:** [@Beyza\_Aydin](https://discourse.julialang.org/u/Beyza_Aydin)\
**Replies:** 3\
**Last updated:** [October 30, 2024, 8:25pm UTC](https://discourse.julialang.org/t/reformulating-logarithmic-objective-function-for-gurobi-in-julia-with-jump/121961 "2024-10-30T20:25:20Z")

</div>

Hi, I’m working on an optimization problem in Julia where I need to maximize a logarithmic objective function (maximize sum of logs ): @objective(model, Max, sum(alp\[i\] \* log( p\[i\]) for i in 1:n)) where alp is vector…

---

## [Solve Large Scale Underdetermined Linear Equation with per Element Equality Constraint](https://discourse.julialang.org/t/solve-large-scale-underdetermined-linear-equation-with-per-element-equality-constraint/119655)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 16\
**Last updated:** [September 25, 2024, 5:10pm UTC](https://discourse.julialang.org/t/solve-large-scale-underdetermined-linear-equation-with-per-element-equality-constraint/119655 "2024-09-25T17:10:56Z")

</div>

I have the following linear system to solve: \\boldsymbol{A} \\boldsymbol{x} = \\boldsymbol{0}, \\quad \\text{subject to} \\; {x}\_{i} = {v}\_{i} \\; \\forall i \\in \\mathcal{V} Where \\boldsymbol{A} \\in \\mathbb{R}^{m \\times n} w…

---

## [Block triangular matrix in Convex.jl](https://discourse.julialang.org/t/block-triangular-matrix-in-convex-jl/118147)

<div class="topic-metadata">

**Author:** [@jens-rataczak](https://discourse.julialang.org/u/jens-rataczak)\
**Replies:** 2\
**Last updated:** [August 13, 2024, 10:27pm UTC](https://discourse.julialang.org/t/block-triangular-matrix-in-convex-jl/118147 "2024-08-13T22:27:53Z")

</div>

Hello, Is there a straightforward way to constrain a variable in Convex.jl to be block triangular (either upper or lower)? I am looking for something like YALMIP’s blkvar command. It seems rather tedious to constrain th…

---

## [MotionPlanningOptimization.jl has been released](https://discourse.julialang.org/t/motionplanningoptimization-jl-has-been-released/116198)

<div class="topic-metadata">

**Author:** [@alexander-leong](https://discourse.julialang.org/u/alexander-leong)\
**Replies:** 1\
**Last updated:** [June 25, 2024, 12:46pm UTC](https://discourse.julialang.org/t/motionplanningoptimization-jl-has-been-released/116198 "2024-06-25T12:46:22Z")

</div>

This package uses conic and mixed integer optimization methods to solve for a smooth trajectory given a start position, end position and set of safe regions defined by box constraints. It is hoped that this package compl…

---

## [SCS and Mosek give very different answers](https://discourse.julialang.org/t/scs-and-mosek-give-very-different-answers/114739)

<div class="topic-metadata">

**Author:** [@Sam\_Hopkins](https://discourse.julialang.org/u/Sam_Hopkins)\
**Replies:** 6\
**Last updated:** [May 27, 2024, 11:00am UTC](https://discourse.julialang.org/t/scs-and-mosek-give-very-different-answers/114739 "2024-05-27T11:00:35Z")

</div>

Hi, I’m looking for help with semidefinite programming libraries, in particular Mosek.jl and SCS.jl, which I am accessing via JuMP. I have a particular semidefinite program, unfortunately not so small, for which SCS an…

---

## [Gurobi does not display log](https://discourse.julialang.org/t/gurobi-does-not-display-log/114442)

<div class="topic-metadata">

**Author:** [@CaG21](https://discourse.julialang.org/u/CaG21)\
**Replies:** 7\
**Last updated:** [May 20, 2024, 5:20pm UTC](https://discourse.julialang.org/t/gurobi-does-not-display-log/114442 "2024-05-20T17:20:47Z")

</div>

I am using Convex.jl in conjuction with Gurobi in a Jupyter notebook to solve a convex programming problem. Everything works but Gurobi is not displaying its log to the console in “realtime”, but it displays everything a…

---

## [Semidefinite constraints, fp roundoff errors, and normalization](https://discourse.julialang.org/t/semidefinite-constraints-fp-roundoff-errors-and-normalization/114092)

<div class="topic-metadata">

**Author:** [@Johan-Gronqvist](https://discourse.julialang.org/u/Johan-Gronqvist)\
**Replies:** 2\
**Last updated:** [May 12, 2024, 10:03pm UTC](https://discourse.julialang.org/t/semidefinite-constraints-fp-roundoff-errors-and-normalization/114092 "2024-05-12T22:03:14Z")

</div>

I am using JuMP with semidefinite constraints, and when my matrix elements become large, roundoff errors also become large, in absolute terms. JuMP warns when the matrix has absolute asymmetries in the range 1e-10 to 1e…

---

## [Minimizing a logsumexp function with many terms (Convex.jl)](https://discourse.julialang.org/t/minimizing-a-logsumexp-function-with-many-terms-convex-jl/110853)

<div class="topic-metadata">

**Author:** [@leapsheep](https://discourse.julialang.org/u/leapsheep)\
**Replies:** 11\
**Last updated:** [February 29, 2024, 6:02pm UTC](https://discourse.julialang.org/t/minimizing-a-logsumexp-function-with-many-terms-convex-jl/110853 "2024-02-29T18:02:26Z")

</div>

I am trying to minimize a function that depends on only few parameters, but contains a logsumexp with many terms in the sum, i.e. a function of the form f(x) = \\log \\left(\\sum\_{i=1}^n e^{a\_i \\cdot x}\\right) where where…

---

## [Solving large convex optimization/flow assignment problem](https://discourse.julialang.org/t/solving-large-convex-optimization-flow-assignment-problem/108872)

<div class="topic-metadata">

**Author:** [@SuperGrobi](https://discourse.julialang.org/u/SuperGrobi)\
**Replies:** 7\
**Last updated:** [January 17, 2024, 2:13pm UTC](https://discourse.julialang.org/t/solving-large-convex-optimization-flow-assignment-problem/108872 "2024-01-17T14:13:09Z")

</div>

I am trying to solve a convex flow-assignment problem on a large(ish) graph with (currently) about 7000 edges. Mathematically, it looks like \\underset{x\\in\\mathbb{R}\_+^{|E|}}{\\text{minimize}} \\quad U(x) \\\\ U(x) = -l^T…

---

## [Convex.jl, possible to have a product as an operation?](https://discourse.julialang.org/t/convex-jl-possible-to-have-a-product-as-an-operation/108101)

<div class="topic-metadata">

**Author:** [@1m1](https://discourse.julialang.org/u/1m1)\
**Replies:** 8\
**Last updated:** [December 30, 2023, 5:21pm UTC](https://discourse.julialang.org/t/convex-jl-possible-to-have-a-product-as-an-operation/108101 "2023-12-30T17:21:17Z")

</div>

My constraints have a product. It is a convex set. I cannot find an operation to simply have the product of the components of a vector (or matrix/tensor in general). Is that not possible?

---

## [Geometric Programming in Convex.jl](https://discourse.julialang.org/t/geometric-programming-in-convex-jl/101223)

<div class="topic-metadata">

**Author:** [@corbinklett](https://discourse.julialang.org/u/corbinklett)\
**Replies:** 1\
**Last updated:** [July 6, 2023, 2:12am UTC](https://discourse.julialang.org/t/geometric-programming-in-convex-jl/101223 "2023-07-06T02:12:17Z")

</div>

Has anyone seen a wrapper for geometric programs for Convex.jl, such as that offered by CVXPY? Disciplined Geometric Programming — CVXPY 1.3 documentation

---

## [Convex.jl gives solution but constraints are not satisfied](https://discourse.julialang.org/t/convex-jl-gives-solution-but-constraints-are-not-satisfied/100428)

<div class="topic-metadata">

**Author:** [@shaurya](https://discourse.julialang.org/u/shaurya)\
**Replies:** 8\
**Last updated:** [June 23, 2023, 8:08pm UTC](https://discourse.julialang.org/t/convex-jl-gives-solution-but-constraints-are-not-satisfied/100428 "2023-06-23T20:08:50Z")

</div>

Hi, I’ve been using convex.jl for some of my problems but I feel stuck in one SDP implementation. When I run the following code, the solver says that it’s feasible and reaches an optimal point, however, when I check the…

---

## [@SDconstraint not working](https://discourse.julialang.org/t/sdconstraint-not-working/96685)

<div class="topic-metadata">

**Author:** [@shaurya](https://discourse.julialang.org/u/shaurya)\
**Replies:** 2\
**Last updated:** [March 29, 2023, 8:00pm UTC](https://discourse.julialang.org/t/sdconstraint-not-working/96685 "2023-03-29T20:00:18Z")

</div>

Hi, I’m new to Julia and this might be something very simple but I’m struggling to implement in JuMP. julia\> using JuMP julia\> using MosekTools julia\> model = Model(); julia\> @variable(model, x) x julia\> a = \[x 2x …

---

## [Piecewise-constant fitting](https://discourse.julialang.org/t/piecewise-constant-fitting/94091)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 21\
**Last updated:** [February 9, 2023, 12:40am UTC](https://discourse.julialang.org/t/piecewise-constant-fitting/94091 "2023-02-09T00:40:42Z")

</div>

Is there an example or a Julia package for piecewise-constant fitting of 1D series? See a Matlab example of expected results here. Thanks.

---

## [Differentiable optimization / BigFloat - does DiffOpt.jl work with SDPAFamily.jl?](https://discourse.julialang.org/t/differentiable-optimization-bigfloat-does-diffopt-jl-work-with-sdpafamily-jl/89771)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [November 4, 2022, 7:29pm UTC](https://discourse.julialang.org/t/differentiable-optimization-bigfloat-does-diffopt-jl-work-with-sdpafamily-jl/89771 "2022-11-04T19:29:22Z")

</div>

I’m interested in solving semidefinite optimization problems and compute the derivatives of the solutions w.r.t. input parameters. BigFloat may be needed for some of the more demanding problems. Does the differentiable o…

---

## [Syntax for specifying block diagonal constraints in Convex](https://discourse.julialang.org/t/syntax-for-specifying-block-diagonal-constraints-in-convex/84372)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 5\
**Last updated:** [July 18, 2022, 4:01am UTC](https://discourse.julialang.org/t/syntax-for-specifying-block-diagonal-constraints-in-convex/84372 "2022-07-18T04:01:41Z")

</div>

Hi community, I am having issues inputting the following problem into Convex.jl where \\Sigma and S\_1,...,S\_m are positive definite matrices of appropriate dimensions. The syntax diag(x\_1S\_1,...,x\_mS\_m) in the constrai…

---

## [Maximize Min Objective](https://discourse.julialang.org/t/maximize-min-objective/83431)

<div class="topic-metadata">

**Author:** [@sophiepavia](https://discourse.julialang.org/u/sophiepavia)\
**Replies:** 8\
**Last updated:** [July 14, 2022, 9:00pm UTC](https://discourse.julialang.org/t/maximize-min-objective/83431 "2022-07-14T21:00:14Z")

</div>

I am working on a convex optimization problem in Julia using JuMP and Pajarito. I have three objectives that I will solve for independently. For the third objective how can I maximize the min? @NLobjective(model, Max, …

---

## [Help speeding up problem with Convex.jl](https://discourse.julialang.org/t/help-speeding-up-problem-with-convex-jl/79005)

<div class="topic-metadata">

**Author:** [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Replies:** 31\
**Last updated:** [April 26, 2022, 8:11am UTC](https://discourse.julialang.org/t/help-speeding-up-problem-with-convex-jl/79005 "2022-04-26T08:11:52Z")

</div>

I’m currently solving a convex problem with Convex.jl and COSMO.jl. The text output from COSMO indicates that the solution is actually quite fast (less than a second) but it takes ca. 30 seconds to set the problem up wit…

---

## [Solving SDP problem is 100x slower than Matlab CVX](https://discourse.julialang.org/t/solving-sdp-problem-is-100x-slower-than-matlab-cvx/79704)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 5\
**Last updated:** [April 19, 2022, 9:28pm UTC](https://discourse.julialang.org/t/solving-sdp-problem-is-100x-slower-than-matlab-cvx/79704 "2022-04-19T21:28:35Z")

</div>

I’m trying to solve the following SDP problem \\begin{align\*} maximize \\ & \\sum\_j s\_j\\\\ \\text{subject to } \\ & 2\\Sigma - diag(s) \\succeq 0,\\\\ & 0 \\le s\_j \\le 1 \\end{align\*} Julia’s SCS solver with Convex.jl is 100x sl…

---

## [Best Nonlinear Optimizer for a Continuous Convex Problem](https://discourse.julialang.org/t/best-nonlinear-optimizer-for-a-continuous-convex-problem/77771)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 44\
**Last updated:** [March 21, 2022, 2:38pm UTC](https://discourse.julialang.org/t/best-nonlinear-optimizer-for-a-continuous-convex-problem/77771 "2022-03-21T14:38:51Z")

</div>

Hi, I have a simple problem in which I want to \\max\_{x \\in \\mathbb{R}^{N}} f(x) \\text{s.t}\\hspace{5pt}x \\geq 0 where f(x) is continuous and globally concave. Which is the best solver for nonlinear, globally conca…

---

## [Optimization with Gurobi](https://discourse.julialang.org/t/optimization-with-gurobi/77125)

<div class="topic-metadata">

**Author:** [@O\_olalekan](https://discourse.julialang.org/u/O_olalekan)\
**Replies:** 4\
**Last updated:** [March 14, 2022, 1:35am UTC](https://discourse.julialang.org/t/optimization-with-gurobi/77125 "2022-03-14T01:35:36Z")

</div>

I am solving an optimization problem with Gurobi package. I set the non-convex parameter to be 2 which helped me with the bilinear constraints. But, I am getting an infeasible solution with a warning “”" Model contains…

---

## [Large - Scale Nonlinear Convex Optimization - Performance](https://discourse.julialang.org/t/large-scale-nonlinear-convex-optimization-performance/74676)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 8\
**Last updated:** [January 15, 2022, 9:50pm UTC](https://discourse.julialang.org/t/large-scale-nonlinear-convex-optimization-performance/74676 "2022-01-15T21:50:22Z")

</div>

Hi everybody, I am trying to solve a large-scale nonlinear problem that is convex and has linear inequality constraints. There are 550 unknowns and 25000 linear inequality constraints. I want to get your recommendations …

---

## [Is it possible that numerical optimisation solve time decreases for some range of dimensions from low to moderate levels?](https://discourse.julialang.org/t/is-it-possible-that-numerical-optimisation-solve-time-decreases-for-some-range-of-dimensions-from-low-to-moderate-levels/73857)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 11\
**Last updated:** [January 3, 2022, 4:07am UTC](https://discourse.julialang.org/t/is-it-possible-that-numerical-optimisation-solve-time-decreases-for-some-range-of-dimensions-from-low-to-moderate-levels/73857 "2022-01-03T04:07:00Z")

</div>

Hi, I encountered a weird phenomenon of solve time calculation in numerical optimisation. Backgrounds There is a bunch of approximators, \\{ f\_j \\}\_{j \\in J}. For example, f\_1 is a feedforward (dense) neural network, an…

---

## [Understanding DCP in Convex.jl and the difference of elapsed time](https://discourse.julialang.org/t/understanding-dcp-in-convex-jl-and-the-difference-of-elapsed-time/72626)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 8\
**Last updated:** [December 6, 2021, 2:38am UTC](https://discourse.julialang.org/t/understanding-dcp-in-convex-jl-and-the-difference-of-elapsed-time/72626 "2021-12-06T02:38:06Z")

</div>

Hi, there! I’d like to understand why the following elapsed times to solve the following two problems are significantly different. Here is my code and the result (to avoid high latency due to JIT compile, the results a…

[Next page](https://discourse.julialang.org/tag/convex-optimization/782.md?match_all_tags=true&page=1&tags%5B%5D=convex-optimization)
