# Specific Domains

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

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

**Page:** 294

---

## [Defining constraint for renewable generation with availability factors](https://discourse.julialang.org/t/defining-constraint-for-renewable-generation-with-availability-factors/78147)

<div class="topic-metadata">

**Author:** [@mbah](https://discourse.julialang.org/u/mbah)\
**Replies:** 10\
**Last updated:** [March 31, 2022, 4:16am UTC](https://discourse.julialang.org/t/defining-constraint-for-renewable-generation-with-availability-factors/78147 "2022-03-31T04:16:11Z")

</div>

Hello, I am trying to code up a straightforward constraint for renewable generation (wind, solar etc…) without much success. As an example, the general formulation for a wind generation constraint is as follows: My…

---

## [What happened to composition function of BioSequences?](https://discourse.julialang.org/t/what-happened-to-composition-function-of-biosequences/78759)

<div class="topic-metadata">

**Author:** [@kwicher](https://discourse.julialang.org/u/kwicher)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 10:45pm UTC](https://discourse.julialang.org/t/what-happened-to-composition-function-of-biosequences/78759 "2022-03-30T22:45:42Z")

</div>

I am trying to implement an older package that uses BioSequences, especially the composition function. This function is however gone from the newest BioSequences, so e everything breaks. Has composition been replaced by…

---

## [Periodic boundary conditions for PDE system using MethodOfLines.jl](https://discourse.julialang.org/t/periodic-boundary-conditions-for-pde-system-using-methodoflines-jl/78761)

<div class="topic-metadata">

**Author:** [@Wayne\_Wang](https://discourse.julialang.org/u/Wayne_Wang)\
**Replies:** 7\
**Last updated:** [March 30, 2022, 7:19pm UTC](https://discourse.julialang.org/t/periodic-boundary-conditions-for-pde-system-using-methodoflines-jl/78761 "2022-03-30T19:19:23Z")

</div>

Hi all! I’m working with ModellingToolkit and DiffEqOperators to solve a set of PDEs. In particular, I wanted to test out a 1D Kuramoto-Sivashinsky type of equation with periodic boundary conditions, but I’m having some …

---

## [Understanding an error in a reverse call of DiffEqFlux.sciml\_train](https://discourse.julialang.org/t/understanding-an-error-in-a-reverse-call-of-diffeqflux-sciml-train/78680)

<div class="topic-metadata">

**Author:** [@linkz](https://discourse.julialang.org/u/linkz)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 4:40pm UTC](https://discourse.julialang.org/t/understanding-an-error-in-a-reverse-call-of-diffeqflux-sciml-train/78680 "2022-03-30T16:40:43Z")

</div>

I am trying to train a custom, quite complex model, am getting the following error during the reverse call to calculate gradients (using DiffEqFlux.sciml\_train for optimization) and I struggle to understand what it means…

---

## [Koopman inference fails for simple example while SINDy works fine](https://discourse.julialang.org/t/koopman-inference-fails-for-simple-example-while-sindy-works-fine/78706)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 1\
**Last updated:** [March 30, 2022, 11:00am UTC](https://discourse.julialang.org/t/koopman-inference-fails-for-simple-example-while-sindy-works-fine/78706 "2022-03-30T11:00:17Z")

</div>

Hi All, I’m trying to put together a DataDrivenDiffEq.jl example for my demo system of an SIR epidemiological model. using OrdinaryDiffEq using DataDrivenDiffEq using ModelingToolkit function sir\_ode(u,p,t) (s,i,r…

---

## [Reading xpress problem from .lp file into Julia](https://discourse.julialang.org/t/reading-xpress-problem-from-lp-file-into-julia/78664)

<div class="topic-metadata">

**Author:** [@Marie](https://discourse.julialang.org/u/Marie)\
**Replies:** 4\
**Last updated:** [March 29, 2022, 7:07pm UTC](https://discourse.julialang.org/t/reading-xpress-problem-from-lp-file-into-julia/78664 "2022-03-29T19:07:26Z")

</div>

I’m reading a problem from .lp into Julia. I’ve tried various xpress.optimizer params - the problem is infeasible. The reason is b/c the model isn’t read exactly as it’s defined in the .lp file - some constraints get mod…

---

## [JuMP Model Syntax](https://discourse.julialang.org/t/jump-model-syntax/78668)

<div class="topic-metadata">

**Author:** [@iAnkiit](https://discourse.julialang.org/u/iAnkiit)\
**Replies:** 1\
**Last updated:** [March 29, 2022, 1:50pm UTC](https://discourse.julialang.org/t/jump-model-syntax/78668 "2022-03-29T13:50:03Z")

</div>

Do we need to write expression with jump macros only ? like @variable, @constraint, @Objective Or we can write it as plain text like model = ax+by^2 If yes, can we write in combination Example : model = Model(Optimize…

---

## [Poisson Equation example of NeuralPDE.jl throws hash error](https://discourse.julialang.org/t/poisson-equation-example-of-neuralpde-jl-throws-hash-error/78071)

<div class="topic-metadata">

**Author:** [@FrootLoops](https://discourse.julialang.org/u/FrootLoops)\
**Replies:** 17\
**Last updated:** [March 29, 2022, 1:24pm UTC](https://discourse.julialang.org/t/poisson-equation-example-of-neuralpde-jl-throws-hash-error/78071 "2022-03-29T13:24:21Z")

</div>

I am new to the PINN topic and therefore I just wanted to study through the tutorial of NeuralPDE.jl. I tried several examples from the tutorial. Sadly none of it works and I get the same error for each example. I am us…

---

## [Tutor for Julia](https://discourse.julialang.org/t/tutor-for-julia/78610)

<div class="topic-metadata">

**Author:** [@iAnkiit](https://discourse.julialang.org/u/iAnkiit)\
**Replies:** 4\
**Last updated:** [March 29, 2022, 1:22pm UTC](https://discourse.julialang.org/t/tutor-for-julia/78610 "2022-03-29T13:22:14Z")

</div>

I am learning Julia for my masters project work. There is a model written in Julia which I am referring. Though, I have cleared my basics in Julia, there is alot in JuMP , which I am unable to decode. I was thinking, if…

---

## [Empirical density contours from an MCMC sample](https://discourse.julialang.org/t/empirical-density-contours-from-an-mcmc-sample/78629)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [March 29, 2022, 11:52am UTC](https://discourse.julialang.org/t/empirical-density-contours-from-an-mcmc-sample/78629 "2022-03-29T11:52:42Z")

</div>

I have a recollection of seeing two-dimensional empirical density contours from an MCMC (Markov-chain Monte Carlo) sample but I didn’t record the information on the package. Was I remembering correctly and, if so, could…

---

## [Diffusion by using CUDA.jl, DifferentialEquations and DiffEqGPU](https://discourse.julialang.org/t/diffusion-by-using-cuda-jl-differentialequations-and-diffeqgpu/78310)

<div class="topic-metadata">

**Author:** [@eslam\_abdelfatah](https://discourse.julialang.org/u/eslam_abdelfatah)\
**Replies:** 6\
**Last updated:** [March 29, 2022, 10:44am UTC](https://discourse.julialang.org/t/diffusion-by-using-cuda-jl-differentialequations-and-diffeqgpu/78310 "2022-03-29T10:44:42Z")

</div>

I want to apply a difusion for a two- dimensional plat using the DiffEqGPU package. when I used the Euler method as a for loop it worked. My code looks like this module Playground using CUDA using CairoMakie using C…

---

## [In function runs really slow](https://discourse.julialang.org/t/in-function-runs-really-slow/78661)

<div class="topic-metadata">

**Author:** [@Frankiewaang](https://discourse.julialang.org/u/Frankiewaang)\
**Replies:** 3\
**Last updated:** [March 29, 2022, 9:35am UTC](https://discourse.julialang.org/t/in-function-runs-really-slow/78661 "2022-03-29T09:35:32Z")

</div>

I got 2 DataFrames tran and articles and I want to filter those rows in tran that tran.article\_id in articles.article\_id, the function I use is: trans = transactions\[in.(transactions.article\_id, Ref(articles.article\_id…

---

## [Solving a symmetric block tridiagonal system](https://discourse.julialang.org/t/solving-a-symmetric-block-tridiagonal-system/78623)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 3\
**Last updated:** [March 29, 2022, 9:13am UTC](https://discourse.julialang.org/t/solving-a-symmetric-block-tridiagonal-system/78623 "2022-03-29T09:13:30Z")

</div>

I have a linear system in a symmetric block tridiagonal form, where each diagonal block is symmetric and invertible, but may be of varying sizes. There is no other structural advantage to make use of as far as I can see …

---

## [SQLite: query with duplicate column names |\> DataFrame](https://discourse.julialang.org/t/sqlite-query-with-duplicate-column-names-dataframe/64518)

<div class="topic-metadata">

**Author:** [@viraltux](https://discourse.julialang.org/u/viraltux)\
**Replies:** 15\
**Last updated:** [March 29, 2022, 5:36am UTC](https://discourse.julialang.org/t/sqlite-query-with-duplicate-column-names-dataframe/64518 "2022-03-29T05:36:08Z")

</div>

Hi guys, The following query with duplicate column names works however when converting to a DataFrame I have a "not unique" error. using SQLite db = SQLite.DB(); Q = q -\> DBInterface.execute(db, q); DataFrame(rand(10,…

---

## [Make - How to change the color of axes & grids in LScene?](https://discourse.julialang.org/t/make-how-to-change-the-color-of-axes-grids-in-lscene/78641)

<div class="topic-metadata">

**Author:** [@Bob\_Bass](https://discourse.julialang.org/u/Bob_Bass)\
**Replies:** 0\
**Last updated:** [March 29, 2022, 12:24am UTC](https://discourse.julialang.org/t/make-how-to-change-the-color-of-axes-grids-in-lscene/78641 "2022-03-29T00:24:27Z")

</div>

Hi. I prefer a grey or darker background for my plots, but then I can’t see the grid lines or axes. How do I change the color of the grids/axes, if possible? I am using the LScene function rather than the Axis3 functi…

---

## [Makie - How to get a (single) random color for a line/scatter/segment, etc?](https://discourse.julialang.org/t/makie-how-to-get-a-single-random-color-for-a-line-scatter-segment-etc/78634)

<div class="topic-metadata">

**Author:** [@Bob\_Bass](https://discourse.julialang.org/u/Bob_Bass)\
**Replies:** 2\
**Last updated:** [March 28, 2022, 8:06pm UTC](https://discourse.julialang.org/t/makie-how-to-get-a-single-random-color-for-a-line-scatter-segment-etc/78634 "2022-03-28T20:06:16Z")

</div>

Makie.jl question: This code puts a red dot in a 2d axes scatter(\[1\],\[2\], color=:red) but I want to have a dot with a random color. The docs say that I can pass a Real number to the color attribute, but when I do th…

---

## [Optim.jl single iteration](https://discourse.julialang.org/t/optim-jl-single-iteration/78619)

<div class="topic-metadata">

**Author:** [@vmmhep](https://discourse.julialang.org/u/vmmhep)\
**Replies:** 4\
**Last updated:** [March 28, 2022, 5:57pm UTC](https://discourse.julialang.org/t/optim-jl-single-iteration/78619 "2022-03-28T17:57:01Z")

</div>

I can’t seem to find this anywhere and I’m sorry in advance if my trivial question is indeed elsewhere… I have a differentiable periodic function: function fitness(x::Vector) LV = ones(105) QV = ones(105,10) …

---

## [Julia 1.9.0-DEV.239 with CUDA CuArray](https://discourse.julialang.org/t/julia-1-9-0-dev-239-with-cuda-cuarray/78350)

<div class="topic-metadata">

**Author:** [@sjinwsu](https://discourse.julialang.org/u/sjinwsu)\
**Replies:** 12\
**Last updated:** [March 28, 2022, 2:37pm UTC](https://discourse.julialang.org/t/julia-1-9-0-dev-239-with-cuda-cuarray/78350 "2022-03-28T14:37:09Z")

</div>

Hello, I would like to ask if the following error regarding CuArray is Julia version specific. I was able to run the following basic CuArray test with Julia 1.8.0-Dev.1370, but when I tried with the latest release of Jul…

---

## [CUDA.jl - Variable Sized Local Arrays Inside CUDA Kernel](https://discourse.julialang.org/t/cuda-jl-variable-sized-local-arrays-inside-cuda-kernel/78567)

<div class="topic-metadata">

**Author:** [@moukann](https://discourse.julialang.org/u/moukann)\
**Replies:** 2\
**Last updated:** [March 28, 2022, 11:13am UTC](https://discourse.julialang.org/t/cuda-jl-variable-sized-local-arrays-inside-cuda-kernel/78567 "2022-03-28T11:13:53Z")

</div>

Hello all, I am trying to parallelize a computational mechanics code. I encountered a problem which I cannot solve. I am trying to allocate variable sized arrays for every thread. However, for a particular thread, the s…

---

## [CUDA.jl - Sub-Vector Indexing Problem Inside CUDA Kernel](https://discourse.julialang.org/t/cuda-jl-sub-vector-indexing-problem-inside-cuda-kernel/78526)

<div class="topic-metadata">

**Author:** [@moukann](https://discourse.julialang.org/u/moukann)\
**Replies:** 2\
**Last updated:** [March 28, 2022, 11:13am UTC](https://discourse.julialang.org/t/cuda-jl-sub-vector-indexing-problem-inside-cuda-kernel/78526 "2022-03-28T11:13:18Z")

</div>

Hello all, I’ve been experimenting with CUDA Julia. Formerly, I used CUDA Python but it was so limited and restrictive. So I migrated to Julia. Thanks for the great effort and flexible framework to everybody working on …

---

## [BilevelJump installation issue](https://discourse.julialang.org/t/bileveljump-installation-issue/78605)

<div class="topic-metadata">

**Author:** [@Fabrizio](https://discourse.julialang.org/u/Fabrizio)\
**Replies:** 4\
**Last updated:** [March 28, 2022, 10:43am UTC](https://discourse.julialang.org/t/bileveljump-installation-issue/78605 "2022-03-28T10:43:55Z")

</div>

Dear all, i am using Jump JuMP v0.22.1 https://github.com/jump-dev/JuMP.jl.git#master with MathOptInterface v0.10.5. Trying to installing BilevelJump give to me this issue: ERROR: Unsatisfiable requirements detected for…

---

## [Julia multithreading from pycall - possible to overcome?](https://discourse.julialang.org/t/julia-multithreading-from-pycall-possible-to-overcome/78538)

<div class="topic-metadata">

**Author:** [@Fatafim](https://discourse.julialang.org/u/Fatafim)\
**Replies:** 3\
**Last updated:** [March 28, 2022, 9:05am UTC](https://discourse.julialang.org/t/julia-multithreading-from-pycall-possible-to-overcome/78538 "2022-03-28T09:05:09Z")

</div>

Say I have a jupyter notebook: %%julia using Pkg Pkg.add(“DecisionTree”) using DecisionTree X = Vector(\[1.1,2.2,3.3\]) Y = Vector(\[1.1,2.2,3.3\]) X = reshape(X, size(X)) X = Float32.(X) Y = Float32.(Y) print(typ…

---

## [DifferentialEquations.jl treat complex different than float](https://discourse.julialang.org/t/differentialequations-jl-treat-complex-different-than-float/78412)

<div class="topic-metadata">

**Author:** [@Elyco](https://discourse.julialang.org/u/Elyco)\
**Replies:** 7\
**Last updated:** [March 28, 2022, 7:06am UTC](https://discourse.julialang.org/t/differentialequations-jl-treat-complex-different-than-float/78412 "2022-03-28T07:06:17Z")

</div>

Hi, I encountered something weird when I was trying to solve a system of ODEs in two equivalent (if I don’t miss something very basic) ways. Here is two ODE, that should be mathematically the same C = -0.01+2im functi…

---

## [Make a Compose.jl composition square](https://discourse.julialang.org/t/make-a-compose-jl-composition-square/78585)

<div class="topic-metadata">

**Author:** [@theta](https://discourse.julialang.org/u/theta)\
**Replies:** 4\
**Last updated:** [March 28, 2022, 5:14am UTC](https://discourse.julialang.org/t/make-a-compose-jl-composition-square/78585 "2022-03-28T05:14:37Z")

</div>

I’m messing with Compose.jl, and I noticed that the “canvas” isn’t square like I would expect. Does anyone know how to create an explicitly square canvas? I’m using ElectronDisplay to view the SVG output from Compose, bu…

---

## [How to visualise the structure of the decision tree built by MLJ?](https://discourse.julialang.org/t/how-to-visualise-the-structure-of-the-decision-tree-built-by-mlj/30946)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 9\
**Last updated:** [March 27, 2022, 6:42pm UTC](https://discourse.julialang.org/t/how-to-visualise-the-structure-of-the-decision-tree-built-by-mlj/30946 "2022-03-27T18:42:08Z")

</div>

using RDatasets, DataFrames iris = dataset("datasets", "iris") using MLJ # using the MLJ framework using MLJModels # loads the modesl MLJ can use e.g. linear regression, decision tree tree\_model = @load DecisionTreeClas…

---

## [Flux vs Knet for research and production](https://discourse.julialang.org/t/flux-vs-knet-for-research-and-production/78449)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 8\
**Last updated:** [March 27, 2022, 4:01pm UTC](https://discourse.julialang.org/t/flux-vs-knet-for-research-and-production/78449 "2022-03-27T16:01:26Z")

</div>

I’m new to AI in julia, and to AI in general, but still want to make the best decision or at least know the reason for choice. What are the advantages and disadvantages of both packages for production and also research. …

---

## [Modify colorbar in heatmap](https://discourse.julialang.org/t/modify-colorbar-in-heatmap/78544)

<div class="topic-metadata">

**Author:** [@RickDW](https://discourse.julialang.org/u/RickDW)\
**Replies:** 2\
**Last updated:** [March 27, 2022, 3:02pm UTC](https://discourse.julialang.org/t/modify-colorbar-in-heatmap/78544 "2022-03-27T15:02:58Z")

</div>

Hi, I’m trying to create an animation from a sequence of heatmaps, and I want to keep the upper and lower limits of the colorbar steady. I.e. if a value of say 0.5 is plotted using pure white in one frame I want 0.5 to m…

---

## [Merge where date ranges match](https://discourse.julialang.org/t/merge-where-date-ranges-match/78509)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 4\
**Last updated:** [March 27, 2022, 11:15am UTC](https://discourse.julialang.org/t/merge-where-date-ranges-match/78509 "2022-03-27T11:15:30Z")

</div>

“I have two tables that need to be combined. One table contains basic information about deals and another table information about the associated products.Each row consists of a state a deal was in from Start Date Deal to…

---

## [Organize the output of a mathematical model](https://discourse.julialang.org/t/organize-the-output-of-a-mathematical-model/78378)

<div class="topic-metadata">

**Author:** [@haniaitizem](https://discourse.julialang.org/u/haniaitizem)\
**Replies:** 4\
**Last updated:** [March 26, 2022, 5:28pm UTC](https://discourse.julialang.org/t/organize-the-output-of-a-mathematical-model/78378 "2022-03-26T17:28:27Z")

</div>

Hello I have find a matrix q\[j,i,k\] at the end of my work, it represent the quantity of product k that should be ordered by client i from the plant j , I want to organize this output in a table in the row I find the plan…

---

## [Jump using \`max(x...)\` where x is a matrix?](https://discourse.julialang.org/t/jump-using-max-x-where-x-is-a-matrix/78451)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 6\
**Last updated:** [March 26, 2022, 4:35pm UTC](https://discourse.julialang.org/t/jump-using-max-x-where-x-is-a-matrix/78451 "2022-03-26T16:35:01Z")

</div>

I need to revive a previously asked question. I have a problem that involves evaluating the exp function over an array of variables and I want to avoid huge values by centering those variables before appplying exp. I get…

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

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