# Optimization (Mathematical)

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

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

**Page:** 125

---

## [JuMP Efficient Quadratic Objective Formulation](https://discourse.julialang.org/t/jump-efficient-quadratic-objective-formulation/6177)

<div class="topic-metadata">

**Author:** [@Kenney](https://discourse.julialang.org/u/Kenney)\
**Replies:** 4\
**Last updated:** [October 1, 2017, 7:44pm UTC](https://discourse.julialang.org/t/jump-efficient-quadratic-objective-formulation/6177 "2017-10-01T19:44:13Z")

</div>

Hi everyone, I (eventually) want to run an MIQP where the objective is a simple sum of squares say sum((Y-XB)^2). Without even getting to the constraints or the integer part of the problem, I’m running into issues simpl…

---

## [Costates and Hamiltonian in JuMP and MathProgbase](https://discourse.julialang.org/t/costates-and-hamiltonian-in-jump-and-mathprogbase/6160)

<div class="topic-metadata">

**Author:** [@huckl3b3rry87](https://discourse.julialang.org/u/huckl3b3rry87)\
**Replies:** 4\
**Last updated:** [October 1, 2017, 2:53am UTC](https://discourse.julialang.org/t/costates-and-hamiltonian-in-jump-and-mathprogbase/6160 "2017-10-01T02:53:42Z")

</div>

Part # 1 I was interested in getting the costates. The costates are also known as the lagrange multipliers or dual variables. I looked through the MathProgBase docs and found this function called getconstduals does that…

---

## [\[JuMP\] Pure integer solutions (Combinatorial optimization?)](https://discourse.julialang.org/t/jump-pure-integer-solutions-combinatorial-optimization/6151)

<div class="topic-metadata">

**Author:** [@artagnon](https://discourse.julialang.org/u/artagnon)\
**Replies:** 6\
**Last updated:** [September 30, 2017, 2:46pm UTC](https://discourse.julialang.org/t/jump-pure-integer-solutions-combinatorial-optimization/6151 "2017-09-30T14:46:50Z")

</div>

Hi, I’m investigating the use of JuMP for a million-client scheduling service. Since there are certain hard constraints like “belongs to set” and binary variables like “either scheduled or not scheduled”, and simple con…

---

## [Help with binary uncertain paremeters in JuMPeR](https://discourse.julialang.org/t/help-with-binary-uncertain-paremeters-in-jumper/6149)

<div class="topic-metadata">

**Author:** [@gavelasq](https://discourse.julialang.org/u/gavelasq)\
**Replies:** 0\
**Last updated:** [September 29, 2017, 12:09am UTC](https://discourse.julialang.org/t/help-with-binary-uncertain-paremeters-in-jumper/6149 "2017-09-29T00:09:27Z")

</div>

Hi, can anyone have an model example where binary uncertain paremeters in JuMPeR such as: highways = \[:I90, :I93, :I95\] @uncertain(rm, blocked\[highways\], Bin) are used? thanks.

---

## [Reading data with dataframe (instead of readdlm), now equations give error](https://discourse.julialang.org/t/reading-data-with-dataframe-instead-of-readdlm-now-equations-give-error/5858)

<div class="topic-metadata">

**Author:** [@Halil1](https://discourse.julialang.org/u/Halil1)\
**Replies:** 2\
**Last updated:** [September 28, 2017, 7:39am UTC](https://discourse.julialang.org/t/reading-data-with-dataframe-instead-of-readdlm-now-equations-give-error/5858 "2017-09-28T07:39:38Z")

</div>

Hey all, Just because I have changed the way I read the input data, now model equations give me errors. How can I resolve this? More context here: I have successfully run optimization model when I was reading the csv …

---

## [Quick way to find tight constraints?](https://discourse.julialang.org/t/quick-way-to-find-tight-constraints/5975)

<div class="topic-metadata">

**Author:** [@Halil1](https://discourse.julialang.org/u/Halil1)\
**Replies:** 2\
**Last updated:** [September 20, 2017, 7:27pm UTC](https://discourse.julialang.org/t/quick-way-to-find-tight-constraints/5975 "2017-09-20T19:27:08Z")

</div>

Hello all, Is there a straight-forward method for understanding which constraints of the model are tight? I will run some scenarios which I will change multiple parameters at a time, so just curious if there is any qui…

---

## [Variable number of Nonlinear Constraints by user-defined functions](https://discourse.julialang.org/t/variable-number-of-nonlinear-constraints-by-user-defined-functions/5895)

<div class="topic-metadata">

**Author:** [@Pu\_He](https://discourse.julialang.org/u/Pu_He)\
**Replies:** 1\
**Last updated:** [September 19, 2017, 12:13pm UTC](https://discourse.julialang.org/t/variable-number-of-nonlinear-constraints-by-user-defined-functions/5895 "2017-09-19T12:13:40Z")

</div>

Hi there, Sorry about the formatting on a previous version of the post. I am new to Julia and doing research in demand modelling. And I apologize if this is too basic. I am thinking to move my code from Rcpp to Julia to…

---

## [Mute solver output](https://discourse.julialang.org/t/mute-solver-output/5108)

<div class="topic-metadata">

**Author:** [@leclere](https://discourse.julialang.org/u/leclere)\
**Replies:** 2\
**Last updated:** [September 19, 2017, 12:08pm UTC](https://discourse.julialang.org/t/mute-solver-output/5108 "2017-09-19T12:08:33Z")

</div>

Hi all, some 3 years ago people seemed to thought that having a standard mute option in JuMP would be a soon to be feature (see e.g. Redirecting to Google Groups). Has there been any progress on the subject ? At the mo…

---

## [Vectorized Convex inequality constraint](https://discourse.julialang.org/t/vectorized-convex-inequality-constraint/5890)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 2\
**Last updated:** [September 15, 2017, 2:36pm UTC](https://discourse.julialang.org/t/vectorized-convex-inequality-constraint/5890 "2017-09-15T14:36:34Z")

</div>

I’m trying to vectorize an inequality constraint comparing two Convex types. On one side, I have Convex.MaxAtoms, and on the other side, I have Variables. SO link here. I want to do something like the following: using C…

---

## [How to measure/read size of the optimization model?](https://discourse.julialang.org/t/how-to-measure-read-size-of-the-optimization-model/5855)

<div class="topic-metadata">

**Author:** [@Halil1](https://discourse.julialang.org/u/Halil1)\
**Replies:** 2\
**Last updated:** [September 12, 2017, 7:54pm UTC](https://discourse.julialang.org/t/how-to-measure-read-size-of-the-optimization-model/5855 "2017-09-12T19:54:09Z")

</div>

Hello all, I really need some help with some conceptual thinking and Julia output regarding to size of an optimization model. Trying to read the size of the optimization model from Julia output. Is there an easy way to…

---

## [Announcing new Packages and Solvers for Multi-objective Mixed Integer Programming ( with JuMP extension )](https://discourse.julialang.org/t/announcing-new-packages-and-solvers-for-multi-objective-mixed-integer-programming-with-jump-extension/5814)

<div class="topic-metadata">

**Author:** [@Aritra\_Pal](https://discourse.julialang.org/u/Aritra_Pal)\
**Replies:** 4\
**Last updated:** [September 11, 2017, 3:06pm UTC](https://discourse.julialang.org/t/announcing-new-packages-and-solvers-for-multi-objective-mixed-integer-programming-with-jump-extension/5814 "2017-09-11T15:06:52Z")

</div>

Hi everyone, I am excited to announce 5 new packages for solving Multiobjective Mixed Integer Linear Programs: FPBH.jl: It is a linear programming based heuristic for computing an approximate nondominated frontier of …

---

## [Efficiently reusing/updating Julia's Convex constraints](https://discourse.julialang.org/t/efficiently-reusing-updating-julias-convex-constraints/5811)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 3\
**Last updated:** [September 11, 2017, 12:24pm UTC](https://discourse.julialang.org/t/efficiently-reusing-updating-julias-convex-constraints/5811 "2017-09-11T12:24:38Z")

</div>

Not sure if this is the appropriate place to ask my question or if StackOverflow is better. Anyway, my question is related to reusing constraints in the Convex package. I have something like the following simplified str…

---

## [Collection of JuMP variables](https://discourse.julialang.org/t/collection-of-jump-variables/5798)

<div class="topic-metadata">

**Author:** [@leclere](https://discourse.julialang.org/u/leclere)\
**Replies:** 6\
**Last updated:** [September 11, 2017, 12:06pm UTC](https://discourse.julialang.org/t/collection-of-jump-variables/5798 "2017-09-11T12:06:51Z")

</div>

Hello, I would like to define an array of jump variables, e.g something like for c:1:C @variable(model, mu\[c\]\[1:foo(c)\] \>= 0) end or maybe for c:1:C mu\[c\] = @variable(model, \[1:foo(c)\] \>= 0) end but I was no…

---

## [JuMP package: Cannot display the values of decision variable](https://discourse.julialang.org/t/jump-package-cannot-display-the-values-of-decision-variable/5745)

<div class="topic-metadata">

**Author:** [@Halil1](https://discourse.julialang.org/u/Halil1)\
**Replies:** 5\
**Last updated:** [September 7, 2017, 3:38pm UTC](https://discourse.julialang.org/t/jump-package-cannot-display-the-values-of-decision-variable/5745 "2017-09-07T15:38:20Z")

</div>

Hello everyone, I have coded a mixed-integer linear optimization model. I am having trouble displaying the decision variable results. I have a decision variable: @variable(m, 0 \<= Y\[i in I,j in J\] \<=1) It is optimal…

---

## [Build JuMP variable from array of tuples](https://discourse.julialang.org/t/build-jump-variable-from-array-of-tuples/5638)

<div class="topic-metadata">

**Author:** [@bbrunaud](https://discourse.julialang.org/u/bbrunaud)\
**Replies:** 3\
**Last updated:** [September 2, 2017, 8:33am UTC](https://discourse.julialang.org/t/build-jump-variable-from-array-of-tuples/5638 "2017-09-02T08:33:39Z")

</div>

Hello Let’s say that I have an array of tuples containing all the indices I need for a variable A = \[(:a1,:b1),(:a2,:b2)\] Now, I want to define a JuMP variable such that I can access x\[:a1,:b1\] for example. How do I a…

---

## [The function to optimize in JuMP](https://discourse.julialang.org/t/the-function-to-optimize-in-jump/4964)

<div class="topic-metadata">

**Author:** [@MCSikivie](https://discourse.julialang.org/u/MCSikivie)\
**Replies:** 24\
**Last updated:** [August 29, 2017, 2:03am UTC](https://discourse.julialang.org/t/the-function-to-optimize-in-jump/4964 "2017-08-29T02:03:09Z")

</div>

Folks, my prior experience is mainly in Matlab and I’m new to Julia, so forgive me if my question is basic. I’ve written a likelihood function in Jupyter and want to maximize this function in JuMP. Since it’s 600 lines …

---

## [Is JuMPeR available for Julia v0.6.0?](https://discourse.julialang.org/t/is-jumper-available-for-julia-v0-6-0/5596)

<div class="topic-metadata">

**Author:** [@gavelasq](https://discourse.julialang.org/u/gavelasq)\
**Replies:** 1\
**Last updated:** [August 27, 2017, 6:32pm UTC](https://discourse.julialang.org/t/is-jumper-available-for-julia-v0-6-0/5596 "2017-08-27T18:32:36Z")

</div>

is JuMPeR available for Julia v0.6.0? I got an error in JuMP in the Pkg.checkout(“JuMP”) output saying that JuMPeR does not have an available version for Julia v0.6.0.

---

## [SOS1 Constraints in Bonmin Solver - JuMP / AmplNLWriter](https://discourse.julialang.org/t/sos1-constraints-in-bonmin-solver-jump-amplnlwriter/5450)

<div class="topic-metadata">

**Author:** [@michaellindon](https://discourse.julialang.org/u/michaellindon)\
**Replies:** 7\
**Last updated:** [August 23, 2017, 12:56pm UTC](https://discourse.julialang.org/t/sos1-constraints-in-bonmin-solver-jump-amplnlwriter/5450 "2017-08-23T12:56:27Z")

</div>

I would like to use Bonmin to perform MINLP. The model I have in mind has some SOS constraints of type 1. According to the bonmin documentation page 2, the B-BB algorithm accepts SOS1 constraints. When I try to solve th…

---

## [Optim: What optimiser is best if your gradient computation is slow?](https://discourse.julialang.org/t/optim-what-optimiser-is-best-if-your-gradient-computation-is-slow/5487)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 13\
**Last updated:** [August 22, 2017, 7:24pm UTC](https://discourse.julialang.org/t/optim-what-optimiser-is-best-if-your-gradient-computation-is-slow/5487 "2017-08-22T19:24:40Z")

</div>

I have a objective function that is a result of N stochastic simulations, i.e. some function f with the sample mean of my simulations as input. I am using the ForwarDiff package to produce the gradient of my objective fu…

---

## [JuMP: Please recommend solver](https://discourse.julialang.org/t/jump-please-recommend-solver/4418)

<div class="topic-metadata">

**Author:** [@michaellindon](https://discourse.julialang.org/u/michaellindon)\
**Replies:** 8\
**Last updated:** [August 17, 2017, 8:54pm UTC](https://discourse.julialang.org/t/jump-please-recommend-solver/4418 "2017-08-17T20:54:23Z")

</div>

My objective function is a variant of ordinary linear least squares, by which I mean estimating regression coefficients B\[1\],…,B\[p\] by minimizing sum((Y\[i\]-sum( X\[i,j\]\*B\[j\] for j=1:p))^2 for i=1:n) where Y\[1\],…,Y\[n\] ar…

---

## [Iteratively adding violated inequalities](https://discourse.julialang.org/t/iteratively-adding-violated-inequalities/5413)

<div class="topic-metadata">

**Author:** [@varun7rs](https://discourse.julialang.org/u/varun7rs)\
**Replies:** 8\
**Last updated:** [August 17, 2017, 7:21am UTC](https://discourse.julialang.org/t/iteratively-adding-violated-inequalities/5413 "2017-08-17T07:21:07Z")

</div>

I’m working on a robust optimisation problem wherein I first solve the nominal problem. I then check if the solution obtained from the nominal problem violates the robust constraints for a particular uncertain scenario (…

---

## [Error when enabeling automatic differentiation in Optim](https://discourse.julialang.org/t/error-when-enabeling-automatic-differentiation-in-optim/5410)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 4\
**Last updated:** [August 16, 2017, 7:29pm UTC](https://discourse.julialang.org/t/error-when-enabeling-automatic-differentiation-in-optim/5410 "2017-08-16T19:29:31Z")

</div>

I try to enable forward automatic differentiation to the Rosenbrock example in the documentation (link). When setting the OnceDifferentiable object I get an error: od = OnceDifferentiable(f, initial\_x; autodiff = :forwa…

---

## [StructJuMP with Monte Carlo sampling and benders decomposition](https://discourse.julialang.org/t/structjump-with-monte-carlo-sampling-and-benders-decomposition/5377)

<div class="topic-metadata">

**Author:** [@UserMorocco](https://discourse.julialang.org/u/UserMorocco)\
**Replies:** 1\
**Last updated:** [August 15, 2017, 11:39am UTC](https://discourse.julialang.org/t/structjump-with-monte-carlo-sampling-and-benders-decomposition/5377 "2017-08-15T11:39:34Z")

</div>

Hello Julia community, Can we implement Monte Carlo sampling within a benders decomposition algorithm for stochastic linear programs in Julia package StructJuMP ? Thank you !

---

## [Using an integer-valued variable as the number of summands in JuMP?](https://discourse.julialang.org/t/using-an-integer-valued-variable-as-the-number-of-summands-in-jump/5303)

<div class="topic-metadata">

**Author:** [@xiaoweiz](https://discourse.julialang.org/u/xiaoweiz)\
**Replies:** 5\
**Last updated:** [August 9, 2017, 11:45pm UTC](https://discourse.julialang.org/t/using-an-integer-valued-variable-as-the-number-of-summands-in-jump/5303 "2017-08-09T23:45:18Z")

</div>

I’m trying to reformulate a stochastic program (approximately) as a mixed-integer linear program. A particular constraint involves the summation of N i.i.d. random variables, where N is a decision variable itself, someth…

---

## [Chance constraint modeling](https://discourse.julialang.org/t/chance-constraint-modeling/5301)

<div class="topic-metadata">

**Author:** [@UserMorocco](https://discourse.julialang.org/u/UserMorocco)\
**Replies:** 0\
**Last updated:** [August 9, 2017, 12:49pm UTC](https://discourse.julialang.org/t/chance-constraint-modeling/5301 "2017-08-09T12:49:57Z")

</div>

I have an optimization model with uncertainty in objective function, ie @objective(m, Min, My\_QUANTITY\[t\] \* PRICE\[t\] ) I suppose that the PRICE is uncertain. How this model can be adapted to be used in JuMPChance p…

---

## [A humble request/challenge](https://discourse.julialang.org/t/a-humble-request-challenge/5286)

<div class="topic-metadata">

**Author:** [@jzakiya](https://discourse.julialang.org/u/jzakiya)\
**Replies:** 5\
**Last updated:** [August 8, 2017, 9:40pm UTC](https://discourse.julialang.org/t/a-humble-request-challenge/5286 "2017-08-08T21:40:46Z")

</div>

Hi I primarly use Ruby for math/science problems/projects because it’s so easy to program in, and it allows me to think about how to solve problems without worrying about how to code it. I’ve also played around with Cry…

---

## [Parallel newton-raphson optim](https://discourse.julialang.org/t/parallel-newton-raphson-optim/5226)

<div class="topic-metadata">

**Author:** [@grandemundo82](https://discourse.julialang.org/u/grandemundo82)\
**Replies:** 14\
**Last updated:** [August 7, 2017, 5:48pm UTC](https://discourse.julialang.org/t/parallel-newton-raphson-optim/5226 "2017-08-07T17:48:08Z")

</div>

Anyone has implemented newton-raphson (BFGS or L-BFGS) in parallel in Julia? The flow is super simple but somehow I don’t see how to do it with Optim. It is as follows given x of dimension N. Use N+1 processors, one pro…

---

## [Hierarchical multi-objective linear programming](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 8\
**Last updated:** [August 2, 2017, 1:30pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957 "2017-08-02T13:30:22Z")

</div>

Hierarchical (or lexicographic) multi-objective linear programming is when you have more than one linear objective, and you optimize them in order. Gurobi’s documentation states that it supports this. How can I do thi…

---

## [Code conversion from GAMS to JuMP (Ipopt Solver)](https://discourse.julialang.org/t/code-conversion-from-gams-to-jump-ipopt-solver/5150)

<div class="topic-metadata">

**Author:** [@SingingKim](https://discourse.julialang.org/u/SingingKim)\
**Replies:** 5\
**Last updated:** [August 2, 2017, 12:49pm UTC](https://discourse.julialang.org/t/code-conversion-from-gams-to-jump-ipopt-solver/5150 "2017-08-02T12:49:44Z")

</div>

Is there any better way to convert constraints with multiple indices? Here’s what I’ve done. \[GAMS\] SETS i index of buses /1\*33/ t index of time slots /1\*24/ s red…

---

## [JuliaOpt parallel algorithms](https://discourse.julialang.org/t/juliaopt-parallel-algorithms/5093)

<div class="topic-metadata">

**Author:** [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Replies:** 7\
**Last updated:** [August 1, 2017, 8:43am UTC](https://discourse.julialang.org/t/juliaopt-parallel-algorithms/5093 "2017-08-01T08:43:38Z")

</div>

Hi, I am currently using NLopt.jl to estimate parameters of differential equation systems. I am interested to speed up the calculations hence I am searching for solutions to solve optimization problem in parallel (using…

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

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