# \#convex

**URL:** https://discourse.julialang.org/tag/convex/915.md

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

---

## [Read from file a (Convex.jl) problem](https://discourse.julialang.org/t/read-from-file-a-convex-jl-problem/129402)

<div class="topic-metadata">

**Author:** [@CaG21](https://discourse.julialang.org/u/CaG21)\
**Replies:** 4\
**Last updated:** [May 29, 2025, 6:20am UTC](https://discourse.julialang.org/t/read-from-file-a-convex-jl-problem/129402 "2025-05-29T06:20:38Z")

</div>

I saved a convex problem, not solved yet, created by using Convex.jl, in a MOF/JSON file, with the write\_to\_file function. Now, I want to read that problem and start the opimization using the function Convex.solve!. How…

---

## [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…

---

## [Huge increase in variables/constraints with Convex.jl](https://discourse.julialang.org/t/huge-increase-in-variables-constraints-with-convex-jl/115330)

<div class="topic-metadata">

**Author:** [@FriesischScott](https://discourse.julialang.org/u/FriesischScott)\
**Replies:** 8\
**Last updated:** [June 11, 2024, 12:40pm UTC](https://discourse.julialang.org/t/huge-increase-in-variables-constraints-with-convex-jl/115330 "2024-06-11T12:40:32Z")

</div>

I am new to Convex.jl and DCP in general. I am currently working on a convex optimization problem that involves 27 variables constrained to be non-negative. I have formulated the problem in Convex and it shows thefollow…

---

## [ANN: Convex.jl v0.16 is released](https://discourse.julialang.org/t/ann-convex-jl-v0-16-is-released/114536)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 1\
**Last updated:** [May 21, 2024, 11:56pm UTC](https://discourse.julialang.org/t/ann-convex-jl-v0-16-is-released/114536 "2024-05-21T23:56:32Z")

</div>

Dear all, We are pleased to announce the release of Convex.jl v0.16.0. This release of Convex involved a substantial internal rewrite of Convex.jl to integrate better with MathOptInterface. The result is a faster, simp…

---

## [Convex Semi-definite Problem](https://discourse.julialang.org/t/convex-semi-definite-problem/113656)

<div class="topic-metadata">

**Author:** [@Julian\_Villaquira](https://discourse.julialang.org/u/Julian_Villaquira)\
**Replies:** 5\
**Last updated:** [May 2, 2024, 1:32am UTC](https://discourse.julialang.org/t/convex-semi-definite-problem/113656 "2024-05-02T01:32:12Z")

</div>

I am trying to solve a convex semi-definite optimization problem, and I don’t know what would be the right approach to implement it in Julia. The problem is the following: min c'x where c and x are vectors in R^n subje…

---

## [Convex.jl for SDP](https://discourse.julialang.org/t/convex-jl-for-sdp/111474)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 2\
**Last updated:** [March 12, 2024, 4:01am UTC](https://discourse.julialang.org/t/convex-jl-for-sdp/111474 "2024-03-12T04:01:56Z")

</div>

I am trying to follow up \[1, Example 1\]. This involves semidefinite programming described in Corollary 1: The following is what I’ve tried, and basically I think I need some specialized syntax for SDP. Trial Code us…

---

## [Minimisation of operator norm—solution does not match evaluated value \[Convex.jl\]](https://discourse.julialang.org/t/minimisation-of-operator-norm-solution-does-not-match-evaluated-value-convex-jl/102319)

<div class="topic-metadata">

**Author:** [@not-fred](https://discourse.julialang.org/u/not-fred)\
**Replies:** 7\
**Last updated:** [August 3, 2023, 3:08pm UTC](https://discourse.julialang.org/t/minimisation-of-operator-norm-solution-does-not-match-evaluated-value-convex-jl/102319 "2023-08-03T15:08:22Z")

</div>

I’m using Convex.jl to minimize the operator norm of a matrix (minimize opnorm(J,Inf)), but the solution (problem.optval) does not match the evaluated value after performing the optimisation (opnorm(evaluate(J,Inf))). A…

---

## [Convex.jl constraints not enforced](https://discourse.julialang.org/t/convex-jl-constraints-not-enforced/102439)

<div class="topic-metadata">

**Author:** [@UgeB](https://discourse.julialang.org/u/UgeB)\
**Replies:** 2\
**Last updated:** [August 3, 2023, 12:35pm UTC](https://discourse.julialang.org/t/convex-jl-constraints-not-enforced/102439 "2023-08-03T12:35:39Z")

</div>

Hi, I am using Convex.jl to solve a simple least squares optimization problem with some monotonicity constraints on my variable \\phi. The least squares objective is minimized to zero which should not be the case as my …

---

## [Fixing some regions of a Variable array in convex.jl](https://discourse.julialang.org/t/fixing-some-regions-of-a-variable-array-in-convex-jl/101246)

<div class="topic-metadata">

**Author:** [@UgeB](https://discourse.julialang.org/u/UgeB)\
**Replies:** 2\
**Last updated:** [July 6, 2023, 9:11am UTC](https://discourse.julialang.org/t/fixing-some-regions-of-a-variable-array-in-convex-jl/101246 "2023-07-06T09:11:38Z")

</div>

The fix! function in the Convex.jl packages allows to fix the value of a variable to a constant during the optimization. I was wondering how I can get the same result with a multi-dimensional variable for which I want t…

---

## [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…

---

## [Symbolics and Convex](https://discourse.julialang.org/t/symbolics-and-convex/92628)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 3\
**Last updated:** [January 7, 2023, 9:16am UTC](https://discourse.julialang.org/t/symbolics-and-convex/92628 "2023-01-07T09:16:22Z")

</div>

Hi, I’d like to consider a symbolic variable as a constant from Convex. For example, julia\> using Symbolics julia\> using Convex julia\> @variables x 1-element Vector{Num}: x julia\> u = Convex.Variable(1) Variable si…

---

## [Turning a convex hull into a set of constraints](https://discourse.julialang.org/t/turning-a-convex-hull-into-a-set-of-constraints/80887)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 13\
**Last updated:** [May 13, 2022, 5:21pm UTC](https://discourse.julialang.org/t/turning-a-convex-hull-into-a-set-of-constraints/80887 "2022-05-13T17:21:20Z")

</div>

I would like to turn the output of a convex hull into a set of constraints. I’m sure I could figure this out in a reasonable amount of time, but I was wondering if anyone had done this already. Otherwise I will post my s…

---

## [How to create Data.mat file for Convex.jl to solve optimal power flow using Matpower?](https://discourse.julialang.org/t/how-to-create-data-mat-file-for-convex-jl-to-solve-optimal-power-flow-using-matpower/80924)

<div class="topic-metadata">

**Author:** [@biswajit216](https://discourse.julialang.org/u/biswajit216)\
**Replies:** 1\
**Last updated:** [May 12, 2022, 2:47am UTC](https://discourse.julialang.org/t/how-to-create-data-mat-file-for-convex-jl-to-solve-optimal-power-flow-using-matpower/80924 "2022-05-12T02:47:29Z")

</div>

Hi, I’m a newbie learning Julia for optimal power flow formulation using convex optimization. I came across an example from Convex.jl documentation in here https://jump.dev/Convex.jl/stable/examples/optimization\_with\_c…

---

## [JuMP or Convex: stuck with very specific constraint, not sure if possible as originally intended](https://discourse.julialang.org/t/jump-or-convex-stuck-with-very-specific-constraint-not-sure-if-possible-as-originally-intended/77989)

<div class="topic-metadata">

**Author:** [@johnabs](https://discourse.julialang.org/u/johnabs)\
**Replies:** 5\
**Last updated:** [March 17, 2022, 4:38pm UTC](https://discourse.julialang.org/t/jump-or-convex-stuck-with-very-specific-constraint-not-sure-if-possible-as-originally-intended/77989 "2022-03-17T16:38:55Z")

</div>

Hi everyone, Let me start with a “visual” of my issue: imagine a binary matrix with some constraints on how the rows and columns can “interact” with each other. In my case, I need a constraint within each row that guara…

---

## [Visualising loss/objective function value with iterations using \`Convex\` + \`SCS\`](https://discourse.julialang.org/t/visualising-loss-objective-function-value-with-iterations-using-convex-scs/74374)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 3\
**Last updated:** [January 11, 2022, 8:00am UTC](https://discourse.julialang.org/t/visualising-loss-objective-function-value-with-iterations-using-convex-scs/74374 "2022-01-11T08:00:46Z")

</div>

Anyone worked with Convex.jl + SCS.jl ? How do I plot loss values/objective function values vs iteration during training process? (Naive way, that comes to my mind is allowing verbose=true in the solver and copypasting…
