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

MethodError: some problems with JuMP in Julia

I have some problems with JuMP. When I run it, it says: MethodError: no method matching (::Interpolations.Extrapolation{Float64, 1, ScaledInterpolation{Float64, 1, Interpolations.BSplineInterpolation{Float64, 1, Vector{Float64},…
1
vote
1 answer

Statistical tests for two random datasets

I need to compare two data sets, i randomly created them in Julia, with rand. I want to know if there's some statistical test (that can be perform in Julia JuMP) that tells me how different the distributions are (having no assumptions of the…
jvm.97
  • 247
  • 1
  • 7
1
vote
1 answer

How can a predefined list can be used for the summation indices in a JuMP @complements() function?

I'm trying to use the JuMP and complementarity libraries to solve an MPEC program. The problem is that the complementarity restrictions have summations in them and I haven't been able to define the indices of those summations. using JuMP, Ipopt,…
vzehnder
  • 51
  • 4
1
vote
1 answer

i can't set the optimizer in Julia

i'm using version 1.4.1 in Julia and wanted to create an optimization model. This is what i did: using JuMP using Cbc model = Model() set_optimizer(model, Cbc.Optimizer) And i get this error: "UndefVarError: set_optimizer not defined in top-level…
jvm.97
  • 247
  • 1
  • 7
1
vote
1 answer

How to make CPLEX NOT output to terminal window in Julia

I am trying to silent CPLEX messages and so far I manage this: model = Model(CPLEX.Optimizer) JuMP.set_parameter(model, "CPX_PARAM_MIPDISPLAY", 0) But I am still getting some messages like this one: Version identifier: 12.10.0.0 | 2019-11-26 |…
Dejan Dozet
  • 948
  • 10
  • 26
1
vote
2 answers

Mathematical logic in Julia

Does Jump support direct use of mathematical logics in a model? I know it supports conditional indicator, but how about these conditionals? For example: 1- A bi-conditional indicator is a binary variable that is associated with satisfaction…
user9990604
1
vote
1 answer

Is Julia.JuMP 15x slower then Python.Cvxpy?

I was trying to solve a simple optimization problem, first via Python.Cvxpy framework and then via Julia.JuMP framework, but Julia.JuMP formulation is 15x slower. My optimization problem: In Python.Cvxpy: (runtime: 4 sec) # Run: time python…
pqrz
  • 133
  • 5
1
vote
1 answer

Any knows the method addinfocallback() in JuMP@0.18 now is replaced by what?

I found following method addinfocallback() in the document of JuMP beta0.18, but couldn't find any in the latest beta's document. Did anyone know any? solutionvalues = Vector{Float64}[] # build model ``m`` up here function infocallback(cb) …
aaaaluba
  • 11
  • 1
1
vote
1 answer

how dose "writecsv() " work in JuliaPro 1.5.0?

Would you please help me? How is it possible to export the results in Excel in JuliaPro 1.5.0? I used to use writecsv() such as writecsv("C:\admin\users\Desktop\maincoreectedmodel10.csv",sortlist(List)) in Juliapro 0.6.4 but it makes the error in…
Soma
  • 743
  • 6
  • 19
1
vote
1 answer

Is there a way to know how much time is spent in Gurobi usercuts?

I am using JuMP Mathematical Optimization Interface user cuts Callbacks with Gurobi MOI.set(m, MOI.UserCutCallback(), callback_benders_usercuts) And I would like to know if there is a way to know how much time is spent in my usercut function…
JKHA
  • 1,800
  • 11
  • 28
1
vote
1 answer

Julia - Using JuMP Triangular Matrix Variables in JuMP causes bad type performance

On the next MWE, @code_warntype returns bad performance type, ##1469::JuMP.Containers.SparseAxisArray. using JuMP, Gurobi function MWE(n) m = Model(Gurobi.Optimizer) @variable(m, x[i=1:n, j=i+1:n], Bin) @variable(m, y[i=1:n],…
JKHA
  • 1,800
  • 11
  • 28
1
vote
1 answer

Julia - Gurobi Callbacks on array of JuMP variables

In Gurobi and JuMP 0.21, it is well documented here on how you would access a variable with a callback: using JuMP, Gurobi, Test model = direct_model(Gurobi.Optimizer()) @variable(model, 0 <= x <= 2.5, Int) @variable(model, 0 <= y <= 2.5,…
JKHA
  • 1,800
  • 11
  • 28
1
vote
2 answers

julia jump: declare array with variable upper and lower limit

I am trying to solve a sensitivity analysis using Julia (JUMP). I am stuck at the following problem: I am trying to declare a variable that has both an upper and a lower limit to feed it to the lp_objective_perturbation_range function. That function…
1
vote
1 answer

Why GLPK Solver doesn't verbose anything in JuMP?

I create this simple code as a demonstration: using GLPK using JuMP m = Model(GLPK.Optimizer) @variable(m, y[i=1:100], Bin) @objective(m, Min, sum(y)) @constraint(m, [j=5:50], sum([y[i] for i in j:j+10]) >= 5) optimize!(m) Please note this integer…
JKHA
  • 1,800
  • 11
  • 28
1
vote
1 answer

Combinations adding up to a target - Julia lang

I am new to Julia, I've asked this question in a simpler form, I need to expand it a bit more. I need to find a combination of numbers in an array that add up to a certain target AND are a part of the same group. Here is my…
Nev1111
  • 1,039
  • 9
  • 13