# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=216

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

**Page:** 217

---

## [Number of iterations increases with successive optimizations](https://discourse.julialang.org/t/number-of-iterations-increases-with-successive-optimizations/94352)

<div class="topic-metadata">

**Author:** [@aurelhern](https://discourse.julialang.org/u/aurelhern)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 7:40pm UTC](https://discourse.julialang.org/t/number-of-iterations-increases-with-successive-optimizations/94352 "2023-02-09T19:40:59Z")

</div>

Dear all, I am running an optimization problem (multi-period DC-optimal power flow). And when using set\_normalized\_rhs function to modify the constant term on the right-hand-side of the concerned constraints and re-opti…

---

## [Error in InfiniteOpt.jl quick start example](https://discourse.julialang.org/t/error-in-infiniteopt-jl-quick-start-example/94275)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 5\
**Last updated:** [February 9, 2023, 7:23pm UTC](https://discourse.julialang.org/t/error-in-infiniteopt-jl-quick-start-example/94275 "2023-02-09T19:23:37Z")

</div>

Hi everyone, I have tried to run a tutorial example in InfiniteOpt.jl. using InfiniteOpt, Distributions, Ipopt # DEFINE THE PROBLEM CONSTANTS μ = 1; σ = 0.2 x0 = \[0, 0\]; v0 = \[0, 0\] p = \[1 4 6 1; 1 3 0 1\]; tw = \[0,…

---

## [How to resize and fill more efficiently?](https://discourse.julialang.org/t/how-to-resize-and-fill-more-efficiently/94081)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 14\
**Last updated:** [February 9, 2023, 7:16pm UTC](https://discourse.julialang.org/t/how-to-resize-and-fill-more-efficiently/94081 "2023-02-09T19:16:37Z")

</div>

Hello! Suppose I have: using StaticArrays S = rand(SVector{3,Float32},10^6) function MyResizeAndFill!(S,N) resize!(S,N) fill!(S,zero(eltype(S))) end @benchmark MyResizeAndFill!($S,$(10^8)) BenchmarkTools.Tri…

---

## [Plot multiple similar CSVs with AoG](https://discourse.julialang.org/t/plot-multiple-similar-csvs-with-aog/94279)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 12\
**Last updated:** [February 9, 2023, 3:23pm UTC](https://discourse.julialang.org/t/plot-multiple-similar-csvs-with-aog/94279 "2023-02-09T15:23:25Z")

</div>

I am loading multiple CSV files and want to plot them on top of each other, but I can’t figure out an easy way to change the line color and style to identify them in a legend. df1 = DataFrame("X Data" =\> 1:3, "Unused Da…

---

## [Makie: Equally spaced ticks](https://discourse.julialang.org/t/makie-equally-spaced-ticks/94308)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 9:21am UTC](https://discourse.julialang.org/t/makie-equally-spaced-ticks/94308 "2023-02-09T09:21:11Z")

</div>

I can force the axis to be equally scaled via: ax = Axis(fig\[1, 1\], aspect=DataAspect()) But have not yet figured out, if there is an elegant way to have also equally spaced ticks on both axis. In plotly /PlotlyJS I c…

---

## [How to plot the orientation of particles?](https://discourse.julialang.org/t/how-to-plot-the-orientation-of-particles/94262)

<div class="topic-metadata">

**Author:** [@Jyoti\_Sharma](https://discourse.julialang.org/u/Jyoti_Sharma)\
**Replies:** 10\
**Last updated:** [February 9, 2023, 8:47am UTC](https://discourse.julialang.org/t/how-to-plot-the-orientation-of-particles/94262 "2023-02-09T08:47:53Z")

</div>

Dear all, I am trying to plot the orientation of 2D Brownian particles. I have the x and y positions and the orientation of each particle. Given this, I have successfully plotted the x and y positions of the particles, …

---

## [Piecewise-constant fitting](https://discourse.julialang.org/t/piecewise-constant-fitting/94091)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 21\
**Last updated:** [February 9, 2023, 12:40am UTC](https://discourse.julialang.org/t/piecewise-constant-fitting/94091 "2023-02-09T00:40:42Z")

</div>

Is there an example or a Julia package for piecewise-constant fitting of 1D series? See a Matlab example of expected results here. Thanks.

---

## [WebSocket Heartbeat](https://discourse.julialang.org/t/websocket-heartbeat/54291)

<div class="topic-metadata">

**Author:** [@MasFlam](https://discourse.julialang.org/u/MasFlam)\
**Replies:** 2\
**Last updated:** [February 8, 2023, 10:41pm UTC](https://discourse.julialang.org/t/websocket-heartbeat/54291 "2023-02-08T22:41:05Z")

</div>

The websockets Discord API expects clients to send a “heartbeat” every X milliseconds (it’s around a minute) to keep the connection alive. How can I (using WebSockets.jl or the HTTP.WebSockets module) send a websocket me…

---

## [GLMakie: figure does not change](https://discourse.julialang.org/t/glmakie-figure-does-not-change/94277)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 4\
**Last updated:** [February 8, 2023, 8:13pm UTC](https://discourse.julialang.org/t/glmakie-figure-does-not-change/94277 "2023-02-08T20:13:30Z")

</div>

Hi, I do not manage to make my fig interactive, below a simplified version of my initial script. Any idea what is missing? using GLMakie x\_ = 0:0.01:8π obs\_ = \[Observable(0.0) for s in 1:3\] function example\_func(\_x, …

---

## [Why can Flux not reduce this?](https://discourse.julialang.org/t/why-can-flux-not-reduce-this/94071)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 5\
**Last updated:** [February 8, 2023, 7:57pm UTC](https://discourse.julialang.org/t/why-can-flux-not-reduce-this/94071 "2023-02-08T19:57:55Z")

</div>

Hello I am trying: using CUDA S = rand(SVector{3,Float32},5) DST = zeros(SVector{3,Float32},5) I = \[3,1,2,5,4\] # Works great on CPU @CUDA.time NNlib.scatter!(+, DST,S,I) 0.000004 seconds 5-element Vecto…

---

## [How to define multiple random variables in SDDP](https://discourse.julialang.org/t/how-to-define-multiple-random-variables-in-sddp/94231)

<div class="topic-metadata">

**Author:** [@Sorooshsa](https://discourse.julialang.org/u/Sorooshsa)\
**Replies:** 5\
**Last updated:** [February 8, 2023, 6:52pm UTC](https://discourse.julialang.org/t/how-to-define-multiple-random-variables-in-sddp/94231 "2023-02-08T18:52:25Z")

</div>

Hi everyone, I have a small stochastic hydropower problem. As you may know, water inflows are considered random variables in most hydropower problems, just like my problem. There is a well-structured example here: htt…

---

## [Makie: how to make a vertical (rotated by 90deg) lines! plot](https://discourse.julialang.org/t/makie-how-to-make-a-vertical-rotated-by-90deg-lines-plot/94207)

<div class="topic-metadata">

**Author:** [@kaltsoplyn](https://discourse.julialang.org/u/kaltsoplyn)\
**Replies:** 3\
**Last updated:** [February 8, 2023, 5:45pm UTC](https://discourse.julialang.org/t/makie-how-to-make-a-vertical-rotated-by-90deg-lines-plot/94207 "2023-02-08T17:45:46Z")

</div>

I can’t figure out a reasonably simple answer to this, and I’d guess the must be one. I want to create a lines plot rotated 90 degrees. Like, everything rotated: axis, labels, curves, the whole thing. Here’s a minimum w…

---

## [Create graph from public Mastodon data](https://discourse.julialang.org/t/create-graph-from-public-mastodon-data/90637)

<div class="topic-metadata">

**Author:** [@mmeer](https://discourse.julialang.org/u/mmeer)\
**Replies:** 2\
**Last updated:** [February 8, 2023, 2:33pm UTC](https://discourse.julialang.org/t/create-graph-from-public-mastodon-data/90637 "2023-02-08T14:33:31Z")

</div>

Hi there, I have written a script to fetch an array of accounts that I follow on Mastodon. Each account is represented by a dictionary with KeySet for a Dict{String, Any} with 21 entries. Keys: "acct" "locked" "c…

---

## [GPU code has a high amount of CPU allocations?](https://discourse.julialang.org/t/gpu-code-has-a-high-amount-of-cpu-allocations/94092)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 7\
**Last updated:** [February 8, 2023, 2:17pm UTC](https://discourse.julialang.org/t/gpu-code-has-a-high-amount-of-cpu-allocations/94092 "2023-02-08T14:17:50Z")

</div>

Hello! More of a “meta” question. I need some pointers on this. I have some Julia code which allocates 0 times on the GPU other than the initial making of arrays for memory etc. But I have such a high number of CPU al…

---

## [Type stability with Flux gradient of loss function requiring parameters](https://discourse.julialang.org/t/type-stability-with-flux-gradient-of-loss-function-requiring-parameters/94156)

<div class="topic-metadata">

**Author:** [@PatrickMcFarlane](https://discourse.julialang.org/u/PatrickMcFarlane)\
**Replies:** 4\
**Last updated:** [February 8, 2023, 1:37pm UTC](https://discourse.julialang.org/t/type-stability-with-flux-gradient-of-loss-function-requiring-parameters/94156 "2023-02-08T13:37:07Z")

</div>

Hello, I’m using Flux to replicate an economics application of machine learning (originally done in Python/Tensor flow here). In this problem, neural networks are used to solve a functional equation of the form g(f(x),…

---

## [Makie will not use \`texfont()\`](https://discourse.julialang.org/t/makie-will-not-use-texfont/94146)

<div class="topic-metadata">

**Author:** [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)\
**Replies:** 4\
**Last updated:** [February 8, 2023, 12:34pm UTC](https://discourse.julialang.org/t/makie-will-not-use-texfont/94146 "2023-02-08T12:34:42Z")

</div>

I am having a strange problem with using LaTeX font for the axis and labels in Makie. In GLMakie@0.7.0, the classic method of setting font=texfont() works without issue. I can not get the axes and labels to use the same …

---

## [OpenFAST with Julia](https://discourse.julialang.org/t/openfast-with-julia/94267)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [February 8, 2023, 10:42am UTC](https://discourse.julialang.org/t/openfast-with-julia/94267 "2023-02-08T10:42:17Z")

</div>

OpenFAST is the standard wind turbine simulation tool from NREL, written in Fortran. OpenFAST · GitHub If I want to use it in Julia on Linux, what is the best approach? There are wrappers for Matlab and Python, but not…

---

## [CUDNN produces a lot of errors and warnings](https://discourse.julialang.org/t/cudnn-produces-a-lot-of-errors-and-warnings/93940)

<div class="topic-metadata">

**Author:** [@Euhan](https://discourse.julialang.org/u/Euhan)\
**Replies:** 2\
**Last updated:** [February 8, 2023, 9:14am UTC](https://discourse.julialang.org/t/cudnn-produces-a-lot-of-errors-and-warnings/93940 "2023-02-08T09:14:54Z")

</div>

I have lately been getting a lot of errors emanating from CUDNN.jl when training Flux models. This happens also with code I really think has or would have worked before. Does anyone understand this? ┌ Error: CuDNN (v83…

---

## [MOI: Re-evaluate custom bridge & \`direct\_model(...)\` bridging](https://discourse.julialang.org/t/moi-re-evaluate-custom-bridge-direct-model-bridging/94219)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 9\
**Last updated:** [February 8, 2023, 7:36am UTC](https://discourse.julialang.org/t/moi-re-evaluate-custom-bridge-direct-model-bridging/94219 "2023-02-08T07:36:20Z")

</div>

As far as I understand, when I add a custom bridge (struct MyCustomBridge{T} \<: MOI.Bridges.Constraint.AbstractBridge end) to my model using model = JuMP.Model(HiGHS.Optimizer) MOI.Bridges.add\_bridge(JuMP.backend(model…

---

## [Matrix multiplication convergence](https://discourse.julialang.org/t/matrix-multiplication-convergence/94042)

<div class="topic-metadata">

**Author:** [@WhY](https://discourse.julialang.org/u/WhY)\
**Replies:** 10\
**Last updated:** [February 8, 2023, 7:30am UTC](https://discourse.julialang.org/t/matrix-multiplication-convergence/94042 "2023-02-08T07:30:37Z")

</div>

I am trying to coding a transition matrix I generated using Rouwenhorst converge to a idempotent by multiply itself multiple times in Julia using if loop, but I am new to Julia and don’t know how. Basic enviroment: \\Pi…

---

## [How to use FluxMPI on slurm?](https://discourse.julialang.org/t/how-to-use-fluxmpi-on-slurm/94251)

<div class="topic-metadata">

**Author:** [@Emrick\_Liu](https://discourse.julialang.org/u/Emrick_Liu)\
**Replies:** 0\
**Last updated:** [February 8, 2023, 4:16am UTC](https://discourse.julialang.org/t/how-to-use-fluxmpi-on-slurm/94251 "2023-02-08T04:16:08Z")

</div>

Hi, I tried to use FluxMPI on Slurm, couldn’t figure out the configuration. Can anyone provide a minimum example? Currently, I’m basically doing something like this: #SBATCH --ntasks=3 export JULIA\_CUDA\_MEMORY\_POOL=no…

---

## [Latexify generating incorrect output with accented strings](https://discourse.julialang.org/t/latexify-generating-incorrect-output-with-accented-strings/94098)

<div class="topic-metadata">

**Author:** [@Whyborn](https://discourse.julialang.org/u/Whyborn)\
**Replies:** 5\
**Last updated:** [February 8, 2023, 1:06am UTC](https://discourse.julialang.org/t/latexify-generating-incorrect-output-with-accented-strings/94098 "2023-02-08T01:06:46Z")

</div>

Hi, Been hitting issues with Latexify-generated expressions when using accented characters. A simple example: using Symbolics, Latexify @variables x̄ ȳ z latexify(x̄ + ȳ + z) # Gives x\\bar + z + ȳ This is incorrect …

---

## [Yaxis log scale StipplePlotly](https://discourse.julialang.org/t/yaxis-log-scale-stippleplotly/94236)

<div class="topic-metadata">

**Author:** [@olive](https://discourse.julialang.org/u/olive)\
**Replies:** 0\
**Last updated:** [February 7, 2023, 9:38pm UTC](https://discourse.julialang.org/t/yaxis-log-scale-stippleplotly/94236 "2023-02-07T21:38:20Z")

</div>

I would like to display a plot with a y-axis in logarithmic scale but with this simple code is actually the x-axis which is render in logarithmic scale. Does anyone know a solution? using GenieFramework @genietools @o…

---

## [ModelingToolkit: algebraic equations in likelihood and reverse-mode AD](https://discourse.julialang.org/t/modelingtoolkit-algebraic-equations-in-likelihood-and-reverse-mode-ad/94203)

<div class="topic-metadata">

**Author:** [@Brian\_Hartley](https://discourse.julialang.org/u/Brian_Hartley)\
**Replies:** 2\
**Last updated:** [February 7, 2023, 8:30pm UTC](https://discourse.julialang.org/t/modelingtoolkit-algebraic-equations-in-likelihood-and-reverse-mode-ad/94203 "2023-02-07T20:30:20Z")

</div>

TLDR - Is it possible to use both state / observed variables from ODESolution in a likelihood, without concatenating them ex post or using mutation? Maybe there is something dead-simple I’m missing! I’m starting to con…

---

## [How do I move the slider from one time point to another and measure the time it takes to redraw an image?](https://discourse.julialang.org/t/how-do-i-move-the-slider-from-one-time-point-to-another-and-measure-the-time-it-takes-to-redraw-an-image/94232)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 0\
**Last updated:** [February 7, 2023, 7:59pm UTC](https://discourse.julialang.org/t/how-do-i-move-the-slider-from-one-time-point-to-another-and-measure-the-time-it-takes-to-redraw-an-image/94232 "2023-02-07T19:59:54Z")

</div>

I would like to benchmark interactive topoplot. More specifically, measure the time between drawing topoplot with one time point on the slider and another. I tried several times, but failed. For now, I want it to at lea…

---

## [JuMP: Multiplicative parameters for LP](https://discourse.julialang.org/t/jump-multiplicative-parameters-for-lp/94192)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 3\
**Last updated:** [February 7, 2023, 7:52pm UTC](https://discourse.julialang.org/t/jump-multiplicative-parameters-for-lp/94192 "2023-02-07T19:52:45Z")

</div>

I’m trying to rework how “model parameters” work in my model. I know that using JuMP import HiGHS model = direct\_model(HiGHS.Optimizer()) p = @variable(model) fix(p, 1.0; force=true) x = @variable(model) @constraint(…

---

## [ModelingToolkit - DiscreteUpdate](https://discourse.julialang.org/t/modelingtoolkit-discreteupdate/94183)

<div class="topic-metadata">

**Author:** [@jondavis847](https://discourse.julialang.org/u/jondavis847)\
**Replies:** 3\
**Last updated:** [February 7, 2023, 7:04pm UTC](https://discourse.julialang.org/t/modelingtoolkit-discreteupdate/94183 "2023-02-07T19:04:24Z")

</div>

Hello. I’m trying to implement discrete control in MTK using the DiscreteUpdate operator. It failed to update on my more complex model, seems to fail for a very basic MWE as well. using ModelingToolkit, DifferentialEqua…

---

## [Gradient norm does not change in \`Optim\` using \`autodiff\`](https://discourse.julialang.org/t/gradient-norm-does-not-change-in-optim-using-autodiff/94215)

<div class="topic-metadata">

**Author:** [@csev](https://discourse.julialang.org/u/csev)\
**Replies:** 2\
**Last updated:** [February 7, 2023, 6:31pm UTC](https://discourse.julialang.org/t/gradient-norm-does-not-change-in-optim-using-autodiff/94215 "2023-02-07T18:31:59Z")

</div>

I’m trying to figure out how to interpret the occasional failure of an optimization routine to move form a candidate point. Below (at bottom) is output from Optim using NewtonTrustRegion, with autodiff = true. The neithe…

---

## [UndefVarError: with\_optimizer not defined with ProxSDP](https://discourse.julialang.org/t/undefvarerror-with-optimizer-not-defined-with-proxsdp/94076)

<div class="topic-metadata">

**Author:** [@horvetz](https://discourse.julialang.org/u/horvetz)\
**Replies:** 4\
**Last updated:** [February 7, 2023, 6:17am UTC](https://discourse.julialang.org/t/undefvarerror-with-optimizer-not-defined-with-proxsdp/94076 "2023-02-07T06:17:32Z")

</div>

I just installed ProxSDP, but when I tried this test code, # Load packages using ProxSDP, JuMP, LinearAlgebra # Number of vertices n = 4 # Graph weights W = \[18.0 -5.0 -7.0 -6.0 -5.0 6.0 0.0 -1.0 -7.0…

---

## [Query.jl and CUDA](https://discourse.julialang.org/t/query-jl-and-cuda/94205)

<div class="topic-metadata">

**Author:** [@hovi](https://discourse.julialang.org/u/hovi)\
**Replies:** 0\
**Last updated:** [February 7, 2023, 1:07pm UTC](https://discourse.julialang.org/t/query-jl-and-cuda/94205 "2023-02-07T13:07:53Z")

</div>

I am playing with Query.jl and it works fine with CPU code, I even measured some usecases and it works faster than using “classic” for loops code. What I don’t know is, if it has any support for CUDA or any kind of guid…

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=215)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=217)
