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
3
votes
2 answers

Julia JuMP Multiavariate ML Estimation

I am trying to perform a ML-Estimation of a normally distributed variable in a linear regression setting in Julia using JuMP and the NLopt solver. There exists a good working example here however if I try to estimate the regression parameters…
Vincent
  • 1,361
  • 2
  • 20
  • 33
3
votes
1 answer

Gurobi reports unbounded model despite mathematical impossibility

I'm using Julia's wonderful JuMP package to solve a linear program with Gurobi 6.0.4 as a solver. The objective function is a sum of decision variables, clearly defined as nonnegative, and the problem requires it to be minimized. For some reason,…
3
votes
2 answers

ERROR: `*` has no method matching *(::Variable)

I wrote the following code: using JuMP m = Model() const A = [ :a0 , :a1 , :a2 ] const T = [1:5] const U = [ :a0 => [9 9 9 9 999], :a1 => [11 11 11 11 11], :a2 => [1 1 1 1 1] ] @defVar(m, x[A,T],…
HAL9000
  • 3,562
  • 3
  • 25
  • 47
2
votes
1 answer

Julia JuMP: define a multidimensional variable when a dimension depends on other dimension

While I am defining a linear programming variables, I have to consider index_i = 1:3 index_j = J = [1:2, 1:5, 1:3] I want to define a variable x indexed with both i and j such that i is {1,2,3} and j is in {1,2} if i is 1, {1,2,3,4,5} if i is 2 and…
Ali Fradi
  • 110
  • 1
  • 10
2
votes
2 answers

How to determine Gurobi or solver version in JuMP

In Python, you can do: print(gurobipy.gurobi.version()) What is the equivalent for Julia and JuMP? I tried using Gurobi Gurobi.version() Without success. I am not trying to get Gurobi.jl package version which can be obtained with ] status Gurobi.
JKHA
  • 1,800
  • 11
  • 28
2
votes
1 answer

How to get an optimal solution using JuMP in julia?

I am using the JuMP package in julia with gurobi, and I can't seem to find any information online about how to print out an optimal solution. I can get the optimal objective value, but can't seem to find info on how to get an optimal solution. I…
graphtheory123
  • 311
  • 1
  • 6
2
votes
1 answer

Array of constraints Julia

I am trying to get an array of constraints, but I keep getting different kinds of errors, and I don't know what I'm doing wrong. data array is 77x9 (integer values) foods is a column vector of size 77x1, a variable of array type lower is a column…
2
votes
2 answers

How to set an upper bound on a JuMP minimizing model?

I would like to set an upper bound for my JuMP model. That is, given I am minimizing, all nodes and solutions that have a value higher than my upper bound should not be considered by JuMP. How should I do that? What could I have searched on JuMP's…
JKHA
  • 1,800
  • 11
  • 28
2
votes
1 answer

Julia JUMP Gurobi MIP - query and store best objective and bound at runtime

I am using Gurobi through the JuMP package in Julia to solve a mixed-integer program. I would like to obtain a graph like this one, where also a solution based on Python is provided (which was also addressed on Gurobi community form). However, I…
2
votes
1 answer

How do I set JuMP constraint equal to value in an array?

I'm having difficulty adding a constraint to my model Sum from i = 1 to N of X_ijk = W_jk for all values of j,k Heres what I've tried N = 10 W = [11 12 13 14 15 16 17; 9 14 21 21 12 15 16; 14 21 15 13 12 17 17] for i in 1:N …
lafinstack
  • 23
  • 3
2
votes
1 answer

Is it possible to reach value of@NLexpression?

How is it possible to attain the value of @NLexpression when the variables are fixed? In the following code variables have fixed but value of K1 has not been reached. using JuMP, Distributions,Juniper #-----Model…
Soma
  • 743
  • 6
  • 19
2
votes
1 answer

Dependent Arrays in Constraints JuMP

I want to code this constraint. d and a in the below code are the subsets of set S with the size of N. For example: (N=5, T=3, S=6), d=[1,2,2,3,1] (the elements of d are the first three digits of S and the size of d is N) and a=[6,4,5,6,4] (the…
Mahsa
  • 69
  • 1
2
votes
1 answer

Terminal process terminated with exit code 3221226356 (Julia and VS Code)

I am trying to run the code below in VS Code for Julia (or directly on Julia). It is a simple example that computes the Maximum Likelihood estimator of the mean and the variance of a normal distribution (source): Random.seed!(1234) n = 1_000 data…
Dan.phi
  • 75
  • 5
2
votes
1 answer

Extremely Sparse Integer Quadratic Programming

I am working on an optimization problem with a huge number of variables (upwards of hundreds of millions). Each of them should be a 0-1 binary variable. I can write it in the form (maximize x'Qx) where Q is positive semi-definite, and I am using…
2
votes
1 answer

LoadError: MethodError: no method matching mod(::VariableRef, ::Float64)

I'm new to Julia and JuMP, a library I'm going to use. Trying to define the following constraint, after having defined the variables, I receive an error: for r = 1:11 for d = 1:7 for s = 1:12 @constraint(model,…
DDGG82
  • 21
  • 1