# Specific Domains

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

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

**Page:** 194

---

## [Fast ways of updating a \`CuArray\` along certain diagonals based on results from CPU](https://discourse.julialang.org/t/fast-ways-of-updating-a-cuarray-along-certain-diagonals-based-on-results-from-cpu/98910)

<div class="topic-metadata">

**Author:** [@Norman](https://discourse.julialang.org/u/Norman)\
**Replies:** 0\
**Last updated:** [May 16, 2023, 6:11am UTC](https://discourse.julialang.org/t/fast-ways-of-updating-a-cuarray-along-certain-diagonals-based-on-results-from-cpu/98910 "2023-05-16T06:11:03Z")

</div>

I have a scenario in which I need to repetitively updating a CuArray along certain diagonals based on results computed from CPU. The number of diagonals involved can be small and may change across different problems (typ…

---

## [Problem loading saved neural network](https://discourse.julialang.org/t/problem-loading-saved-neural-network/98882)

<div class="topic-metadata">

**Author:** [@LucasMSpereira](https://discourse.julialang.org/u/LucasMSpereira)\
**Replies:** 9\
**Last updated:** [May 16, 2023, 4:09pm UTC](https://discourse.julialang.org/t/problem-loading-saved-neural-network/98882 "2023-05-16T16:09:46Z")

</div>

When trying to load a saved Flux NN with BSON.@load datasetPath \* "trainedNetworks/convnextGen.bson" cpuGenerator I’m getting a invalid struct allocation error. Since doing this last time, the only thing I did was upd…

---

## [Help with speeding up large ODE system from ModelingToolkit](https://discourse.julialang.org/t/help-with-speeding-up-large-ode-system-from-modelingtoolkit/98903)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 3\
**Last updated:** [May 16, 2023, 3:38pm UTC](https://discourse.julialang.org/t/help-with-speeding-up-large-ode-system-from-modelingtoolkit/98903 "2023-05-16T15:38:38Z")

</div>

Hi everyone, I’m trying to speed up the following ODE system, which is a backward-in-space discretization of a set of PDEs, which I’m generating using ModelingToolkit.jl. The bottleneck is in the construction of the sys…

---

## [Help with Custom Struct for High Dimensional COO Arrays](https://discourse.julialang.org/t/help-with-custom-struct-for-high-dimensional-coo-arrays/98934)

<div class="topic-metadata">

**Author:** [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Replies:** 1\
**Last updated:** [May 16, 2023, 2:57pm UTC](https://discourse.julialang.org/t/help-with-custom-struct-for-high-dimensional-coo-arrays/98934 "2023-05-16T14:57:14Z")

</div>

Hello, I have an application where I need \>2 dimensional sparse arrays and I would like to test running them on the GPU as the application is embarrassingly parallel. My plan was to make a CuArray of the type TensorVal …

---

## [Fill a bounding box of a text in Makie](https://discourse.julialang.org/t/fill-a-bounding-box-of-a-text-in-makie/60640)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 9\
**Last updated:** [May 16, 2023, 2:08pm UTC](https://discourse.julialang.org/t/fill-a-bounding-box-of-a-text-in-makie/60640 "2023-05-16T14:08:41Z")

</div>

I’d like to add background color to a text object in a Makie plot – fill the bounding box of the text with some color. If I understood it correctly, text does not have a size property, so bb here has size zero: t = tex…

---

## [How can I print an ODESystem](https://discourse.julialang.org/t/how-can-i-print-an-odesystem/98924)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [May 16, 2023, 12:37pm UTC](https://discourse.julialang.org/t/how-can-i-print-an-odesystem/98924 "2023-05-16T12:37:21Z")

</div>

Using ModelingToolkit I created and simplified a system of equations. If I try to print it I get: julia\> sys Model sys with 2 equations States (2): ω(t) ωˍt(t) Parameters (4): J R A ρ Incidence matrix:2×3 Sp…

---

## [Web plotting when datapoints \>\> plot pixels](https://discourse.julialang.org/t/web-plotting-when-datapoints-plot-pixels/98915)

<div class="topic-metadata">

**Author:** [@pepijndevos](https://discourse.julialang.org/u/pepijndevos)\
**Replies:** 4\
**Last updated:** [May 16, 2023, 11:21am UTC](https://discourse.julialang.org/t/web-plotting-when-datapoints-plot-pixels/98915 "2023-05-16T11:21:33Z")

</div>

Makie is pretty great for plotting big datasets, in particular the datashader functionality datashader · Makie But in the case of WGLMakie, you would first have to send the dataset to the client, which could be gigabyte…

---

## [How to implement a lookup-table in ModellingToolkit](https://discourse.julialang.org/t/how-to-implement-a-lookup-table-in-modellingtoolkit/98912)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [May 16, 2023, 10:24am UTC](https://discourse.julialang.org/t/how-to-implement-a-lookup-table-in-modellingtoolkit/98912 "2023-05-16T10:24:05Z")

</div>

Hello, I want to implement a wind turbine model using ModelingToolkit. The core model consists of only three differential equations, but it includes a lookup-table for the power coefficient. What is the best way to i…

---

## [Callback in Optimization.jl](https://discourse.julialang.org/t/callback-in-optimization-jl/98551)

<div class="topic-metadata">

**Author:** [@Avec](https://discourse.julialang.org/u/Avec)\
**Replies:** 2\
**Last updated:** [May 16, 2023, 3:40am UTC](https://discourse.julialang.org/t/callback-in-optimization-jl/98551 "2023-05-16T03:40:42Z")

</div>

Hi all, I am trying to use Optimization.jl package together with GCMAES.jl. The solve function of Optimization.jl should accept a callback function, but I am not able to make it work. Here is a MWE using Optimization, O…

---

## [Creating three dimensional variable using JuMP](https://discourse.julialang.org/t/creating-three-dimensional-variable-using-jump/98870)

<div class="topic-metadata">

**Author:** [@Gagan\_Meena](https://discourse.julialang.org/u/Gagan_Meena)\
**Replies:** 6\
**Last updated:** [May 15, 2023, 9:26pm UTC](https://discourse.julialang.org/t/creating-three-dimensional-variable-using-jump/98870 "2023-05-15T21:26:13Z")

</div>

I have created a two dimensional variable using the following code. fnew = Vector{Vector{VariableRef}}(undef, c) eta = Vector{Vector{VariableRef}}(undef, c) for i = 1:c newlines = nm\_new\[i\] if newline…

---

## [Simplify a nonlinear expression](https://discourse.julialang.org/t/simplify-a-nonlinear-expression/98772)

<div class="topic-metadata">

**Author:** [@VPBML](https://discourse.julialang.org/u/VPBML)\
**Replies:** 6\
**Last updated:** [May 15, 2023, 5:35pm UTC](https://discourse.julialang.org/t/simplify-a-nonlinear-expression/98772 "2023-05-15T17:35:51Z")

</div>

Hi, Is there any way we can simplify a nonlinear expression automatically in JuMP. For example, if we have: using JuMP, MadNLP model = Model(MadNLP.Optimizer) @variable(model, CA) @variable(model, CB) expr\_str = :($(CA…

---

## [Distributed for loop with timeout](https://discourse.julialang.org/t/distributed-for-loop-with-timeout/98854)

<div class="topic-metadata">

**Author:** [@psterzinger](https://discourse.julialang.org/u/psterzinger)\
**Replies:** 1\
**Last updated:** [May 15, 2023, 5:16pm UTC](https://discourse.julialang.org/t/distributed-for-loop-with-timeout/98854 "2023-05-15T17:16:05Z")

</div>

I’m trying to run a function, which consists of a nested for loop, in which each iteration writes to a SharedArray, and where the runtime between iterations varies unpredictably, with a timeout such that upon termination…

---

## [Is there a way to access a value of a variable in the previous steptime?](https://discourse.julialang.org/t/is-there-a-way-to-access-a-value-of-a-variable-in-the-previous-steptime/98867)

<div class="topic-metadata">

**Author:** [@HamzaKh99](https://discourse.julialang.org/u/HamzaKh99)\
**Replies:** 1\
**Last updated:** [May 15, 2023, 3:38pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-access-a-value-of-a-variable-in-the-previous-steptime/98867 "2023-05-15T15:38:40Z")

</div>

Hello! I’m trying to access the value of a variable in the previous step time to use it afterward, I’m using discrete\_events() for that, but is there a simple way to do it?

---

## [Speeding-up the construction of a second order cone JuMP model](https://discourse.julialang.org/t/speeding-up-the-construction-of-a-second-order-cone-jump-model/98311)

<div class="topic-metadata">

**Author:** [@cgois](https://discourse.julialang.org/u/cgois)\
**Replies:** 6\
**Last updated:** [May 15, 2023, 12:42pm UTC](https://discourse.julialang.org/t/speeding-up-the-construction-of-a-second-order-cone-jump-model/98311 "2023-05-15T12:42:16Z")

</div>

Hi everyone. I need to solve tens of thousands of second order cone problems, so I need my code to be as fast as possible. Currently, my main bottleneck is actually building the problem in JuMP and I would appreciate any…

---

## [Solve a DSGE model using neural networks](https://discourse.julialang.org/t/solve-a-dsge-model-using-neural-networks/98873)

<div class="topic-metadata">

**Author:** [@Vahagn](https://discourse.julialang.org/u/Vahagn)\
**Replies:** 0\
**Last updated:** [May 15, 2023, 10:32am UTC](https://discourse.julialang.org/t/solve-a-dsge-model-using-neural-networks/98873 "2023-05-15T10:32:37Z")

</div>

Hi, I have a DSGE model for which I need to approximate decision functions using neural network. I have already written many parts of my code. But I don’t know how to train it. I have written some training loop in the b…

---

## [Out-of-memory errors using Ipopt to solve very large-scale trajectory optimization problems](https://discourse.julialang.org/t/out-of-memory-errors-using-ipopt-to-solve-very-large-scale-trajectory-optimization-problems/98840)

<div class="topic-metadata">

**Author:** [@zornsllama](https://discourse.julialang.org/u/zornsllama)\
**Replies:** 4\
**Last updated:** [May 15, 2023, 5:43am UTC](https://discourse.julialang.org/t/out-of-memory-errors-using-ipopt-to-solve-very-large-scale-trajectory-optimization-problems/98840 "2023-05-15T05:43:18Z")

</div>

Hi, I’m trying to use Ipopt via NLPModelsIpopt.jl in order to solve large trajectory optimization problems. It is essentially an optimal control problem, to minimize \\int\_{0}^{T} g(x, u(t)) \\, dt subject to the constrai…

---

## [MPI collectives (e.g., MPI.Allgatherv!) scaling issues](https://discourse.julialang.org/t/mpi-collectives-e-g-mpi-allgatherv-scaling-issues/97129)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 1\
**Last updated:** [May 15, 2023, 2:33am UTC](https://discourse.julialang.org/t/mpi-collectives-e-g-mpi-allgatherv-scaling-issues/97129 "2023-05-15T02:33:10Z")

</div>

I found that MPI.Allgatherv! doesn’t scale well when testing it on a cluster. The plot above summarizes the execution time of MPI.Allgatherv! against the number of processes. The scaling shows in the plot doesn’t mat…

---

## [Problem installing SigmoidalProgramming](https://discourse.julialang.org/t/problem-installing-sigmoidalprogramming/98731)

<div class="topic-metadata">

**Author:** [@meet.saiya](https://discourse.julialang.org/u/meet.saiya)\
**Replies:** 1\
**Last updated:** [May 14, 2023, 11:12pm UTC](https://discourse.julialang.org/t/problem-installing-sigmoidalprogramming/98731 "2023-05-14T23:12:36Z")

</div>

I tried installing SigmoidalProgramming in Julia 1.8.5 and it gave the following error. julia\> using SigmoidalProgramming \[ Info: Precompiling SigmoidalProgramming \[ce2a0656-6bed-5c64-9e01-e7b1ac833b80\] ERROR: LoadError…

---

## [ODE Parameter Estimation Using NLopt.jl](https://discourse.julialang.org/t/ode-parameter-estimation-using-nlopt-jl/98825)

<div class="topic-metadata">

**Author:** [@a\_lasko](https://discourse.julialang.org/u/a_lasko)\
**Replies:** 6\
**Last updated:** [May 14, 2023, 3:04pm UTC](https://discourse.julialang.org/t/ode-parameter-estimation-using-nlopt-jl/98825 "2023-05-14T15:04:03Z")

</div>

Good day. I’m new to Julia and using different sources implemented optimization procedure of Predator-Prey ODE system (2 possible models): using ProgressBars, Distributions, DelimitedFiles, DifferentialEquations, DiffE…

---

## [Flux output layer with custom activation function](https://discourse.julialang.org/t/flux-output-layer-with-custom-activation-function/98821)

<div class="topic-metadata">

**Author:** [@YuriS](https://discourse.julialang.org/u/YuriS)\
**Replies:** 2\
**Last updated:** [May 14, 2023, 2:31pm UTC](https://discourse.julialang.org/t/flux-output-layer-with-custom-activation-function/98821 "2023-05-14T14:31:35Z")

</div>

Hello! I am trying to create a neural network that is mostly standard, except with an output layer that applies a sigmoid activation function to one of its four outputs, and just identity to the other three outputs. I …

---

## [How do I store a data structure at the nodes of a graph from Graphs.jl?](https://discourse.julialang.org/t/how-do-i-store-a-data-structure-at-the-nodes-of-a-graph-from-graphs-jl/86774)

<div class="topic-metadata">

**Author:** [@cocoa1231](https://discourse.julialang.org/u/cocoa1231)\
**Replies:** 3\
**Last updated:** [May 14, 2023, 11:52am UTC](https://discourse.julialang.org/t/how-do-i-store-a-data-structure-at-the-nodes-of-a-graph-from-graphs-jl/86774 "2023-05-14T11:52:15Z")

</div>

Say I have a data structure with a “location” (ComplexF64) and a value (Float64) and I want to associate each node of a SimpleGraph from Graphs.jl to each node to keep track of connections between nodes. How should I go …

---

## [JuMP.jl vs MatLab's Optimization Toolbox](https://discourse.julialang.org/t/jump-jl-vs-matlabs-optimization-toolbox/61674)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 3\
**Last updated:** [May 14, 2023, 11:14am UTC](https://discourse.julialang.org/t/jump-jl-vs-matlabs-optimization-toolbox/61674 "2023-05-14T11:14:47Z")

</div>

I am an undergrad, and I am considering taking an optional course on Optimization Engineering next semester. In my engineering faculty, MatLab is the default programming language, and I have heard that the subject relies…

---

## [How to create a 3D network with GMT.jl](https://discourse.julialang.org/t/how-to-create-a-3d-network-with-gmt-jl/98668)

<div class="topic-metadata">

**Author:** [@gabipana7](https://discourse.julialang.org/u/gabipana7)\
**Replies:** 7\
**Last updated:** [May 14, 2023, 9:57am UTC](https://discourse.julialang.org/t/how-to-create-a-3d-network-with-gmt-jl/98668 "2023-05-14T09:57:13Z")

</div>

Hi everyone, I would like to create a 3D network using real coordinates of seismic centers. Without going too much into detail, I have a graph file of edgelists and I laso have the coordinates of the nodes. I am able to…

---

## [Making graph with shapefile](https://discourse.julialang.org/t/making-graph-with-shapefile/98768)

<div class="topic-metadata">

**Author:** [@Michelle\_Ko](https://discourse.julialang.org/u/Michelle_Ko)\
**Replies:** 3\
**Last updated:** [May 14, 2023, 8:17am UTC](https://discourse.julialang.org/t/making-graph-with-shapefile/98768 "2023-05-14T08:17:45Z")

</div>

Hi, I am new to Julia and need some help regarding construction of graph with shapefile. I have shapefile that contains polylines and want to get the shortest path using Dijkstra’s algorithm. The thing is, in order to …

---

## [JuMP model unregister action](https://discourse.julialang.org/t/jump-model-unregister-action/98784)

<div class="topic-metadata">

**Author:** [@Betristor](https://discourse.julialang.org/u/Betristor)\
**Replies:** 1\
**Last updated:** [May 13, 2023, 10:50pm UTC](https://discourse.julialang.org/t/jump-model-unregister-action/98784 "2023-05-13T22:50:39Z")

</div>

I got a question about how JuMP expressions are constructed. Like I got an expression named :a defined on some variables :x and :y and some constants :c in the way like a = x+y+c. But later I want to do some modification…

---

## [Array ordering and naive summation](https://discourse.julialang.org/t/array-ordering-and-naive-summation/1929)

<div class="topic-metadata">

**Author:** [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Replies:** 5\
**Last updated:** [May 13, 2023, 6:00pm UTC](https://discourse.julialang.org/t/array-ordering-and-naive-summation/1929 "2023-05-13T18:00:32Z")

</div>

One of the first things you learn in numerical analysis is that floating-point operations are not associative. A classic example is this: julia\> (0.1 + 0.2) + 0.3 0.6000000000000001 julia\> 0.1 + (0.2 + 0.3) 0.6 I was …

---

## [Quadratic Expression in JuMP](https://discourse.julialang.org/t/quadratic-expression-in-jump/98601)

<div class="topic-metadata">

**Author:** [@Gagan\_Meena](https://discourse.julialang.org/u/Gagan_Meena)\
**Replies:** 15\
**Last updated:** [May 13, 2023, 2:28am UTC](https://discourse.julialang.org/t/quadratic-expression-in-jump/98601 "2023-05-13T02:28:24Z")

</div>

ESS\_cost = CRF\*(CapES\*max\_Eb\*100 + CapPS\*max\_Pb\*100) + FOM\*max\_Pb\*100 + VOM\*sum(PD\[s\]\*dur\[s\] for s in scenar)\*100\*365 cost\_genvar = sum(PgenT\[j,i\]\*cov\[i,k\]\*Pgen\[k,j\] for i in bus\_key for j in scenar for k in bus\_ke…

---

## [SimplePDLP: a directory to illustrate how to implement a Julia optimization solver for teaching purpose](https://discourse.julialang.org/t/simplepdlp-a-directory-to-illustrate-how-to-implement-a-julia-optimization-solver-for-teaching-purpose/98763)

<div class="topic-metadata">

**Author:** [@HaihaoLu](https://discourse.julialang.org/u/HaihaoLu)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 8:38pm UTC](https://discourse.julialang.org/t/simplepdlp-a-directory-to-illustrate-how-to-implement-a-julia-optimization-solver-for-teaching-purpose/98763 "2023-05-12T20:38:23Z")

</div>

Dear friends, SimplePDLP (BUSN-36919-Modern-Large-Scale-Optimization--Theory-and-Computation-2023/SimplePDLP at main · haihaolu/BUSN-36919-Modern-Large-Scale-Optimization--Theory-and-Computation-2023 · GitHub) is a dire…

---

## [How to construct the variational equation of an ODE without handwriting the Jacobi matrix](https://discourse.julialang.org/t/how-to-construct-the-variational-equation-of-an-ode-without-handwriting-the-jacobi-matrix/98735)

<div class="topic-metadata">

**Author:** [@xiaoming](https://discourse.julialang.org/u/xiaoming)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 2:50pm UTC](https://discourse.julialang.org/t/how-to-construct-the-variational-equation-of-an-ode-without-handwriting-the-jacobi-matrix/98735 "2023-05-12T14:50:38Z")

</div>

Hello! I am new to Julia. I want to solve the variational equation of an ODE without handwriting the Jacobi matrix. Here is an MME. Suppose that the ODE equations are the followings: \\dot{x}=y\\\\ \\dot{y}=x-x^3-0.1y+0.…

---

## [Best random number generator for Monte Carlo simulations](https://discourse.julialang.org/t/best-random-number-generator-for-monte-carlo-simulations/98318)

<div class="topic-metadata">

**Author:** [@steve1313](https://discourse.julialang.org/u/steve1313)\
**Replies:** 12\
**Last updated:** [May 12, 2023, 2:48pm UTC](https://discourse.julialang.org/t/best-random-number-generator-for-monte-carlo-simulations/98318 "2023-05-12T14:48:15Z")

</div>

I often write small Monte Carlo simulations to solve difficult probability problems. What’s the best (fastest, most accurate) RNG for this type of use?

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

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