# Optimization (Mathematical)

**URL:** https://discourse.julialang.org/c/domain/opt/13.md?page=121

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

**Page:** 122

---

## [Parametrize JuMP problem for repeat evaluation?](https://discourse.julialang.org/t/parametrize-jump-problem-for-repeat-evaluation/10091)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 5\
**Last updated:** [April 1, 2018, 10:23am UTC](https://discourse.julialang.org/t/parametrize-jump-problem-for-repeat-evaluation/10091 "2018-04-01T10:23:53Z")

</div>

Hi all, I have got at JuMP.jl problem. I have the following discrete optimization problem: using JuMP, Cbc function best\_bundle(;m=10,b=2) srand(1) # m = courses available k = 5 # courses to take price = coll…

---

## [Cut generation not working lazy constraints - lagrangian relaxation](https://discourse.julialang.org/t/cut-generation-not-working-lazy-constraints-lagrangian-relaxation/9948)

<div class="topic-metadata">

**Author:** [@tlagos](https://discourse.julialang.org/u/tlagos)\
**Replies:** 6\
**Last updated:** [March 27, 2018, 9:54pm UTC](https://discourse.julialang.org/t/cut-generation-not-working-lazy-constraints-lagrangian-relaxation/9948 "2018-03-27T21:54:03Z")

</div>

Hello, I have the following implementation to generate cuts for the Lagrangian relaxation problem for the shortest path with time constraints: \\max\_{\\lambda\\ge0} { L( \\lambda ) } X is a set of extreme points function s…

---

## [Quadratic objective SDP](https://discourse.julialang.org/t/quadratic-objective-sdp/10003)

<div class="topic-metadata">

**Author:** [@migarstka](https://discourse.julialang.org/u/migarstka)\
**Replies:** 1\
**Last updated:** [March 27, 2018, 4:38pm UTC](https://discourse.julialang.org/t/quadratic-objective-sdp/10003 "2018-03-27T16:38:44Z")

</div>

I want to solve the following problem using either JuMP or Convex: \\min\_x \\quad x^TPx+2q^Tx+q^TPq\\\\ \\text{s.t.} \\quad \\text{mat}\\{x\\} \\in \\mathcal{S}\_+^n , where x \\in \\mathbb{R}^{n^2} is the vectorized decision vari…

---

## [Uses of packages: JuliaDB, ExcelReaders, ExcelFiles and SymPy](https://discourse.julialang.org/t/uses-of-packages-juliadb-excelreaders-excelfiles-and-sympy/9920)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 4\
**Last updated:** [March 23, 2018, 7:13pm UTC](https://discourse.julialang.org/t/uses-of-packages-juliadb-excelreaders-excelfiles-and-sympy/9920 "2018-03-23T19:13:04Z")

</div>

Whenever I try to install packages like: JuliaDB, ExcelReaders, ExcelFiles and SymPy, the program shows this message in the console: GitError (Code: ENOTFOUND, Class: Repository, Could not find repository from ‘DocString…

---

## [Debugging, but code in conjugate gradient implementation. ](https://discourse.julialang.org/t/debugging-but-code-in-conjugate-gradient-implementation/9884)

<div class="topic-metadata">

**Author:** [@Marcom](https://discourse.julialang.org/u/Marcom)\
**Replies:** 4\
**Last updated:** [March 22, 2018, 1:14pm UTC](https://discourse.julialang.org/t/debugging-but-code-in-conjugate-gradient-implementation/9884 "2018-03-22T13:14:51Z")

</div>

Not sure this is the right place, but there seems to be an issue with how Julia is interpreting the inputs of a function. I am certain my code is correct as far as implementation of the problem statement. However, I keep…

---

## [Solving a model and its modified copy](https://discourse.julialang.org/t/solving-a-model-and-its-modified-copy/9778)

<div class="topic-metadata">

**Author:** [@varun7rs](https://discourse.julialang.org/u/varun7rs)\
**Replies:** 2\
**Last updated:** [March 18, 2018, 7:30pm UTC](https://discourse.julialang.org/t/solving-a-model-and-its-modified-copy/9778 "2018-03-18T19:30:08Z")

</div>

As a follow-up to IainNZ’s comments on issue #399, I’ve slightly modified the code to experiment with variable fixings. While I only intend to fix variables of the object r, the fixings are applied to object p as well. I…

---

## [Using @NLexpression in JuMP within a loop](https://discourse.julialang.org/t/using-nlexpression-in-jump-within-a-loop/9751)

<div class="topic-metadata">

**Author:** [@igorteo84](https://discourse.julialang.org/u/igorteo84)\
**Replies:** 0\
**Last updated:** [March 16, 2018, 4:25am UTC](https://discourse.julialang.org/t/using-nlexpression-in-jump-within-a-loop/9751 "2018-03-16T04:25:15Z")

</div>

Hello, I’ve a JuMP related question and how to use @NLexpression within a loop mu is a JxN matrix that I’ve defined to be a variable in the MPEC model @variable(MPEC, mu\[j=1:J, n=1:N\], start=mu0\[j,n\]). v2 is a 5Tx100 …

---

## [Long & complex non-linear functions use in non-linear constraints](https://discourse.julialang.org/t/long-complex-non-linear-functions-use-in-non-linear-constraints/9706)

<div class="topic-metadata">

**Author:** [@Stani83](https://discourse.julialang.org/u/Stani83)\
**Replies:** 5\
**Last updated:** [March 15, 2018, 8:32pm UTC](https://discourse.julialang.org/t/long-complex-non-linear-functions-use-in-non-linear-constraints/9706 "2018-03-15T20:32:41Z")

</div>

Hi There, I am new to JuMP and I am trying to set-up an optimization model that I already made work in Matlab, but now taking many advantages of JuMP Out of many questions I have I would start with few simple ones, hop…

---

## [\[ANN\] StructuredOptimization.jl](https://discourse.julialang.org/t/ann-structuredoptimization-jl/9735)

<div class="topic-metadata">

**Author:** [@nantonel](https://discourse.julialang.org/u/nantonel)\
**Replies:** 0\
**Last updated:** [March 15, 2018, 12:28pm UTC](https://discourse.julialang.org/t/ann-structuredoptimization-jl/9735 "2018-03-15T12:28:20Z")

</div>

Hi all, I am happy to announce together with @lostella StructuredOptimization.jl. StructuredOptimization.jl is a high-level modeling language that utilizes a syntax that is very close to the mathematical formulation of…

---

## [Cutting plane algorithm performance varies with Gurobi and CPLEX](https://discourse.julialang.org/t/cutting-plane-algorithm-performance-varies-with-gurobi-and-cplex/8597)

<div class="topic-metadata">

**Author:** [@varun7rs](https://discourse.julialang.org/u/varun7rs)\
**Replies:** 6\
**Last updated:** [March 13, 2018, 7:46am UTC](https://discourse.julialang.org/t/cutting-plane-algorithm-performance-varies-with-gurobi-and-cplex/8597 "2018-03-13T07:46:50Z")

</div>

I’ve implemented a cutting plane algorithm (using lazy callback mechanism) to robustify the solution obtained from the deterministic MIP akin to the work “Reformulation versus cutting-planes for robust optimization”. Wh…

---

## [Invalid Gurobi Licence when instance size increases using lazy constraints to generate cuts](https://discourse.julialang.org/t/invalid-gurobi-licence-when-instance-size-increases-using-lazy-constraints-to-generate-cuts/9664)

<div class="topic-metadata">

**Author:** [@tlagos](https://discourse.julialang.org/u/tlagos)\
**Replies:** 3\
**Last updated:** [March 13, 2018, 2:22am UTC](https://discourse.julialang.org/t/invalid-gurobi-licence-when-instance-size-increases-using-lazy-constraints-to-generate-cuts/9664 "2018-03-13T02:22:48Z")

</div>

Hello, I’m using CPLEX and Gurobi to solve a benders decomposition scheme for the mining problem. I defined the master problem using CPLEX solver and the cut generation subproblems using Gurobi. Whenever I increase th…

---

## [Using GLPKSolverLP](https://discourse.julialang.org/t/using-glpksolverlp/9575)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 13\
**Last updated:** [March 9, 2018, 3:43pm UTC](https://discourse.julialang.org/t/using-glpksolverlp/9575 "2018-03-09T15:43:17Z")

</div>

How use the solver GLPKSolverLP ?

---

## [MathOptInterface and upcoming breaking changes in JuMP 0.19](https://discourse.julialang.org/t/mathoptinterface-and-upcoming-breaking-changes-in-jump-0-19/4874)

<div class="topic-metadata">

**Author:** [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)\
**Replies:** 8\
**Last updated:** [March 7, 2018, 11:52pm UTC](https://discourse.julialang.org/t/mathoptinterface-and-upcoming-breaking-changes-in-jump-0-19/4874 "2018-03-07T23:52:04Z")

</div>

As I recently alluded to, we will be replacing our solver abstraction layer MathProgBase (MPB) with MathOptInterface (MOI). The MOI manual, under construction, lists the key design considerations. At a high level, the ma…

---

## [Automatically use getvalue() for all variables in model - JuMP](https://discourse.julialang.org/t/automatically-use-getvalue-for-all-variables-in-model-jump/9480)

<div class="topic-metadata">

**Author:** [@holger](https://discourse.julialang.org/u/holger)\
**Replies:** 4\
**Last updated:** [March 5, 2018, 7:17pm UTC](https://discourse.julialang.org/t/automatically-use-getvalue-for-all-variables-in-model-jump/9480 "2018-03-05T19:17:51Z")

</div>

Hi, After solving my JuMP model, I would like to use getvalue() on all variables in my model in an automated way. Say I have the following example problem: using JuMP using Clp m=Model(solver=ClpSolver()) @variable(m,x…

---

## [Running JuMP using KNITRO: killed](https://discourse.julialang.org/t/running-jump-using-knitro-killed/9164)

<div class="topic-metadata">

**Author:** [@huckl3b3rry87](https://discourse.julialang.org/u/huckl3b3rry87)\
**Replies:** 3\
**Last updated:** [March 5, 2018, 3:51am UTC](https://discourse.julialang.org/t/running-jump-using-knitro-killed/9164 "2018-03-05T03:51:27Z")

</div>

I am running a bunch optimization problems in a row with different parameters using JuMP and KNITRO and after about 5-7 hours the process simply says Killed and is sent back to the terminal with no additional information…

---

## [Automatic Differentiation and Parallelism](https://discourse.julialang.org/t/automatic-differentiation-and-parallelism/9478)

<div class="topic-metadata">

**Author:** [@Juser](https://discourse.julialang.org/u/Juser)\
**Replies:** 2\
**Last updated:** [March 3, 2018, 8:30pm UTC](https://discourse.julialang.org/t/automatic-differentiation-and-parallelism/9478 "2018-03-03T20:30:33Z")

</div>

I am trying to optimize a function that is expensive to evaluate but has many component parts that can be computed in parallel. However, DualNumbers are not bits-types and therefore cannot be stored in SharedArrays. Is…

---

## [Parallel starting from array of JuMP models](https://discourse.julialang.org/t/parallel-starting-from-array-of-jump-models/9297)

<div class="topic-metadata">

**Author:** [@bbrunaud](https://discourse.julialang.org/u/bbrunaud)\
**Replies:** 1\
**Last updated:** [February 24, 2018, 7:01pm UTC](https://discourse.julialang.org/t/parallel-starting-from-array-of-jump-models/9297 "2018-02-24T19:01:19Z")

</div>

Hello, I am writing an algorithm that receives an array of JuMP models that need to be solved in parallel. I’ve read the recommendations on this forum to just send the data to the worker to build and solve the model. Ho…

---

## [Use Ipopt with custom version](https://discourse.julialang.org/t/use-ipopt-with-custom-version/9176)

<div class="topic-metadata">

**Author:** [@TPDS1993](https://discourse.julialang.org/u/TPDS1993)\
**Replies:** 3\
**Last updated:** [February 24, 2018, 5:01pm UTC](https://discourse.julialang.org/t/use-ipopt-with-custom-version/9176 "2018-02-24T17:01:04Z")

</div>

Hi, I wanted to point Ipopt to a custom version that I installed with other linear solvers, can someone help me achieve that? Thanks in advance.

---

## [CSDP.jl in Linux](https://discourse.julialang.org/t/csdp-jl-in-linux/9205)

<div class="topic-metadata">

**Author:** [@MarioSouto](https://discourse.julialang.org/u/MarioSouto)\
**Replies:** 2\
**Last updated:** [February 23, 2018, 4:58pm UTC](https://discourse.julialang.org/t/csdp-jl-in-linux/9205 "2018-02-23T16:58:55Z")

</div>

Dear all, I’m having some trouble to install the CSDP.jl package in a Linux machine. I already have the CSDP solver installed but I want to use it within the JuMP framework. When I try to build the package I’m getting t…

---

## [\[JuMP\] Defining Ordinal Parameters](https://discourse.julialang.org/t/jump-defining-ordinal-parameters/9207)

<div class="topic-metadata">

**Author:** [@shoshievass](https://discourse.julialang.org/u/shoshievass)\
**Replies:** 2\
**Last updated:** [February 21, 2018, 3:47pm UTC](https://discourse.julialang.org/t/jump-defining-ordinal-parameters/9207 "2018-02-21T15:47:12Z")

</div>

I would like to define a JuMP optimization program with a vector of variables x that is ordered, i.e. x\[1\] \< x\[2\] \< x\[3\] .... Is there any elegant way to do this in lieu of manually adding constraints for every pair of e…

---

## [Running JuMP using Ipopt in Parallel](https://discourse.julialang.org/t/running-jump-using-ipopt-in-parallel/9167)

<div class="topic-metadata">

**Author:** [@huckl3b3rry87](https://discourse.julialang.org/u/huckl3b3rry87)\
**Replies:** 13\
**Last updated:** [February 19, 2018, 10:28pm UTC](https://discourse.julialang.org/t/running-jump-using-ipopt-in-parallel/9167 "2018-02-19T22:28:27Z")

</div>

I am trying to run several different JuMP models at once in parallel and I have a MWE, and was curious if anyone has any suggestions or thoughts on what I am doing. A serial approach (where only a single type of model is…

---

## [JuMP interface access to automatic differentiation (ReverseDiffSparse)](https://discourse.julialang.org/t/jump-interface-access-to-automatic-differentiation-reversediffsparse/8354)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 5\
**Last updated:** [February 15, 2018, 2:18am UTC](https://discourse.julialang.org/t/jump-interface-access-to-automatic-differentiation-reversediffsparse/8354 "2018-02-15T02:18:53Z")

</div>

I’m trying to use ReverseDiffSparse to return the gradient and Hessian of a scalar valued function f. I only need to evaluate the gradient and Hessian (i.e., I don’t need to set up a whole model). I saw from the JuMP Doc…

---

## [JuMP, excessive memory usage?](https://discourse.julialang.org/t/jump-excessive-memory-usage/1057)

<div class="topic-metadata">

**Author:** [@mauro](https://discourse.julialang.org/u/mauro)\
**Replies:** 16\
**Last updated:** [February 14, 2018, 9:12pm UTC](https://discourse.julialang.org/t/jump-excessive-memory-usage/1057 "2018-02-14T21:12:02Z")

</div>

Hi all, I have a question about the memory requirements of the following toy example, which is a simplified versions of my real problem: using JuMP using Ipopt N = 29 p1 = rand(N+1,N+1,N+1) p2 = rand(N+1,N+1,N+1) p…

---

## [\[ANN\] JuMP now supports OSQP](https://discourse.julialang.org/t/ann-jump-now-supports-osqp/9068)

<div class="topic-metadata">

**Author:** [@bstellato](https://discourse.julialang.org/u/bstellato)\
**Replies:** 0\
**Last updated:** [February 14, 2018, 8:11pm UTC](https://discourse.julialang.org/t/ann-jump-now-supports-osqp/9068 "2018-02-14T20:11:27Z")

</div>

Hi Julia optimizers! We have just added JuMP support to the latest OSQP.jl Julia interface. For those who do not know it, OSQP is a new efficient first-order QP solver based on ADMM. You can find some benchmarks agains…

---

## [Using JuMP fails](https://discourse.julialang.org/t/using-jump-fails/9054)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [February 14, 2018, 12:59pm UTC](https://discourse.julialang.org/t/using-jump-fails/9054 "2018-02-14T12:59:18Z")

</div>

Hello, after updating my packages I get the following error: julia\> using JuMP INFO: Precompiling module JuMP. WARNING: Module ReverseDiffSparse with uuid 11646900819455 is missing from the cache. This may mean module …

---

## [\`max\` constraints in JuMP](https://discourse.julialang.org/t/max-constraints-in-jump/8983)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 5\
**Last updated:** [February 11, 2018, 5:39am UTC](https://discourse.julialang.org/t/max-constraints-in-jump/8983 "2018-02-11T05:39:30Z")

</div>

Similar to this question, how can I formulate a constraint involving max of the form \\sum\_{i=1}^m \[z\_i + t\]\_+ \\leq c where \[x\]\_+ = \\max(x,0), both t,c \\in \\mathbb{R}, and z = My \\in \\mathbb{R}^m for variable y \\in \\mathb…

---

## [Fail Testing Mosek 8 -\> ERROR: LoadError: ReadOnlyMemoryError()](https://discourse.julialang.org/t/fail-testing-mosek-8-error-loaderror-readonlymemoryerror/8891)

<div class="topic-metadata">

**Author:** [@erikfilias](https://discourse.julialang.org/u/erikfilias)\
**Replies:** 5\
**Last updated:** [February 9, 2018, 5:03am UTC](https://discourse.julialang.org/t/fail-testing-mosek-8-error-loaderror-readonlymemoryerror/8891 "2018-02-09T05:03:31Z")

</div>

Testing Mosek on Windows with Julia v0.6.2 - 32 bits. I am trying to run this code: using JuMP using Mosek #using SCS model = Model(solver=MosekSolver()) #model = Model(solver=SCSSolver()) @variable(model, Q\[1:2, 1:2…

---

## [SumOfSquares, JuMP; Implementing semidefinite constraint with specified domain](https://discourse.julialang.org/t/sumofsquares-jump-implementing-semidefinite-constraint-with-specified-domain/8830)

<div class="topic-metadata">

**Author:** [@rdbrackston](https://discourse.julialang.org/u/rdbrackston)\
**Replies:** 2\
**Last updated:** [February 7, 2018, 4:02pm UTC](https://discourse.julialang.org/t/sumofsquares-jump-implementing-semidefinite-constraint-with-specified-domain/8830 "2018-02-07T16:02:51Z")

</div>

Hello all, I am using the SumOfSquares package to obtain Lyapunov functions with some particular properties. Given a polynomial vector field defined by \\dot{x} = f(x), I wish to obtain Lyapunov functions V(x) such that …

---

## [Constraints handling in JuMP/MOI](https://discourse.julialang.org/t/constraints-handling-in-jump-moi/8813)

<div class="topic-metadata">

**Author:** [@bbrunaud](https://discourse.julialang.org/u/bbrunaud)\
**Replies:** 3\
**Last updated:** [February 6, 2018, 4:53am UTC](https://discourse.julialang.org/t/constraints-handling-in-jump-moi/8813 "2018-02-06T04:53:43Z")

</div>

Hello all I’ve been looking at the code of the new JuMP with MOI, and I would like to understand how to update the things that are going to break in my code. In particular, I have been doing the following things Inspe…

---

## [JuMP; Rewriting an @eval @NLexpression with a user defined function in local scope w/ Expr](https://discourse.julialang.org/t/jump-rewriting-an-eval-nlexpression-with-a-user-defined-function-in-local-scope-w-expr/8757)

<div class="topic-metadata">

**Author:** [@shoshievass](https://discourse.julialang.org/u/shoshievass)\
**Replies:** 6\
**Last updated:** [February 4, 2018, 4:07pm UTC](https://discourse.julialang.org/t/jump-rewriting-an-eval-nlexpression-with-a-user-defined-function-in-local-scope-w-expr/8757 "2018-02-04T16:07:45Z")

</div>

I’m trying to use a user-defined function that takes in several distinct arguments, and then a splatted N-dim vector of parameters as an @NLexpression to be used in a constraint of an optimization problem. I described t…

[Previous page](https://discourse.julialang.org/c/domain/opt/13.md?page=120)

[Next page](https://discourse.julialang.org/c/domain/opt/13.md?page=122)
