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
2
votes
1 answer

Julia - Understanding JuMP Gurobi outputs

I am often using Gurobi with JuMP and I noticed that there are still parts of its outputs that I don't understand. Unless it is documented somewhere and the link would be most welcome, could you help understand the following? :) Found heuristic…
JKHA
  • 1,800
  • 11
  • 28
2
votes
1 answer

Julia : use dictionary value in objective function?

I’m trying to be able to use values put in a Dictionary to weight the variables that are going to be minimized in a JuMP objective function. The dictionnary is implemented as follow : Dicopond = Dict(0=> 1, 1 => 2, 2 => 4, 3 => 8, 4 => 16, 5 => 32,…
rox
  • 21
  • 2
2
votes
1 answer

Julia JuMP StackOverflow Error when defining a constraint on linear matrix inequalities

I was inspired by this post to switch from MATLAB's LMI toolbox to a Julia implementation and I tried to adapt the suggested script in the post to a problem I am trying to solve. However, I have failed to do this, consistently causing Julia to crash…
Will_sharp
  • 55
  • 1
  • 4
2
votes
1 answer

How to use VariableRef as indices in Julia JuMP

In Julia when I do: model = Model(); set_optimizer(model, Cbc.Optimizer); N=11; model = Model(); set_optimizer(model, Cbc.Optimizer); @variable(model, X[1:N,1:N,1:N], Bin); @variable(model, 1<=K<=10, Int); for k in K @constraint(model,…
Ali Zoghi
  • 21
  • 1
2
votes
1 answer

Julia JuMP - `max` in the goal function Error: No method matching isless

There is a error in my code, can anyone help me please? My code: function funP(u, τ::Float64) w = (τ*max(u, 0)) + ((1-τ)*max(-u, 0)) return w end τ = 0.2 modelquant = Model(with_optimizer(OSQP.Optimizer)) @variable(modelquant,…
2
votes
2 answers

Compact way to save JuMP optimization results in DataFrames

I would like to save all my variables and dual variables of my finished lp-optimization in an efficient manner. My current solution works, but is neither elegant nor suited for larger optimization programs with many variables and constraints because…
2
votes
1 answer

What do multiple objective functions mean in Julia jump?

I have multiple objective functions for the same model in Julia JuMP created using an @optimize in a for loop. What does it mean to have multiple objective functions in Julia? What objective is minimized, or is it that all the objectives are…
zendevil
  • 899
  • 4
  • 13
  • 26
2
votes
1 answer

Julia: How to introduce binary integers for mixed integers optimization problems with JuMP?

Problem description I am trying to do a mixed-integer optimization for a "Unit Commitment" problem in Julia with Jump. But JuMP expects my introduction of the unit activation variable, x[1:N], to be a number and not a variable. However, the unit…
DisabledWhale
  • 771
  • 1
  • 7
  • 15
2
votes
2 answers

Loop over subset of variables in JuMP constraint

I am trying to implement an arc-flow problem where I have a set of arcs in an array. Each arc is a custom data structure composed of from/to nodes. I want to add a constraint where I only include the arcs that go from a specific node (1), something…
Berni
  • 93
  • 10
2
votes
2 answers

LoadError:MethodError despite (seemingly) using working code

Hi guys programming newbie here I am trying to solve a linear programming problem using Julia and GLPK, with emphasis on trying because so far I have been getting errors no matter what I try. This is the code: using JuMP, GLPK m =…
frivo9
  • 23
  • 4
2
votes
2 answers

Error thrown when adding vectorised constraints to JuMP

I am trying to reproduce this model - the code in the tutorial is for an old version of JuMP/Julia and does not run. However, when I try to add the constraint: @constraint(model, con, c[i = 1:N] .== ( ((1 - τ) * (1 - l[i]) .* w[i]) + e[i])) I get…
2
votes
1 answer

what is NonlinearConstraintIndex in julia?

I tired to change right hand of non-linear constraint in the following code. although kind people helped me a lot, I couldn't to find how should I fix it. would you please help me again? Thank so much. using JuMP, Ipopt,…
Soma
  • 743
  • 6
  • 19
2
votes
1 answer

is there any possibility to change the RHS of non-linear constraints in julia?

Is there any possibility to change the RHS of non-linear constraints? using JuMP, Ipopt, Juniper,Gurobi,CPUTime T=0; ZT=zeros(2,1); ZB=zeros(2,1); #-----Model…
Soma
  • 743
  • 6
  • 19
2
votes
1 answer

dose JuMP.setRHS apply for non-linear modles in julia?

In the following code, RHS of NL-constraints should change. but the error happens. ERROR: UndefVarError: setRHS not defined. could you please learn me why this error happens?. thanks for your helps using JuMP,CPLEX,…
Soma
  • 743
  • 6
  • 19
2
votes
1 answer

Is there any non-linear mixed integer solver in julia?

would you please help me in this error . ERROR: Solver does not support discrete variables. for example in the following code using JuMP,CPUTime, Distributions,…
Soma
  • 743
  • 6
  • 19