# Specific Domains

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

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

**Page:** 151

---

## [AD with Enzyme.jl: "task switch not allowed from inside staged nor pure functions"](https://discourse.julialang.org/t/ad-with-enzyme-jl-task-switch-not-allowed-from-inside-staged-nor-pure-functions/106944)

<div class="topic-metadata">

**Author:** [@Joh11](https://discourse.julialang.org/u/Joh11)\
**Replies:** 3\
**Last updated:** [November 30, 2023, 5:58pm UTC](https://discourse.julialang.org/t/ad-with-enzyme-jl-task-switch-not-allowed-from-inside-staged-nor-pure-functions/106944 "2023-11-30T17:58:22Z")

</div>

Hi all, I am trying to use Enzyme.jl to compute a gradient. I want to use gradient descent to find the optimal parameters to reproduce the spectrum of a family of Hamiltonians (i.e. just 2x2 hermitian matrices). Here is…

---

## [\`@mtkmodel\` & \`constants\`?](https://discourse.julialang.org/t/mtkmodel-constants/106955)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [November 30, 2023, 2:31pm UTC](https://discourse.julialang.org/t/mtkmodel-constants/106955 "2023-11-30T14:31:18Z")

</div>

I’m using ModelingToolkit v8.73.1. I’m trying to use @constants with a begin...end construct within an MTK model created by @mtkmodel \[similar to using a @parameters construct\], but Julia tells me that @constants is not…

---

## [Transitioning 3D surface plot to Makie v0.20](https://discourse.julialang.org/t/transitioning-3d-surface-plot-to-makie-v0-20/106928)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 1\
**Last updated:** [November 30, 2023, 10:46am UTC](https://discourse.julialang.org/t/transitioning-3d-surface-plot-to-makie-v0-20/106928 "2023-11-30T10:46:56Z")

</div>

I had a figure which consists of multiple 3D surface plots. The script looks something like using CairoMakie; CairoMakie.activate!() update\_theme!(Surface = (diffuse = Vec3f(1,0), specular = Vec3f(0.2), shading = true)…

---

## [Makie: PDF paper size (or MadiaBox)?](https://discourse.julialang.org/t/makie-pdf-paper-size-or-madiabox/106900)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 13\
**Last updated:** [November 30, 2023, 7:11am UTC](https://discourse.julialang.org/t/makie-pdf-paper-size-or-madiabox/106900 "2023-11-30T07:11:40Z")

</div>

How do you specify the paper size of the PDF image? Alternatively, how do you control the physical size of the axes? I must be fundamentally misunderstanding how the sizing of the plot works. In the example at the end…

---

## [Subtour elimination constraints](https://discourse.julialang.org/t/subtour-elimination-constraints/106902)

<div class="topic-metadata">

**Author:** [@Victor\_Neto](https://discourse.julialang.org/u/Victor_Neto)\
**Replies:** 15\
**Last updated:** [November 30, 2023, 1:58am UTC](https://discourse.julialang.org/t/subtour-elimination-constraints/106902 "2023-11-30T01:58:34Z")

</div>

Dear colleagues, I am studying the school bus routing problem: Redirecting. I am reproducing this mixed-integer linear programming formulation. However, I was replacing the sub-tour constraints (3) with a flow constrai…

---

## [Running NUTS with a categorical prior?](https://discourse.julialang.org/t/running-nuts-with-a-categorical-prior/106871)

<div class="topic-metadata">

**Author:** [@Alejandro\_Quiaro\_San](https://discourse.julialang.org/u/Alejandro_Quiaro_San)\
**Replies:** 8\
**Last updated:** [November 29, 2023, 11:16pm UTC](https://discourse.julialang.org/t/running-nuts-with-a-categorical-prior/106871 "2023-11-29T23:16:28Z")

</div>

Hello guys. I’m new to Turing.jl and I’m having some trouble building my model. It is supposed to be a relatively simple model. I have a forward operator called “MT” that takes 3 vectors as input (d,rho,f) and outputs “…

---

## [SBRP problem with capacity os bus](https://discourse.julialang.org/t/sbrp-problem-with-capacity-os-bus/106719)

<div class="topic-metadata">

**Author:** [@Victor\_Neto](https://discourse.julialang.org/u/Victor_Neto)\
**Replies:** 5\
**Last updated:** [November 29, 2023, 7:23pm UTC](https://discourse.julialang.org/t/sbrp-problem-with-capacity-os-bus/106719 "2023-11-29T19:23:11Z")

</div>

I’m trying to model a problem with school transport routes, however, according to the code below, whenever the bus capacity is exceeded by the number of students, the code presents an error. I don’t know which constraint…

---

## [Issues solving a bilevel optimization with binary variables](https://discourse.julialang.org/t/issues-solving-a-bilevel-optimization-with-binary-variables/105460)

<div class="topic-metadata">

**Author:** [@kiki](https://discourse.julialang.org/u/kiki)\
**Replies:** 3\
**Last updated:** [November 29, 2023, 5:44pm UTC](https://discourse.julialang.org/t/issues-solving-a-bilevel-optimization-with-binary-variables/105460 "2023-11-29T17:44:23Z")

</div>

I’m new using Julia to solve my nonlinear mixed integer bilevel model, so I have a model in JuMP using BilevelJuMP with binary and continuous variables at the lower and upper level and with non-linear \[non quadratic\] co…

---

## [Xpress with bilinear models (the model is MIQCP)](https://discourse.julialang.org/t/xpress-with-bilinear-models-the-model-is-miqcp/106680)

<div class="topic-metadata">

**Author:** [@martina.gherardi](https://discourse.julialang.org/u/martina.gherardi)\
**Replies:** 7\
**Last updated:** [November 29, 2023, 5:37pm UTC](https://discourse.julialang.org/t/xpress-with-bilinear-models-the-model-is-miqcp/106680 "2023-11-29T17:37:01Z")

</div>

Hi, I am trying to use Xpress on a model with bilinear terms. With linear models it works while with my bilinear model I obtain: ?900 Warning: The quadratic part of row 'R21577' defines a nonconvex region. Please chec…

---

## [Adjoint of 2d diffusion using SciMLSensitivity](https://discourse.julialang.org/t/adjoint-of-2d-diffusion-using-scimlsensitivity/106863)

<div class="topic-metadata">

**Author:** [@Alberto\_Roman](https://discourse.julialang.org/u/Alberto_Roman)\
**Replies:** 3\
**Last updated:** [November 29, 2023, 5:23pm UTC](https://discourse.julialang.org/t/adjoint-of-2d-diffusion-using-scimlsensitivity/106863 "2023-11-29T17:23:39Z")

</div>

I am trying to try to solve the adjoint problem of 2d diffusion using SciMLSensitivity. My test case follow the 1d case given at Partial Differential Equation (PDE) Constrained Optimization · SciMLSensitivity.jl Howeve…

---

## [ModelingToolkit, vars to varmap?](https://discourse.julialang.org/t/modelingtoolkit-vars-to-varmap/106904)

<div class="topic-metadata">

**Author:** [@rpex](https://discourse.julialang.org/u/rpex)\
**Replies:** 6\
**Last updated:** [November 29, 2023, 4:37pm UTC](https://discourse.julialang.org/t/modelingtoolkit-vars-to-varmap/106904 "2023-11-29T16:37:37Z")

</div>

Hello, Is there a function to get the index from variable names in ModelingToolkit.jl? Or a function that returns me a varmap (Vector{Pair{Num, Float64}})? So the opposite of ModelingToolkit.varmap\_to\_vars() I’m curr…

---

## [ModelingToolkit for (continuous) Model ID with (discrete) input and output data](https://discourse.julialang.org/t/modelingtoolkit-for-continuous-model-id-with-discrete-input-and-output-data/106889)

<div class="topic-metadata">

**Author:** [@rpex](https://discourse.julialang.org/u/rpex)\
**Replies:** 3\
**Last updated:** [November 29, 2023, 3:19pm UTC](https://discourse.julialang.org/t/modelingtoolkit-for-continuous-model-id-with-discrete-input-and-output-data/106889 "2023-11-29T15:19:19Z")

</div>

I want to model a quadrocpter with MTK. In the first step I want to identify the parameters of a simple model from real flight data. In the second step I want to learn not yet modeled effects from the data by different e…

---

## [Ideas for Saving Intermediate Results](https://discourse.julialang.org/t/ideas-for-saving-intermediate-results/106724)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 7\
**Last updated:** [November 29, 2023, 8:44am UTC](https://discourse.julialang.org/t/ideas-for-saving-intermediate-results/106724 "2023-11-29T08:44:52Z")

</div>

Hello, I’d appreciate any thoughts or feedback on how I could implement the following. I have a long-running simulation (several days) I run on my university’s HPC. Till now I have been saving the results at the end of…

---

## [Point Occlusion in 3D Scatter Makie](https://discourse.julialang.org/t/point-occlusion-in-3d-scatter-makie/95413)

<div class="topic-metadata">

**Author:** [@Jordan\_Cluts](https://discourse.julialang.org/u/Jordan_Cluts)\
**Replies:** 14\
**Last updated:** [November 28, 2023, 10:53pm UTC](https://discourse.julialang.org/t/point-occlusion-in-3d-scatter-makie/95413 "2023-11-28T22:53:03Z")

</div>

When I create a 3D scatter plot in Makie some of the points that are “closer” to the camera are plotted behind points that are further from the camera. This can make the plots harder to interpret. Is there a setting or t…

---

## [Combining Catalyst DSL models and ModelingToolkit explicit ODE models](https://discourse.julialang.org/t/combining-catalyst-dsl-models-and-modelingtoolkit-explicit-ode-models/54418)

<div class="topic-metadata">

**Author:** [@conradh](https://discourse.julialang.org/u/conradh)\
**Replies:** 18\
**Last updated:** [November 28, 2023, 6:49pm UTC](https://discourse.julialang.org/t/combining-catalyst-dsl-models-and-modelingtoolkit-explicit-ode-models/54418 "2023-11-28T18:49:02Z")

</div>

I’d like to connect a model defined via explicit ODEs using ModelingToolkit.jl with a model defined using the reaction DSL provided by Catalyst.jl. Specifically, I’d like to use an output of my ODE model as a forcing fun…

---

## [Is there any method to get a JuMP model in Latex format?](https://discourse.julialang.org/t/is-there-any-method-to-get-a-jump-model-in-latex-format/106728)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 5\
**Last updated:** [November 28, 2023, 5:29pm UTC](https://discourse.julialang.org/t/is-there-any-method-to-get-a-jump-model-in-latex-format/106728 "2023-11-28T17:29:25Z")

</div>

I use JuMP package from julia programming language for modelling optimization problems. To investigate the performance of the model I need to print some of the model constraints. I want to know is there any automatic way…

---

## [HUION Inspiroy 2 tablet driver in Julia](https://discourse.julialang.org/t/huion-inspiroy-2-tablet-driver-in-julia/106752)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 16\
**Last updated:** [November 28, 2023, 2:50pm UTC](https://discourse.julialang.org/t/huion-inspiroy-2-tablet-driver-in-julia/106752 "2023-11-28T14:50:29Z")

</div>

I have just bought HUION Inspiroy 2 tablet. I have used pamac build huiontablet command to install the driver. I am able to write but its driver is not allowing to customize tablet keys in Manjaro Linux . Can i write i…

---

## [Extending Symbolics.jl, How to dispatch all functions to the underlying Num](https://discourse.julialang.org/t/extending-symbolics-jl-how-to-dispatch-all-functions-to-the-underlying-num/106845)

<div class="topic-metadata">

**Author:** [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)\
**Replies:** 2\
**Last updated:** [November 28, 2023, 1:34pm UTC](https://discourse.julialang.org/t/extending-symbolics-jl-how-to-dispatch-all-functions-to-the-underlying-num/106845 "2023-11-28T13:34:13Z")

</div>

Hello, I want to extend Symbolics.jl Variables to encode bounds and default value of parameters in the “variable”; Currently something like this: using Symbolics: \_parse\_vars, Num, @variables import SciMLBase: issymbol…

---

## [Random variables with different time scales in SDDP.jl](https://discourse.julialang.org/t/random-variables-with-different-time-scales-in-sddp-jl/106823)

<div class="topic-metadata">

**Author:** [@Sorooshsa](https://discourse.julialang.org/u/Sorooshsa)\
**Replies:** 3\
**Last updated:** [November 28, 2023, 3:46am UTC](https://discourse.julialang.org/t/random-variables-with-different-time-scales-in-sddp-jl/106823 "2023-11-28T03:46:25Z")

</div>

Hi everyone, Assume that we have a wind power production problem with two random variables: Demand Wind speed We aim to solve the problem for a year. There is a daily time scale for the state variables and controls. …

---

## [Setting the number of cores for a Gurobi license in JuMPg](https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809)

<div class="topic-metadata">

**Author:** [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Replies:** 3\
**Last updated:** [November 27, 2023, 5:46pm UTC](https://discourse.julialang.org/t/setting-the-number-of-cores-for-a-gurobi-license-in-jumpg/106809 "2023-11-27T17:46:33Z")

</div>

Any help with the following error would be much appreciated. I tried set\_optimizer\_attribute(model,"Threads",8), but still get the error… julia\> set\_optimizer(model,Gurobi.Optimizer) ERROR: Gurobi Error 10009: License i…

---

## [Makie text function no longer working](https://discourse.julialang.org/t/makie-text-function-no-longer-working/106812)

<div class="topic-metadata">

**Author:** [@p\_f](https://discourse.julialang.org/u/p_f)\
**Replies:** 2\
**Last updated:** [November 27, 2023, 5:29pm UTC](https://discourse.julialang.org/t/makie-text-function-no-longer-working/106812 "2023-11-27T17:29:26Z")

</div>

The text function from Makie is no longer working in an environment. I have updated GLMakie v0.9.1 and CairoMakie v0.11.1. It does work in my global environment using GLMakie v0.8.6 In the local environment where it do…

---

## [Using sparse matrix in CUDA kernel](https://discourse.julialang.org/t/using-sparse-matrix-in-cuda-kernel/106704)

<div class="topic-metadata">

**Author:** [@joel](https://discourse.julialang.org/u/joel)\
**Replies:** 1\
**Last updated:** [November 27, 2023, 5:05pm UTC](https://discourse.julialang.org/t/using-sparse-matrix-in-cuda-kernel/106704 "2023-11-27T17:05:24Z")

</div>

Hi, I’m trying to call nonzeros on a sparse matrix in my CUDA kernel but I’m getting a dynamic function invocation error: unsupported dynamic function invocation (call to nonzeros). Is this simply not supported or am I…

---

## [Error when implementing multidimensional kernel](https://discourse.julialang.org/t/error-when-implementing-multidimensional-kernel/106738)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 6\
**Last updated:** [November 27, 2023, 5:01pm UTC](https://discourse.julialang.org/t/error-when-implementing-multidimensional-kernel/106738 "2023-11-27T17:01:07Z")

</div>

Hello, I was implementing a very simple example of kernel programming with CUDA.jl. As an example, I took the addition of two matrices. The used code is the following: function \_add\_kernel!(C, A, B, m, n) index\_i =…

---

## [How to update Makie plot upon zooming?](https://discourse.julialang.org/t/how-to-update-makie-plot-upon-zooming/106788)

<div class="topic-metadata">

**Author:** [@Zetison](https://discourse.julialang.org/u/Zetison)\
**Replies:** 2\
**Last updated:** [November 27, 2023, 3:21pm UTC](https://discourse.julialang.org/t/how-to-update-makie-plot-upon-zooming/106788 "2023-11-27T15:21:40Z")

</div>

I’m trying to update the plot with higher resolution when zooming in a Makie plot. But it seems events(ax).scroll is not triggered. Is this a bug? The following MWE illustrates this issue: using GLMakie function updat…

---

## [Huge computation error in Float32?](https://discourse.julialang.org/t/huge-computation-error-in-float32/106746)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 12\
**Last updated:** [November 27, 2023, 2:37pm UTC](https://discourse.julialang.org/t/huge-computation-error-in-float32/106746 "2023-11-27T14:37:39Z")

</div>

the following shows that s1 was hugely mis-computed. It happens when doing calculations in Float32. Everything is fine in Float64. Random.seed!(1); n = 1000000; a = rand(Float32, n); b = rand(Float32, 100, n); s1 = 0f0;…

---

## [Indicator constraints Not working](https://discourse.julialang.org/t/indicator-constraints-not-working/106687)

<div class="topic-metadata">

**Author:** [@papar](https://discourse.julialang.org/u/papar)\
**Replies:** 6\
**Last updated:** [November 26, 2023, 11:27pm UTC](https://discourse.julialang.org/t/indicator-constraints-not-working/106687 "2023-11-26T23:27:43Z")

</div>

I’m encountering a problem with an optimization model in Julia where I need to enforce a specific condition using indicator variables. The goal is to ensure that for each time period ( t ) (from 2 to T), either ( y\_{i,t}…

---

## [Adding nodes to JADE.jl](https://discourse.julialang.org/t/adding-nodes-to-jade-jl/106774)

<div class="topic-metadata">

**Author:** [@Zainab](https://discourse.julialang.org/u/Zainab)\
**Replies:** 1\
**Last updated:** [November 26, 2023, 10:59pm UTC](https://discourse.julialang.org/t/adding-nodes-to-jade-jl/106774 "2023-11-26T22:59:07Z")

</div>

I am using JADE.jl which is one of the applications of the JuMP package. The results of my simulations vary too much. I was trying to add another node to the EMI version of JADE. Any help in this matter would be much ap…

---

## [Waveform relaxation and other parallel in time integrators](https://discourse.julialang.org/t/waveform-relaxation-and-other-parallel-in-time-integrators/106754)

<div class="topic-metadata">

**Author:** [@RahulManavalan](https://discourse.julialang.org/u/RahulManavalan)\
**Replies:** 2\
**Last updated:** [November 26, 2023, 9:10pm UTC](https://discourse.julialang.org/t/waveform-relaxation-and-other-parallel-in-time-integrators/106754 "2023-11-26T21:10:05Z")

</div>

I am looking into waveform relaxation for my project. Based on a cursory search, it seems to me that there is no registered package specifically for waveform relaxation. I did find an old issue Parallel ODE Solvers · Iss…

---

## [Modelling non-continuous piecewise linear functions](https://discourse.julialang.org/t/modelling-non-continuous-piecewise-linear-functions/106743)

<div class="topic-metadata">

**Author:** [@Galois](https://discourse.julialang.org/u/Galois)\
**Replies:** 4\
**Last updated:** [November 26, 2023, 8:07pm UTC](https://discourse.julialang.org/t/modelling-non-continuous-piecewise-linear-functions/106743 "2023-11-26T20:07:34Z")

</div>

I have an optimization problem where the objective (and some of the constraints) contain piecewise linear functions. The problem is relatively large and my attempts at solving it with pyomo and SCIP have not been very su…

---

## [How to model a multiobjective program](https://discourse.julialang.org/t/how-to-model-a-multiobjective-program/106561)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 5\
**Last updated:** [November 26, 2023, 7:16pm UTC](https://discourse.julialang.org/t/how-to-model-a-multiobjective-program/106561 "2023-11-26T19:16:08Z")

</div>

In the following code, of which I do not report a long series of complicated constraints, I would like to be able to specify in the objective function also the fact that, together with the Min, sum(x\[2:nr,:,"G/\\\\N"\]), I …

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

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