Questions tagged [julia-jump]

JuMP is a domain-specific modeling language for mathematical programming embedded in the Julia language.

JuMP is a domain-specific modeling language for mathematical programming embedded in the Julia language.

https://github.com/JuliaOpt/JuMP.jl

362 questions
1
vote
0 answers

Using GAMS in Julia: GAMS executable not found in VScode (but can be found in terminal)

I'm trying to use GAMS in Julia for an optimization problem. I already installed GAMS and was able to use GAMS with python successfully in VScode. However, I kept getting "GAMS executable not found" in Julia. I'm using an M1 chip MacBook. So in…
user496181
  • 141
  • 7
1
vote
1 answer

My julia code using GLPK and JuMP taking 3 seconds for solving below julia code how can i make it time efficient or to do it in milliseconds

using JuMP using HiGHS a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25] b = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75] arraySize =…
1
vote
1 answer

Trouble with incorporating Xpress solver in Julia

I'm trying to use Xpress solver in Julia-Jump. However, I have trouble to make Julia find the location of my Xpress installation. I'm using a Mac. I downloaded the Xpress, obtained license, put the license in the right folder, added these following…
user496181
  • 141
  • 7
1
vote
2 answers

Why is this code outputting to the console when it shouldn't?

I'm trying to write a function that computes the value P(α, β) for a given adjacency matrix representing a graph G, and for two given vertices α and β of G. This is what I wrote : function P(g::Matrix{Int}, source::Int, target::Int)::Tuple{Int,…
1
vote
1 answer

Why CPLEX optimizer does npt stop after the limits?

I have a model that I am sure the body of the model won't take like to get build up and once I call JuMp.optimize it takes very long to stop. Although I set 1000 limits. model = Model(optimizer_with_attributes( CPLEX.Optimizer, …
Rainbow
  • 171
  • 9
1
vote
1 answer

Install a local package in the default environment with project.toml dependency

I want to install a local package (let's say foo.jl) in the default environment because I don't want to activate the package environment (Pkg.activate("\path\to\foo.jl")) every time. However, when I try to install the package by…
baNv
  • 493
  • 1
  • 4
  • 12
1
vote
1 answer

How to get a random choice under some constraints using JuMP in Julia

I know JuMP can solve a linear optimization problem under some constraints and maximize an objective function. Is it also possible to get a random choice under some constraints using JuMP? The pseudo-code can be given as: …
PokeLu
  • 767
  • 8
  • 17
1
vote
1 answer

Initializing filter in IPOPT

I am currently developing an algorithm where I am manually updating the barrier parameter when some conditions of mine are true, and than calling IPOPT optimize. Like this, set_optimizer_attributes(model, "mu_target" => my_μ, "mu_init" => my_μ, …
Annaquest
  • 131
  • 6
1
vote
1 answer

Using JuMP inside a Turing model

My question is: Can one use a JuMP optimization problem inside a Turing model? Below is a minimal example of the functionality that I'm trying to obtain: using Turing using JuMP import Ipopt function find_u(θ) # Describe the model model =…
1
vote
1 answer

Limit values ​of a variable in Julia JUMP

How can I write a constraint that indicates that my variable can only take values ​​that are multiples of 35?
jvm.97
  • 247
  • 1
  • 7
1
vote
1 answer

Can't solve my non linear optimization problem Julia

i'm trying to run the following a model in Julia JUMP, Optimizer Ipopt: J = 2 c = [10, 20] d = [10, -5] n = 120 s = [100, 50] e = [500, 300] model = Model() set_optimizer(model, Ipopt.Optimizer) …
jvm.97
  • 247
  • 1
  • 7
1
vote
1 answer

Is it possible to add LKH package to Julia in version 0.6.4.1?

To solve a tsp in my codes, I need to use LKH package. But I couldn't add the package to the Julia in 0.6.4.1 version. Unfortunately all my codes in this version. If you don't mind would you please help me? Thanks very much. The following link is…
Soma
  • 743
  • 6
  • 19
1
vote
1 answer

Conditioning and writing down an equation over a known set of combinations

I'm trying to write a constraint in the from of the following (also attached): sum([s,i], x[i,j,s,p] ) = sum([s,k], x[j,k,s,p] ) for all j in N\{0,n}, p in P I already have all possible combinations of (i,j,s,p) stored in a set Xs and X0nswhich a…
yaodao vang
  • 168
  • 10
1
vote
1 answer

Accessing the value of a variable while model is still optimizing?

I was wondering whether in JuMP it's possible to be aware of the value of variables while the model is still running?? I mean, suppose we have a set of binary variables x(i,j) i,j in [1,2,..5]. Is there any possiblity to know which variable get…
user9990604
1
vote
1 answer

/(::VariableRef,::QuadExpr) is not defined

I'm trying to solve a problem with JuMp and it's a non linear problem. So I have the error bellow : /(::VariableRef,::QuadExpr) is not defined. Are you trying to build a nonlinear problem? Make sure you use @NLconstraint/@NLobjective. And I'm using…