# How to set the random seed using GLPK.jl?

**URL:** <https://discourse.julialang.org/t/how-to-set-the-random-seed-using-glpk-jl/109231>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, glpk\
**Created:** [January 25, 2024, 2:33am UTC](https://discourse.julialang.org/t/how-to-set-the-random-seed-using-glpk-jl/109231 "2024-01-25T02:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [January 25, 2024, 2:33am UTC](https://discourse.julialang.org/t/how-to-set-the-random-seed-using-glpk-jl/109231/1 "2024-01-25T02:33:57Z")

</div>

I have asked my students to set a fixed random seed in their experiments with a formulation implementation. Many have used Julia/JuMP as I have incentivized them to do so. However, I was not able to tell them how to set the random seed using Julia/JuMP/GLPK. GLPK has a command-line argument (`--seed`) for this, but the documentation does not make clear if there is a parameter that you can pass to JuMP that will translate in the equivalent of that flag.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [January 25, 2024, 2:40am UTC](https://discourse.julialang.org/t/how-to-set-the-random-seed-using-glpk-jl/109231/2 "2024-01-25T02:40:27Z")

</div>

I do not know if there its a way to do this with GLPK.

Does `--seed` actually do anything? The documentation implies that this only applies to models in the GNU MathProg modeling format.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/5/f5afa25a2cce92a4ffb9d248449936785cfe19b4.png)

Tell them to use HiGHS instead:  
[https://ergo-code.github.io/HiGHS/dev/options/definitions/#random\_seed](https://ergo-code.github.io/HiGHS/dev/options/definitions/#random_seed)

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [January 25, 2024, 2:40pm UTC](https://discourse.julialang.org/t/how-to-set-the-random-seed-using-glpk-jl/109231/3 "2024-01-25T14:40:06Z")

</div>

Thank you very much @odow. It seems like GLPK is an outdated choice right now.
