# Optimization (Mathematical)

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

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

**Page:** 73

---

## [AmplNLWriter no longer works with JuMP](https://discourse.julialang.org/t/amplnlwriter-no-longer-works-with-jump/70740)

<div class="topic-metadata">

**Author:** [@optimist](https://discourse.julialang.org/u/optimist)\
**Replies:** 10\
**Last updated:** [November 4, 2021, 11:52pm UTC](https://discourse.julialang.org/t/amplnlwriter-no-longer-works-with-jump/70740 "2021-11-04T23:52:11Z")

</div>

I was using AmplNLWriter with Ipopt\_jll, but it stopped working when I installed MadNLP. I have removed all my packages and reinstalled (excluding MaNLP), but I have not been able to make AmplNLWriter to work. The error …

---

## [Hypatia -- JuMP](https://discourse.julialang.org/t/hypatia-jump/70717)

<div class="topic-metadata">

**Author:** [@geo](https://discourse.julialang.org/u/geo)\
**Replies:** 4\
**Last updated:** [November 2, 2021, 6:12am UTC](https://discourse.julialang.org/t/hypatia-jump/70717 "2021-11-02T06:12:07Z")

</div>

I know that JuMP does not support BigFloat; however Hypatia does. Is it possible to define a problem in JuMP, in Float64, but cause Hypatia to carry out the optimization in BigFloat? I am working on a problem, where the …

---

## [Periodic cost function for JuMP](https://discourse.julialang.org/t/periodic-cost-function-for-jump/70760)

<div class="topic-metadata">

**Author:** [@sefffal](https://discourse.julialang.org/u/sefffal)\
**Replies:** 6\
**Last updated:** [November 2, 2021, 1:57am UTC](https://discourse.julialang.org/t/periodic-cost-function-for-jump/70760 "2021-11-02T01:57:22Z")

</div>

Hello, I am trying to model a tricky optimization problem using JuMP. Exposition: I am trying to manufacture something a bit like a Fresnel lens. I have a continuous function of height vs x & y position, but we can on…

---

## [Get best parameters for ODE modeling in Julia](https://discourse.julialang.org/t/get-best-parameters-for-ode-modeling-in-julia/70638)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 9\
**Last updated:** [November 1, 2021, 5:20pm UTC](https://discourse.julialang.org/t/get-best-parameters-for-ode-modeling-in-julia/70638 "2021-11-01T17:20:39Z")

</div>

Hello, I have been modeling some data of bacterial growth. I have first run a regression model to obtain the growth rates of the two species of the consortium. I then need to run some ODEs using logistic growth; these a…

---

## [About training strategy](https://discourse.julialang.org/t/about-training-strategy/70528)

<div class="topic-metadata">

**Author:** [@iiisoo](https://discourse.julialang.org/u/iiisoo)\
**Replies:** 2\
**Last updated:** [November 1, 2021, 1:43am UTC](https://discourse.julialang.org/t/about-training-strategy/70528 "2021-11-01T01:43:55Z")

</div>

I am trying to run the example of PINN soling PDE( https://github.com/SciML/NeuralPDE.jl ) But when I use the: discretization = PhysicsInformedNN(chain, QuadratureTraining(),init\_params =initθ) in later part of: i…

---

## [Local infeasibility, Ipopt](https://discourse.julialang.org/t/local-infeasibility-ipopt/70026)

<div class="topic-metadata">

**Author:** [@FH96](https://discourse.julialang.org/u/FH96)\
**Replies:** 13\
**Last updated:** [October 31, 2021, 9:30pm UTC](https://discourse.julialang.org/t/local-infeasibility-ipopt/70026 "2021-10-31T21:30:35Z")

</div>

what can I do if the optimization results in “Converged to a point of local infeasibility. Problem may be infeasible.” despite of changing the start point? I am using JuMP+Ipopt

---

## [Energy Planning Optimization](https://discourse.julialang.org/t/energy-planning-optimization/70592)

<div class="topic-metadata">

**Author:** [@Lwshalls](https://discourse.julialang.org/u/Lwshalls)\
**Replies:** 4\
**Last updated:** [October 30, 2021, 10:04pm UTC](https://discourse.julialang.org/t/energy-planning-optimization/70592 "2021-10-30T22:04:32Z")

</div>

Hey, Im currently starting my MEng thesis in chemical engineering with my focus on Energy Planning optimization for developing countries. Im developing software to provide guidance for policy makers. My supervisor is …

---

## [Dimensionality Reduction Packages in Julia](https://discourse.julialang.org/t/dimensionality-reduction-packages-in-julia/67003)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 27\
**Last updated:** [October 24, 2021, 8:19pm UTC](https://discourse.julialang.org/t/dimensionality-reduction-packages-in-julia/67003 "2021-10-24T20:19:30Z")

</div>

Hello Everyone: Are there any practical examples of PCA implementation that work with Julia? YES – I am familiar and have attempted to implement the instructions listed HERE. My goal however is to use a package that …

---

## [Using MathOptInterface with custom NL objective](https://discourse.julialang.org/t/using-mathoptinterface-with-custom-nl-objective/69823)

<div class="topic-metadata">

**Author:** [@egvila](https://discourse.julialang.org/u/egvila)\
**Replies:** 2\
**Last updated:** [October 29, 2021, 12:51pm UTC](https://discourse.julialang.org/t/using-mathoptinterface-with-custom-nl-objective/69823 "2021-10-29T12:51:56Z")

</div>

I am having trouble passing a custom objective function to MOI. Here’s an example: struct dumbEval \<: MOI.AbstractNLPEvaluator end e = dumbEval(); nlpBlockData = MOI.NLPBlockData(\[\], e, true); o = Ipopt.Optimizer(); …

---

## [Combinatorial Optimization with permutation input and black-box function](https://discourse.julialang.org/t/combinatorial-optimization-with-permutation-input-and-black-box-function/70578)

<div class="topic-metadata">

**Author:** [@duringyear](https://discourse.julialang.org/u/duringyear)\
**Replies:** 5\
**Last updated:** [October 29, 2021, 3:35am UTC](https://discourse.julialang.org/t/combinatorial-optimization-with-permutation-input-and-black-box-function/70578 "2021-10-29T03:35:32Z")

</div>

Hi. I’ve been struggling for nights with combinatorial optimization Input = matrix with permutation. Each row represents unit, and column means visit sequence for each place. e.g) x = \[ 1 2 3 4 ; 2 3 1 4 ; 3 1 2 4 \] …

---

## [Extracting the posterior mean and covariance from the object created by "GP" in GaussianProcesses.jl](https://discourse.julialang.org/t/extracting-the-posterior-mean-and-covariance-from-the-object-created-by-gp-in-gaussianprocesses-jl/70543)

<div class="topic-metadata">

**Author:** [@path-doc](https://discourse.julialang.org/u/path-doc)\
**Replies:** 0\
**Last updated:** [October 28, 2021, 10:21am UTC](https://discourse.julialang.org/t/extracting-the-posterior-mean-and-covariance-from-the-object-created-by-gp-in-gaussianprocesses-jl/70543 "2021-10-28T10:21:24Z")

</div>

As part of a broader Value Function Iteration exercise, I wish to feed the output of predictMVN or predict\_f back into an instantiation of GP. Eg. Suppose we have created an instance gp by feeding GP the usual ingredi…

---

## [How to help nonlinear solvers by applying bounds](https://discourse.julialang.org/t/how-to-help-nonlinear-solvers-by-applying-bounds/70484)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 11\
**Last updated:** [October 28, 2021, 9:59am UTC](https://discourse.julialang.org/t/how-to-help-nonlinear-solvers-by-applying-bounds/70484 "2021-10-28T09:59:24Z")

</div>

Apart from IntervalRootFinding.jl, is there a way to “help” the solvers by providing bounds on the unknown variables? eg is there a way to inform NLsolve.jl or NonlinearSolvers.jl that x\[i\] \>= 0 so that the solver does n…

---

## [Linear equation with integer digits solution](https://discourse.julialang.org/t/linear-equation-with-integer-digits-solution/70479)

<div class="topic-metadata">

**Author:** [@Dan\_Micsa](https://discourse.julialang.org/u/Dan_Micsa)\
**Replies:** 3\
**Last updated:** [October 27, 2021, 3:12pm UTC](https://discourse.julialang.org/t/linear-equation-with-integer-digits-solution/70479 "2021-10-27T15:12:15Z")

</div>

I’m new to Julia and I want tot solve this problem with integer, digits solutions: “Each letter represents a different non-zero digit: SEE + SEE = AXES” I create this code and returns an inaccurate solution: using JuM…

---

## [Optim Control the number of search steps during an iteration](https://discourse.julialang.org/t/optim-control-the-number-of-search-steps-during-an-iteration/70457)

<div class="topic-metadata">

**Author:** [@phy-lxf](https://discourse.julialang.org/u/phy-lxf)\
**Replies:** 0\
**Last updated:** [October 27, 2021, 7:44am UTC](https://discourse.julialang.org/t/optim-control-the-number-of-search-steps-during-an-iteration/70457 "2021-10-27T07:44:57Z")

</div>

When optim.jl uses L-BFGS method to optimize the objective function, the derivative between each step of the optimization process often needs to search 3-4 steps. Can we fix the search step number to 1?

---

## [Save solution and warm start](https://discourse.julialang.org/t/save-solution-and-warm-start/70315)

<div class="topic-metadata">

**Author:** [@Brock](https://discourse.julialang.org/u/Brock)\
**Replies:** 1\
**Last updated:** [October 27, 2021, 4:50am UTC](https://discourse.julialang.org/t/save-solution-and-warm-start/70315 "2021-10-27T04:50:49Z")

</div>

I am using JuMP and CPLEX to solve an optimization problem. How can I save the best solution found after a certain time limit to a file? How can I then use this file as a warm start during another attempt to solve the …

---

## [Unsupported feature Hess with user-defined functions using JuMP and Alpine](https://discourse.julialang.org/t/unsupported-feature-hess-with-user-defined-functions-using-jump-and-alpine/70204)

<div class="topic-metadata">

**Author:** [@blob](https://discourse.julialang.org/u/blob)\
**Replies:** 5\
**Last updated:** [October 25, 2021, 8:46am UTC](https://discourse.julialang.org/t/unsupported-feature-hess-with-user-defined-functions-using-jump-and-alpine/70204 "2021-10-25T08:46:03Z")

</div>

I am trying to use a global solver Alpine in JuMP with user-registered functions. I am getting the same error as mentioned in this Github issue and here discourse post for the same error for Ipopt. The code that reproduc…

---

## [JuMP optimizing parametric DifferentialEquation](https://discourse.julialang.org/t/jump-optimizing-parametric-differentialequation/70302)

<div class="topic-metadata">

**Author:** [@cricci](https://discourse.julialang.org/u/cricci)\
**Replies:** 4\
**Last updated:** [October 25, 2021, 7:32am UTC](https://discourse.julialang.org/t/jump-optimizing-parametric-differentialequation/70302 "2021-10-25T07:32:30Z")

</div>

Hello, I am trying to do the following: I have to optimize some parameters of an ODE, using JuMP (I have an objective function that depends on the solution ode the ODE). Now the problem is that the ODE itself has some o…

---

## [How to use specific convergence measures in Optim.jl?](https://discourse.julialang.org/t/how-to-use-specific-convergence-measures-in-optim-jl/69710)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 3\
**Last updated:** [October 25, 2021, 3:38am UTC](https://discourse.julialang.org/t/how-to-use-specific-convergence-measures-in-optim-jl/69710 "2021-10-25T03:38:21Z")

</div>

I’m using this code: results = Optim.optimize( obj, Optim.TwiceDifferentiableConstraints(lo, hi), θ0, Optim.IPNewton() ) And getting this output: \* Status: success \* Candidate solution Final objective v…

---

## [The usage of callback](https://discourse.julialang.org/t/the-usage-of-callback/70219)

<div class="topic-metadata">

**Author:** [@BYS](https://discourse.julialang.org/u/BYS)\
**Replies:** 6\
**Last updated:** [October 23, 2021, 4:07am UTC](https://discourse.julialang.org/t/the-usage-of-callback/70219 "2021-10-23T04:07:26Z")

</div>

Hi all, I have seen an example of callback usage \>https://jump.dev/JuMP.jl/stable/tutorials/Optimization%20concepts/benders\_lazy\_constraints/ there is a line x\_current = callback\_value.(Ref(cb\_data), x), I wonder if it …

---

## [JuMP installation issue in Julia v1.6](https://discourse.julialang.org/t/jump-installation-issue-in-julia-v1-6/58721)

<div class="topic-metadata">

**Author:** [@erans](https://discourse.julialang.org/u/erans)\
**Replies:** 20\
**Last updated:** [October 20, 2021, 4:29pm UTC](https://discourse.julialang.org/t/jump-installation-issue-in-julia-v1-6/58721 "2021-10-20T16:29:07Z")

</div>

Hello, Something rather strange just happened when I tried to use JuMP with Julia v1.6 and I’m curious if it’s a bug, or if I can get some explanation on why something like this would happen. (I hope this is the approp…

---

## [Integer Optimization: performance help](https://discourse.julialang.org/t/integer-optimization-performance-help/67524)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 11\
**Last updated:** [October 20, 2021, 10:10pm UTC](https://discourse.julialang.org/t/integer-optimization-performance-help/67524 "2021-10-20T22:10:50Z")

</div>

Hello, I am working with an integer optimization problem and I am looking for ways to speed the code up. The math problem is the following I am sampling K different outcomes of the random variable \\omega^{k} which in t…

---

## [Starting point of a nonlinear optimization using Ipopt](https://discourse.julialang.org/t/starting-point-of-a-nonlinear-optimization-using-ipopt/69959)

<div class="topic-metadata">

**Author:** [@FH96](https://discourse.julialang.org/u/FH96)\
**Replies:** 3\
**Last updated:** [October 18, 2021, 11:45am UTC](https://discourse.julialang.org/t/starting-point-of-a-nonlinear-optimization-using-ipopt/69959 "2021-10-18T11:45:27Z")

</div>

If I don’t specify the staring point in a nonlinear optimization using Ipopt ,what does the solver starts with?

---

## [Using JuMP to solve the heat equation - performance tips requested](https://discourse.julialang.org/t/using-jump-to-solve-the-heat-equation-performance-tips-requested/69749)

<div class="topic-metadata">

**Author:** [@krusharth.shah](https://discourse.julialang.org/u/krusharth.shah)\
**Replies:** 11\
**Last updated:** [October 17, 2021, 7:55pm UTC](https://discourse.julialang.org/t/using-jump-to-solve-the-heat-equation-performance-tips-requested/69749 "2021-10-17T19:55:32Z")

</div>

Hello everyone! I am studying MSc Mechatronics and currently working on my scientific project. It is regarding making the Julia code of 1D Heat equation faster. With this message, I have also attached the Julia source…

---

## [Function parameter estimation similar to Octave fminsearch](https://discourse.julialang.org/t/function-parameter-estimation-similar-to-octave-fminsearch/69485)

<div class="topic-metadata">

**Author:** [@John\_Peach](https://discourse.julialang.org/u/John_Peach)\
**Replies:** 4\
**Last updated:** [October 16, 2021, 6:33pm UTC](https://discourse.julialang.org/t/function-parameter-estimation-similar-to-octave-fminsearch/69485 "2021-10-16T18:33:43Z")

</div>

I’m trying to solve a simple parameter estimation problem in Julia similar to how fminsearch works in Octave/Matlab. The RAFF.jl package seemed like a nice approach, but perhaps there’s a better way? For context, I have…

---

## [JuMP with absolute value constraint on variables](https://discourse.julialang.org/t/jump-with-absolute-value-constraint-on-variables/69863)

<div class="topic-metadata">

**Author:** [@qiujj](https://discourse.julialang.org/u/qiujj)\
**Replies:** 2\
**Last updated:** [October 16, 2021, 12:03pm UTC](https://discourse.julialang.org/t/jump-with-absolute-value-constraint-on-variables/69863 "2021-10-16T12:03:48Z")

</div>

I’m trying to optimize a function with absolute constraints on its variable (a\<=|x|\<=b), but I don’t know how to replace function “abs” in JuMP constraint or variable. At first I wrote this one, where x\_min and x\_max ar…

---

## [Forcing Neldermead from Optim.jl to abort when "stuck"](https://discourse.julialang.org/t/forcing-neldermead-from-optim-jl-to-abort-when-stuck/69041)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 8\
**Last updated:** [October 14, 2021, 12:16pm UTC](https://discourse.julialang.org/t/forcing-neldermead-from-optim-jl-to-abort-when-stuck/69041 "2021-10-14T12:16:32Z")

</div>

I am a very frequent user of the Nelder-Mead optimisation routine (of the excellent Optim.jl package) which I find very effective for problems with a handful of free parameters to tune. I have very little knowledge of ho…

---

## [Setting heuristic solution involving symmetric matrix in JuMP callback](https://discourse.julialang.org/t/setting-heuristic-solution-involving-symmetric-matrix-in-jump-callback/69621)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 7\
**Last updated:** [October 13, 2021, 5:11pm UTC](https://discourse.julialang.org/t/setting-heuristic-solution-involving-symmetric-matrix-in-jump-callback/69621 "2021-10-13T17:11:52Z")

</div>

Dear All, I am experimenting with JuMP callback with Gurobi’s MIQCP feature, where I am storing the heuristic values based on tips from https://discourse.julialang.org/t/jump-cplex-how-to-set-heuristic-solution-using-sp…

---

## [Defining constraints using JuMP](https://discourse.julialang.org/t/defining-constraints-using-jump/69659)

<div class="topic-metadata">

**Author:** [@FH96](https://discourse.julialang.org/u/FH96)\
**Replies:** 4\
**Last updated:** [October 13, 2021, 1:43pm UTC](https://discourse.julialang.org/t/defining-constraints-using-jump/69659 "2021-10-13T13:43:42Z")

</div>

while defining constraints in a nonlinear optimization problem ,I face this error: “MethodError: no method matching \*(::DataFrame, ::Vector{VariableRef}))” can anyone help? here’s part of my code: s\_matrix\_df=DataFra…

---

## [How to export the coefficient matrix of JuMP model?](https://discourse.julialang.org/t/how-to-export-the-coefficient-matrix-of-jump-model/69635)

<div class="topic-metadata">

**Author:** [@iiitr](https://discourse.julialang.org/u/iiitr)\
**Replies:** 1\
**Last updated:** [October 12, 2021, 8:53pm UTC](https://discourse.julialang.org/t/how-to-export-the-coefficient-matrix-of-jump-model/69635 "2021-10-12T20:53:29Z")

</div>

Hi all, In Matlab/Yalmip, we can using export, we can get the coefficient matrix and several “standard form” based on certain solver. For example, if we use Gurobi, we can use export to get A, rhs, sense, vtype, obj… I…

---

## [Wrong to add mosek](https://discourse.julialang.org/t/wrong-to-add-mosek/69605)

<div class="topic-metadata">

**Author:** [@wangpuming](https://discourse.julialang.org/u/wangpuming)\
**Replies:** 3\
**Last updated:** [October 12, 2021, 12:13pm UTC](https://discourse.julialang.org/t/wrong-to-add-mosek/69605 "2021-10-12T12:13:09Z")

</div>

I tried Pkg.add(“Mosek”) to add Mosek package, but I got following errors when I use it.(I have installed the license.) I have no idea why I have received these errors. Please let me know if you have been in the same sit…

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

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