# \#examples

**URL:** https://discourse.julialang.org/tag/examples/54.md

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

---

## [A toy example triggering Gurobi's Warning: Model contains variables with very large bounds participating in product terms](https://discourse.julialang.org/t/a-toy-example-triggering-gurobis-warning-model-contains-variables-with-very-large-bounds-participating-in-product-terms/127295)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 13\
**Last updated:** [June 11, 2025, 7:32pm UTC](https://discourse.julialang.org/t/a-toy-example-triggering-gurobis-warning-model-contains-variables-with-very-large-bounds-participating-in-product-terms/127295 "2025-06-11T19:32:30Z")

</div>

It’s common to find Gurobi logging the following Warning in QCP Warning: Model contains variables with very large bounds participating in product terms. Presolve was not able to compute smaller bounds for these variabl…

---

## [Simplicial decomposition equals dual cutting plane---a toy example](https://discourse.julialang.org/t/simplicial-decomposition-equals-dual-cutting-plane-a-toy-example/129128)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 1\
**Last updated:** [May 19, 2025, 7:36pm UTC](https://discourse.julialang.org/t/simplicial-decomposition-equals-dual-cutting-plane-a-toy-example/129128 "2025-05-19T19:36:28Z")

</div>

Continuing the discussion from Seeking help on Branch and Price: I here furnish a toy example to help us fathoming that doing simplicial decomposition (or, column generation) in the primal space is equivalent to adding …

---

## [SLOW\_PROGRESS or NUMERICAL\_ERROR: a simple but nontrivial SDP example, solved with LP relaxation](https://discourse.julialang.org/t/slow-progress-or-numerical-error-a-simple-but-nontrivial-sdp-example-solved-with-lp-relaxation/127399)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 8\
**Last updated:** [May 11, 2025, 10:04am UTC](https://discourse.julialang.org/t/slow-progress-or-numerical-error-a-simple-but-nontrivial-sdp-example-solved-with-lp-relaxation/127399 "2025-05-11T10:04:38Z")

</div>

I wonder why mosek cannot solve this simple problem to optimality (it reports SLOW\_PROGRESS). x-ref \[docs\] improve the docstring for DUAL\_INFEASIBLE by odow · Pull Request #2701 · jump-dev/MathOptInterface.jl · GitHub i…

---

## [A code example on primal-dual algorithm for LP](https://discourse.julialang.org/t/a-code-example-on-primal-dual-algorithm-for-lp/128148)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 14\
**Last updated:** [April 26, 2025, 8:22am UTC](https://discourse.julialang.org/t/a-code-example-on-primal-dual-algorithm-for-lp/128148 "2025-04-26T08:22:49Z")

</div>

Here is a simplest julia realization of the barrier method on solving LP. The exemplary problem is Min x\[1\] + 2 \* x\[2\] + 3 \* x\[3\] s.t. sum(x) == 1 x .\>= 0 My code is function gapfun(x, z) return transpose(x) \* z…

---

## [I added 1 Million constraints to an LP unwittingly](https://discourse.julialang.org/t/i-added-1-million-constraints-to-an-lp-unwittingly/127668)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 36\
**Last updated:** [April 13, 2025, 8:59pm UTC](https://discourse.julialang.org/t/i-added-1-million-constraints-to-an-lp-unwittingly/127668 "2025-04-13T20:59:22Z")

</div>

This topic is sharing an experience, probably a noob has not seen before (me included). Put it simply, I’m solving a disjointed bilinear programming using RLT, and wasn’t realizing that the number of constraints will be…

---

## [Gurobi LP solver's cut-off behavior---an example](https://discourse.julialang.org/t/gurobi-lp-solvers-cut-off-behavior-an-example/127454)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 6\
**Last updated:** [March 28, 2025, 11:05pm UTC](https://discourse.julialang.org/t/gurobi-lp-solvers-cut-off-behavior-an-example/127454 "2025-03-28T23:05:03Z")

</div>

I find an interesting example about Gurobi’s LP solver. There are 2 linear constraints in my LP, named fixed and cut. The outcomes for the following 2 schemes are different: Add Both constraints, and solve only once A…

---

## [Reformulation Perspectification Technique: an example with a nonconvex feasible region](https://discourse.julialang.org/t/reformulation-perspectification-technique-an-example-with-a-nonconvex-feasible-region/126915)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 0\
**Last updated:** [March 13, 2025, 1:04pm UTC](https://discourse.julialang.org/t/reformulation-perspectification-technique-an-example-with-a-nonconvex-feasible-region/126915 "2025-03-13T13:04:53Z")

</div>

The nonconvex problem (NC) is \\min\_x \\{L\\,e^{x\_2} | L:= x\_1 + x\_2 + 1 \\ge 0, x\_1 x\_2 \\ge -1\\} It’s clear that the objective function is “linear times convex”, which is suitable for perspectification. And the feasible r…

---

## [\[ANN\] Multi Agent Trajectory Planning with RxInfer](https://discourse.julialang.org/t/ann-multi-agent-trajectory-planning-with-rxinfer/126416)

<div class="topic-metadata">

**Author:** [@bvdmitri](https://discourse.julialang.org/u/bvdmitri)\
**Replies:** 0\
**Last updated:** [February 28, 2025, 9:16am UTC](https://discourse.julialang.org/t/ann-multi-agent-trajectory-planning-with-rxinfer/126416 "2025-02-28T09:16:20Z")

</div>

A new advanced example that demonstrates multi-agent trajectory planning using probabilistic inference is now available in the https://examples.rxinfer.com repository. Example Overview This example shows how to formul…

---

## [Basic example for using Transformers.jl for sequential autoencoding](https://discourse.julialang.org/t/basic-example-for-using-transformers-jl-for-sequential-autoencoding/123663)

<div class="topic-metadata">

**Author:** [@spolk](https://discourse.julialang.org/u/spolk)\
**Replies:** 0\
**Last updated:** [December 10, 2024, 3:06pm UTC](https://discourse.julialang.org/t/basic-example-for-using-transformers-jl-for-sequential-autoencoding/123663 "2024-12-10T15:06:19Z")

</div>

I am interested in using Transformers.jl for sequence-to-sequence autoencoding and was hoping to get help solving a minimum working example building and training an appropriate transformer-based sequence-to-sequence aut…

---

## [Issue with FMU File Creation in FMIExport.jl: Empty Files and UndefVarError](https://discourse.julialang.org/t/issue-with-fmu-file-creation-in-fmiexport-jl-empty-files-and-undefvarerror/119949)

<div class="topic-metadata">

**Author:** [@CurioMath](https://discourse.julialang.org/u/CurioMath)\
**Replies:** 0\
**Last updated:** [September 27, 2024, 11:00am UTC](https://discourse.julialang.org/t/issue-with-fmu-file-creation-in-fmiexport-jl-empty-files-and-undefvarerror/119949 "2024-09-27T11:00:15Z")

</div>

I’ve been trying to run exact examples from the FMIExport.jl package but have been unable to generate the expected FMU file. Specifically, when working with the “BouncingBall” example, files are generated in the specifie…

---

## [Embedded julia in multithread c++: examples and doc](https://discourse.julialang.org/t/embedded-julia-in-multithread-c-examples-and-doc/119011)

<div class="topic-metadata">

**Author:** [@Sergey](https://discourse.julialang.org/u/Sergey)\
**Replies:** 4\
**Last updated:** [September 21, 2024, 2:18pm UTC](https://discourse.julialang.org/t/embedded-julia-in-multithread-c-examples-and-doc/119011 "2024-09-21T14:18:44Z")

</div>

Hi! Im searching for a scripting language which scripts could be run in different threads. No data share, only separate tasks. (with different math modules) Julia seems to be able to work this way, but i found non of …

---

## [Julia quirks (v. 1.9.0 and higher)](https://discourse.julialang.org/t/julia-quirks-v-1-9-0-and-higher/108098)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 3\
**Last updated:** [December 27, 2023, 3:23pm UTC](https://discourse.julialang.org/t/julia-quirks-v-1-9-0-and-higher/108098 "2023-12-27T15:23:27Z")

</div>

I’m a huge fan of Julia compiler, even if my knowledge of it is very limited. As you should expected with such complicated program it has few quirks that we should be aware of. Since I’m not advanced Julia programmer, I …

---

## [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 …

---

## [Lux.jl implementation of denoising diffusion model](https://discourse.julialang.org/t/lux-jl-implementation-of-denoising-diffusion-model/90275)

<div class="topic-metadata">

**Author:** [@Keisuke\_Yanagi](https://discourse.julialang.org/u/Keisuke_Yanagi)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 11:05pm UTC](https://discourse.julialang.org/t/lux-jl-implementation-of-denoising-diffusion-model/90275 "2022-11-15T23:05:30Z")

</div>

Hi Using Lux.jl, I’ve implemented denoising diffusion implicit model for image generation from noises. Question: is there any place for me to contribute to enhance the Lux.jl examples? (Just making PR on the repo?)

---

## [Parameter estimation fails for Modelingtoolkit model specification but works fine for DifferentialEquations.jl specification](https://discourse.julialang.org/t/parameter-estimation-fails-for-modelingtoolkit-model-specification-but-works-fine-for-differentialequations-jl-specification/83444)

<div class="topic-metadata">

**Author:** [@Curio\_math](https://discourse.julialang.org/u/Curio_math)\
**Replies:** 6\
**Last updated:** [June 28, 2022, 6:55am UTC](https://discourse.julialang.org/t/parameter-estimation-fails-for-modelingtoolkit-model-specification-but-works-fine-for-differentialequations-jl-specification/83444 "2022-06-28T06:55:29Z")

</div>

Hi, I have confronted with something amazing ! I was trying parameter estimation on Lotka-volterra example in DiffeqParamEstim which uses DifferentialEquations.jl model specification and parameter estimation using Least…

---

## [Issue with example in DiffEqParamEstim.jl](https://discourse.julialang.org/t/issue-with-example-in-diffeqparamestim-jl/83067)

<div class="topic-metadata">

**Author:** [@Curio\_math](https://discourse.julialang.org/u/Curio_math)\
**Replies:** 2\
**Last updated:** [June 21, 2022, 10:03am UTC](https://discourse.julialang.org/t/issue-with-example-in-diffeqparamestim-jl/83067 "2022-06-21T10:03:53Z")

</div>

Hi, I am excited to try parameter estimation on my model using DiffEqParamEstim.jl package. I thought of trying out some examples in the documentation and then choose the best method for my model. But I found some of th…

---

## [\[ANN\] Czoo.jl - project to provide examples of using ccall with Julia and C Code examples - also call for contributors](https://discourse.julialang.org/t/ann-czoo-jl-project-to-provide-examples-of-using-ccall-with-julia-and-c-code-examples-also-call-for-contributors/75034)

<div class="topic-metadata">

**Author:** [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Replies:** 4\
**Last updated:** [January 26, 2022, 9:57am UTC](https://discourse.julialang.org/t/ann-czoo-jl-project-to-provide-examples-of-using-ccall-with-julia-and-c-code-examples-also-call-for-contributors/75034 "2022-01-26T09:57:02Z")

</div>

https://github.com/lawless-m/Czoo.jl The other day I had some questions about using CCALL. While the Julia code was MWE the C code needed 25Gb of data ! As a beginner to interfacing with C libraries I thought I would b…

---

## [System modeling workflow example](https://discourse.julialang.org/t/system-modeling-workflow-example/67612)

<div class="topic-metadata">

**Author:** [@holmesthinking](https://discourse.julialang.org/u/holmesthinking)\
**Replies:** 5\
**Last updated:** [October 5, 2021, 7:51pm UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612 "2021-10-05T19:51:26Z")

</div>

Hi, I have some experience in Simulink but I want to do stuff in Julia (ModelingToolkit). I’m searching for examples of simple system models for example two water tanks and pump or something similar in complexity. I wo…

---

## [JuMP Space Shuttle example failing](https://discourse.julialang.org/t/jump-space-shuttle-example-failing/58971)

<div class="topic-metadata">

**Author:** [@sinom](https://discourse.julialang.org/u/sinom)\
**Replies:** 1\
**Last updated:** [April 10, 2021, 9:51am UTC](https://discourse.julialang.org/t/jump-space-shuttle-example-failing/58971 "2021-04-10T09:51:12Z")

</div>

Hello all, first let me say I’m just starting out with Julia and I’m already super impressed with what can be achieved. It’s really such a well designed language as far as I can tell. I’m still using mostly Python for …

---

## [Interesting NASA "Language-Comparison" repository](https://discourse.julialang.org/t/interesting-nasa-language-comparison-repository/31356)

<div class="topic-metadata">

**Author:** [@GregVernon](https://discourse.julialang.org/u/GregVernon)\
**Replies:** 29\
**Last updated:** [February 20, 2021, 9:30pm UTC](https://discourse.julialang.org/t/interesting-nasa-language-comparison-repository/31356 "2021-02-20T21:30:00Z")

</div>

I came across this GitHub repository the other day, discovered it within the troves of NASA’s software catalog – the repository’s entry on the catalog is here. I thought this might be useful for Julia novices. Basic C…

---

## [Example of CDDLib usage: H-representation and V-representation](https://discourse.julialang.org/t/example-of-cddlib-usage-h-representation-and-v-representation/51980)

<div class="topic-metadata">

**Author:** [@stla](https://discourse.julialang.org/u/stla)\
**Replies:** 2\
**Last updated:** [December 22, 2020, 6:15pm UTC](https://discourse.julialang.org/t/example-of-cddlib-usage-h-representation-and-v-representation/51980 "2020-12-22T18:15:14Z")

</div>

Hello, I’m trying to use CDDLib but I’m lost. Given a set of inequalities represented as a matrix and a vector, how to get the H-representation of the corresponding polyhedron? Then, how to get its V-representation, an…

---

## [Build efficient code from scene description (tree of 3d objects and transformations)](https://discourse.julialang.org/t/build-efficient-code-from-scene-description-tree-of-3d-objects-and-transformations/23860)

<div class="topic-metadata">

**Author:** [@freemint](https://discourse.julialang.org/u/freemint)\
**Replies:** 9\
**Last updated:** [May 6, 2019, 3:15pm UTC](https://discourse.julialang.org/t/build-efficient-code-from-scene-description-tree-of-3d-objects-and-transformations/23860 "2019-05-06T15:15:30Z")

</div>

Hello, i am currently trying to implement a Sphere-Tracing renderer. This is my first Julia project. So i lack on certain aspects like meta programming which is where i need your input. It uses a cool concept called Si…

---

## [UNICODE string from C++ to Julia and vice versa](https://discourse.julialang.org/t/unicode-string-from-c-to-julia-and-vice-versa/3272)

<div class="topic-metadata">

**Author:** [@Martin\_Florek](https://discourse.julialang.org/u/Martin_Florek)\
**Replies:** 20\
**Last updated:** [April 26, 2017, 8:03am UTC](https://discourse.julialang.org/t/unicode-string-from-c-to-julia-and-vice-versa/3272 "2017-04-26T08:03:14Z")

</div>

I’m using embedding Julia in C++ project. Now I need to get any unicode string to Julia, e.g… std::wstring test = L"šČô\_φ\_привет\_일보"; Tips & hints or a model example for solutions, please. Thanks.

---

## [Figuring out behaviour of expression interpolation](https://discourse.julialang.org/t/figuring-out-behaviour-of-expression-interpolation/2357)

<div class="topic-metadata">

**Author:** [@Ward9250](https://discourse.julialang.org/u/Ward9250)\
**Replies:** 3\
**Last updated:** [February 28, 2017, 11:36am UTC](https://discourse.julialang.org/t/figuring-out-behaviour-of-expression-interpolation/2357 "2017-02-28T11:36:19Z")

</div>

I have a simple function that generates code, for a generated function I want to make: function issite\_gen(operation, N) ex = :($operation(arr\[1\])) for i in 2:N ex = :($ex | $operation(arr\[$i\])) end …
