# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?page=393

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

**Page:** 394

---

## [NLopt stalls without objective progress?](https://discourse.julialang.org/t/nlopt-stalls-without-objective-progress/54073)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 2\
**Last updated:** [January 30, 2021, 1:13pm UTC](https://discourse.julialang.org/t/nlopt-stalls-without-objective-progress/54073 "2021-01-30T13:13:58Z")

</div>

I have an optimization problem which I’m solving with NLopt (algorithm :LD\_MMA). The objective is nonlinear, there are upper/lower bound constraints, and one linear constraint. It seems like no matter how long I let NLop…

---

## [Registering an array of functions and using them in constraints and objectives](https://discourse.julialang.org/t/registering-an-array-of-functions-and-using-them-in-constraints-and-objectives/53294)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 4\
**Last updated:** [January 30, 2021, 8:40am UTC](https://discourse.julialang.org/t/registering-an-array-of-functions-and-using-them-in-constraints-and-objectives/53294 "2021-01-30T08:40:43Z")

</div>

(Julia beginner) Still thinking about Nonlinear Programming with JuMP with some generality. (@NLconstraint with a sum, array and scalar variables) There are many NLP JuMP examples available but all more or less simila…

---

## [Optimization with JuMP: an affine expression enters a nonlinear constraint (dynamic discrete choice)](https://discourse.julialang.org/t/optimization-with-jump-an-affine-expression-enters-a-nonlinear-constraint-dynamic-discrete-choice/54230)

<div class="topic-metadata">

**Author:** [@kwokhao](https://discourse.julialang.org/u/kwokhao)\
**Replies:** 2\
**Last updated:** [January 30, 2021, 12:14am UTC](https://discourse.julialang.org/t/optimization-with-jump-an-affine-expression-enters-a-nonlinear-constraint-dynamic-discrete-choice/54230 "2021-01-30T00:14:10Z")

</div>

I am trying to use JuMP to solve a dynamic programming problem, but I cannot get MPEC (with Ipopt) to work. I am solving a prediction problem. There are 2 products, “safe” and “risky”. The safe product always yields uti…

---

## [MethodError: no method matching isless(::Int64, ::Array{UnitRange{Int64},1})](https://discourse.julialang.org/t/methoderror-no-method-matching-isless-int64-array-unitrange-int64-1/53970)

<div class="topic-metadata">

**Author:** [@GraceMabele](https://discourse.julialang.org/u/GraceMabele)\
**Replies:** 20\
**Last updated:** [January 29, 2021, 4:45pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-isless-int64-array-unitrange-int64-1/53970 "2021-01-29T16:45:43Z")

</div>

Hi I am a newbie to JuMP(Julia) and coding too, I am currently computing the following constraints in code below however, it is returning the following error and I am not exactly sure how to solve and I do not understan…

---

## [One colorbar for all subplots using cartopy mapping via PyCall](https://discourse.julialang.org/t/one-colorbar-for-all-subplots-using-cartopy-mapping-via-pycall/54134)

<div class="topic-metadata">

**Author:** [@EuRoXy](https://discourse.julialang.org/u/EuRoXy)\
**Replies:** 6\
**Last updated:** [January 29, 2021, 4:16pm UTC](https://discourse.julialang.org/t/one-colorbar-for-all-subplots-using-cartopy-mapping-via-pycall/54134 "2021-01-29T16:16:04Z")

</div>

I try to generate a shared colorbar for several subplots using cartopy via PyCall and PyPlot but haven’t succeeded. Here’s a minimal code example with separate colorbars: using PyCall, PyPlot plt = pyimport("matplotlib…

---

## [Packages for Drawing and Graphics](https://discourse.julialang.org/t/packages-for-drawing-and-graphics/54153)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 14\
**Last updated:** [January 29, 2021, 4:14pm UTC](https://discourse.julialang.org/t/packages-for-drawing-and-graphics/54153 "2021-01-29T16:14:12Z")

</div>

What packages do I use for graphics? I found Cairo.jl and Graphics.jl the latter says it uses the former as a backend, but Graphics.jl is missing a lot of docstrings and looks abandoned.

---

## [Make transparent square in Gadfly](https://discourse.julialang.org/t/make-transparent-square-in-gadfly/54116)

<div class="topic-metadata">

**Author:** [@fredih](https://discourse.julialang.org/u/fredih)\
**Replies:** 4\
**Last updated:** [January 29, 2021, 12:54pm UTC](https://discourse.julialang.org/t/make-transparent-square-in-gadfly/54116 "2021-01-29T12:54:07Z")

</div>

I want to plot a transparent square over certain time ranges in the Gantt chart @Mattriks created here. It looks like this: And I want it to look somtehing like this: How could I do it?

---

## [Importance of offset](https://discourse.julialang.org/t/importance-of-offset/54170)

<div class="topic-metadata">

**Author:** [@Ruchitha\_Kumar](https://discourse.julialang.org/u/Ruchitha_Kumar)\
**Replies:** 3\
**Last updated:** [January 29, 2021, 10:54am UTC](https://discourse.julialang.org/t/importance-of-offset/54170 "2021-01-29T10:54:07Z")

</div>

What does the offset 20 signify in the below code? using ModelingToolkit @variables x y z @parameters a b c ----Define a nonlinear system eqs = \[0 ~ - y - (z+20), 0 ~ x + a \* y, 0 ~ b + (z+20) \* (x - c)\] ns = Non…

---

## [Obtaining variable scalar coefficients in objective](https://discourse.julialang.org/t/obtaining-variable-scalar-coefficients-in-objective/54128)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 7:59am UTC](https://discourse.julialang.org/t/obtaining-variable-scalar-coefficients-in-objective/54128 "2021-01-29T07:59:37Z")

</div>

Hello! I would like to extend NREL’s progressive hedging package to include a scaled penalty parameter, i.e. one which is proportional to the coefficients of the variable being penalised in the objective function. Long …

---

## [JuMP 0.21.6 released](https://discourse.julialang.org/t/jump-0-21-6-released/54161)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 0\
**Last updated:** [January 29, 2021, 5:10am UTC](https://discourse.julialang.org/t/jump-0-21-6-released/54161 "2021-01-29T05:10:20Z")

</div>

Dear all, We are pleased to announce the release of JuMP 0.21.6. You can find more information about the release on our blog: JuMP 0.21.6 is released | JuMP. The major change for most users is that we have over-hauled …

---

## [Gurobi how to get variable coefficients in constraints](https://discourse.julialang.org/t/gurobi-how-to-get-variable-coefficients-in-constraints/54150)

<div class="topic-metadata">

**Author:** [@rezabayani](https://discourse.julialang.org/u/rezabayani)\
**Replies:** 5\
**Last updated:** [January 29, 2021, 3:51am UTC](https://discourse.julialang.org/t/gurobi-how-to-get-variable-coefficients-in-constraints/54150 "2021-01-29T03:51:56Z")

</div>

I am trying to extract the variable coefficients in a constraint. According to Gurobi documentation, https://www.gurobi.com/documentation/9.1/refman/py\_model\_getcoeff.html, the function Model.getCoeff() should do the tri…

---

## [Attempted to port an RL algorithm from PyTorch to Flux and it's 10x slower](https://discourse.julialang.org/t/attempted-to-port-an-rl-algorithm-from-pytorch-to-flux-and-its-10x-slower/54036)

<div class="topic-metadata">

**Author:** [@DevJac](https://discourse.julialang.org/u/DevJac)\
**Replies:** 17\
**Last updated:** [January 29, 2021, 2:08am UTC](https://discourse.julialang.org/t/attempted-to-port-an-rl-algorithm-from-pytorch-to-flux-and-its-10x-slower/54036 "2021-01-29T02:08:29Z")

</div>

I ported an algorithm described in the book Grokking Deep Reinforcement Learning (which I recommend if you’re a beginner to RL) from PyTorch to Julia. This algorithm is described in chapter 8 of the book, and it is meant…

---

## [Query.jl - User-set missing values in data frames not removed by @dropna](https://discourse.julialang.org/t/query-jl-user-set-missing-values-in-data-frames-not-removed-by-dropna/54094)

<div class="topic-metadata">

**Author:** [@danvinci](https://discourse.julialang.org/u/danvinci)\
**Replies:** 2\
**Last updated:** [January 28, 2021, 2:13pm UTC](https://discourse.julialang.org/t/query-jl-user-set-missing-values-in-data-frames-not-removed-by-dropna/54094 "2021-01-28T14:13:42Z")

</div>

Hi everyone! I’m new to Julia and trying to learn how to use the Query package with data frames, and this question/issue is specific to it. I’m running into the following issue: after importing some CSV data, I need t…

---

## [Three state variable](https://discourse.julialang.org/t/three-state-variable/53632)

<div class="topic-metadata">

**Author:** [@user1200](https://discourse.julialang.org/u/user1200)\
**Replies:** 10\
**Last updated:** [January 28, 2021, 9:56pm UTC](https://discourse.julialang.org/t/three-state-variable/53632 "2021-01-28T21:56:07Z")

</div>

Edit1: Sorry i found lens next to avatar ^^ Hello Please can I ask newbie q, i need to make signum variable from another variable. (tried things like type Int in variable type / sign function in constrains but get err…

---

## [Zygote differentiation issues](https://discourse.julialang.org/t/zygote-differentiation-issues/54130)

<div class="topic-metadata">

**Author:** [@adhikarirsr](https://discourse.julialang.org/u/adhikarirsr)\
**Replies:** 7\
**Last updated:** [January 28, 2021, 8:12pm UTC](https://discourse.julialang.org/t/zygote-differentiation-issues/54130 "2021-01-28T20:12:32Z")

</div>

In an attempt to replicate what I saw here: " The impact of differentiable programming: how ∂P is enabling new science in Julia" function g(x) if x \< 0 print("Enter function name: ") getfield(Base, S…

---

## [Custom row indexing in DataFrames](https://discourse.julialang.org/t/custom-row-indexing-in-dataframes/53959)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 2\
**Last updated:** [January 28, 2021, 6:04pm UTC](https://discourse.julialang.org/t/custom-row-indexing-in-dataframes/53959 "2021-01-28T18:04:17Z")

</div>

Hey everybody :slight\_smile: Given a DataFrame df with columns I, A and C. Is there an way to set I as row index such that I can use df\[i,:\]or df\[i,a\] with i in I and a in A.

---

## [Get conditional kernel densities in julia](https://discourse.julialang.org/t/get-conditional-kernel-densities-in-julia/54086)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 0\
**Last updated:** [January 27, 2021, 9:53pm UTC](https://discourse.julialang.org/t/get-conditional-kernel-densities-in-julia/54086 "2021-01-27T21:53:55Z")

</div>

Hello, I was wondering if there is a method to get a conditional distribution out of a multivariate kde in julia, preferably using the package KernelDensityEstimate.jl. So say for example that I have the following code…

---

## [Julia Plots savefig whitespace issue](https://discourse.julialang.org/t/julia-plots-savefig-whitespace-issue/54081)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 3\
**Last updated:** [January 28, 2021, 3:21am UTC](https://discourse.julialang.org/t/julia-plots-savefig-whitespace-issue/54081 "2021-01-28T03:21:57Z")

</div>

When saving figures generated by Plots.jl with the pyplot, is there a straightforward way to trim the extra whitespace when I call savefig?

---

## [Question regarding COSMO Convergence](https://discourse.julialang.org/t/question-regarding-cosmo-convergence/53996)

<div class="topic-metadata">

**Author:** [@Y\_Li](https://discourse.julialang.org/u/Y_Li)\
**Replies:** 1\
**Last updated:** [January 28, 2021, 1:16am UTC](https://discourse.julialang.org/t/question-regarding-cosmo-convergence/53996 "2021-01-28T01:16:31Z")

</div>

Hi, I have a question regarding COSMO package, this is my first time using it, what steps can I take when my code does not converge(but in reality it should)? It delivers message “Max\_iter\_reached” and stops at a value …

---

## [Plot integrals](https://discourse.julialang.org/t/plot-integrals/54087)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 6\
**Last updated:** [January 27, 2021, 11:27pm UTC](https://discourse.julialang.org/t/plot-integrals/54087 "2021-01-27T23:27:53Z")

</div>

I can plot derivatives using ForwardDiff and Plots using ForwardDiff using Plots f(x)=x^2 df(x)=ForwardDiff.derivative(f(x), x) plot(df) but QuadGK.jl gives two answers so this method won’t work. Is there a way to pl…

---

## [How to define JuMP expressions using a loop](https://discourse.julialang.org/t/how-to-define-jump-expressions-using-a-loop/54079)

<div class="topic-metadata">

**Author:** [@Micah\_Mungal](https://discourse.julialang.org/u/Micah_Mungal)\
**Replies:** 1\
**Last updated:** [January 27, 2021, 10:03pm UTC](https://discourse.julialang.org/t/how-to-define-jump-expressions-using-a-loop/54079 "2021-01-27T22:03:48Z")

</div>

Hi, I am trying to incorporate an expression into Julia using JuMP. Now I have been able to do this using MATLAB, but decided to switch to Julia for specific purposes. However based on the documentation provided for usin…

---

## [Dispatch with @userplot and external recipes](https://discourse.julialang.org/t/dispatch-with-userplot-and-external-recipes/54045)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 1\
**Last updated:** [January 27, 2021, 7:54pm UTC](https://discourse.julialang.org/t/dispatch-with-userplot-and-external-recipes/54045 "2021-01-27T19:54:24Z")

</div>

Hi all, I’m trying to learn the Plots.jl recipe syntax and have a few design questions. Say I have struct MyData{T} where {T\<:Union{One,Two}} ... end I’d like to define @userplot PlotCustom for this, and provide t…

---

## [Auxiliary GLM Statistics](https://discourse.julialang.org/t/auxiliary-glm-statistics/14722)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 9\
**Last updated:** [January 27, 2021, 6:35pm UTC](https://discourse.julialang.org/t/auxiliary-glm-statistics/14722 "2021-01-27T18:35:30Z")

</div>

Julia 1.0. GLM 1.0.0. My Basic Example julia\> using GLM, StatsBase julia\> y=\[1:10;\] ; X= hcat( fill(1,10), y.^2, y.^3 ); lm1= GLM.lm(X, y); Basic Questions is the sigma (i.e., sqrt(deviance(lm)/dof\_residual(lm)) al…

---

## [Positve semidefinite constraint on SDP program in JuMP](https://discourse.julialang.org/t/positve-semidefinite-constraint-on-sdp-program-in-jump/53972)

<div class="topic-metadata">

**Author:** [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)\
**Replies:** 11\
**Last updated:** [January 27, 2021, 2:51pm UTC](https://discourse.julialang.org/t/positve-semidefinite-constraint-on-sdp-program-in-jump/53972 "2021-01-27T14:51:56Z")

</div>

I have to solve an SDP program. For example: min tr(Σ \* A ) s.t. Σ\[1:2,1:2\] \>= AΣA’ Σ \>= 0 Here is what I have: n = 4 d = 2 A = rand(d,n) B = rand(n,n) model = Model(ProxSDP.Optimizer) @variable(model, Σ\[1:n, 1:n\], …

---

## [Generate a zero mean gaussian vector](https://discourse.julialang.org/t/generate-a-zero-mean-gaussian-vector/54056)

<div class="topic-metadata">

**Author:** [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)\
**Replies:** 1\
**Last updated:** [January 27, 2021, 2:12pm UTC](https://discourse.julialang.org/t/generate-a-zero-mean-gaussian-vector/54056 "2021-01-27T14:12:37Z")

</div>

How can I generate a zero mean 2 by 1 Gaussian vector with covariance Identity matrix?

---

## [Truncated Gaussian Process with AbstractGPs?](https://discourse.julialang.org/t/truncated-gaussian-process-with-abstractgps/53779)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 4\
**Last updated:** [January 27, 2021, 1:05pm UTC](https://discourse.julialang.org/t/truncated-gaussian-process-with-abstractgps/53779 "2021-01-27T13:05:12Z")

</div>

Hi all, So I have started to work with gaussian process for a time-series model in my case, and I have a variable of interest “score”, which is always between 0 and 4, and varies over time. Now I am using AbstractGPs a…

---

## [Marker shapes in Plots](https://discourse.julialang.org/t/marker-shapes-in-plots/53806)

<div class="topic-metadata">

**Author:** [@yarahmad](https://discourse.julialang.org/u/yarahmad)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 12:37pm UTC](https://discourse.julialang.org/t/marker-shapes-in-plots/53806 "2021-01-27T12:37:57Z")

</div>

I have to use two marker shapes say: circle and star5, to plot some simulation results via scatter plot. However, the second marker shape, apart from its type, does not appear in plots. I have been trying different ways …

---

## [DifferentialEquations.jl solution object: save\_idxs and interpolation](https://discourse.julialang.org/t/differentialequations-jl-solution-object-save-idxs-and-interpolation/54030)

<div class="topic-metadata">

**Author:** [@cdwhite](https://discourse.julialang.org/u/cdwhite)\
**Replies:** 3\
**Last updated:** [January 27, 2021, 11:55am UTC](https://discourse.julialang.org/t/differentialequations-jl-solution-object-save-idxs-and-interpolation/54030 "2021-01-27T11:55:25Z")

</div>

Hello, I’m trying to solve a largeish number of largeish systems of linear differential equations. I ultimately only care about one component from each equation, so save\_idxs in principle should be exactly what I want: …

---

## [CUDA.jl compiles to 15GB](https://discourse.julialang.org/t/cuda-jl-compiles-to-15gb/54040)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 4\
**Last updated:** [January 27, 2021, 9:56am UTC](https://discourse.julialang.org/t/cuda-jl-compiles-to-15gb/54040 "2021-01-27T09:56:20Z")

</div>

Hi. I’m trying to use PackageCompiler and CUDA. PackageCompiler makes even the smallest program around 150MB because it adds almost all of Julia to it. But when using CUDA, the smallest program seems to have 15GB in the…

---

## [Invertible Constraint in JuMP](https://discourse.julialang.org/t/invertible-constraint-in-jump/54031)

<div class="topic-metadata">

**Author:** [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)\
**Replies:** 1\
**Last updated:** [January 27, 2021, 8:03am UTC](https://discourse.julialang.org/t/invertible-constraint-in-jump/54031 "2021-01-27T08:03:31Z")

</div>

How can I add a constraint in JuMP model with ProxSDP optimizer such that the solution is invertible?

[Previous page](https://discourse.julialang.org/c/domain/10.md?page=392)

[Next page](https://discourse.julialang.org/c/domain/10.md?page=394)
