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
0
votes
0 answers

How to use filter!() for array type in julia?

If there is the F array in Julia as following julia> F 5-element Array{Any,1}: 6 28 30 34 49 and I want to reach this F 1-element Array{Any,1}: Any[6, 28, 30, 34, 49] this code is used F[1]=vcat(F[1],F[2:end]) while true k=2; if…
Soma
  • 743
  • 6
  • 19
0
votes
1 answer

Constraints in Julia

I'm switching from AMPL to Julia right now, and while I've checked the JuMP manual on constraints, I didn't see there an answer to my question (in case I've missed it - I'm sorry :)) If I have a variable representing a production: g[i,j] Where i -…
0
votes
2 answers

How can I mange the index of the loop in julia?

It is the section of the Genetic algorithm that is coding in Julia. the code was wrote as follow: popc= [individual(rand(0:1,nvar),[]) for i in 1:nc/4,j in 1:2]; for k=1:nc/4 #select firdt parent i1=rand(1:npop); p1=pop[i1]; #select…
Soma
  • 743
  • 6
  • 19
0
votes
1 answer

How can I plot mixed integer problem result?

I solved a linear bi-objective mixed integer problem and I want to plot the results. results include lines and points. for example list=[([0.0; 583000.0], 0), ([190670.0; 149600.0], 0), ([69686.0, 385000.0], 1), ([33296.0, 484000.0], 1),…
Soma
  • 743
  • 6
  • 19
0
votes
1 answer

Schedule optimization

I'm trying to solve linear programming problem about scheduling. Each task has starting time r, time to solve task p and weight w. I have to minimize following function (C is ending time of task): function to minimize With data provided below Result…
PoorGuy
  • 29
  • 8
0
votes
1 answer

How to mute JuMP (using cplex) log progress?

How to mute JuMP log progress? I want to suppress the output of JuMP Using model as CPLEX.
최시현
  • 21
  • 3
0
votes
1 answer

Store values generated by a for-loop. JuMP/Julia

It's amazing that the internet is totally void of this simple question (or similar). Or I'm just very bad at searching. Anyway, I simply want to store values generated by a for-loop in an array and print the array. Simple as that. On every other…
Parseval
  • 503
  • 1
  • 4
  • 14
0
votes
2 answers

Multidimensional string variables in Julia JuMP

I am defining multidimensional variables in JuMP, however, I require the indices to be strings for ease of operation. Some of the indices might not be distinct. How do I set up multidimensional variables in JuMP while allowing for repeat elements?…
ShanAcro
  • 1
  • 4
0
votes
1 answer

Is this solution in Julia for a network optimization problem correct?

I need to solve this problem in Julia for educational purposes: I am using Julia 1.1.0 and JuMP v0.19.0 I managed to code a solution. However, I am insecure about the final result. That's my code: using JuMP using GLPK using Cbc # Open source…
0
votes
1 answer

Why these two versions of Julia code for the same optimization problem are almost identical and produce different results?

I am trying to learn Julia for educational purposes. Specially, I trying to use Julia and the package JuMP to solve operational research problems. I was watching this great video from youtube. A guy, named Philip Thomas, shows a didatic example.…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
0
votes
1 answer

How to properly use anonymous construction syntax for an optimization problem with multiple restrictions using Julia's JuMP package?

I am using Julia 1.0 with the JuMP package to solve optimization problems. These are my first days using the language. Hence, I am not really comfortable with the syntax. Following the Quick Start Guide, I was able to solve the problem bellow: I…
Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
0
votes
2 answers

"How to make the summation to a specific period in Julia?"

I am formulating mathematical programming and now I have an issue with the summation sign in a constraint. I want to sum over the specific period in a planning horizon, I have tried some but Julia report an error message. the mathematical formula…
aKorno
  • 21
  • 1
0
votes
1 answer

How can I give a constant value to a variable in julia

I have a 2 dimensional matrix variable which it should get a constant value. for example @variable(model1,x[h=1:3,6]==I[h=1:3,6]) I: is a constant matrix. but in code it gives this error: ERROR: MethodError: no method matching…
Soma
  • 743
  • 6
  • 19
0
votes
1 answer

What are the options to develop a UI for a backend optimization code written using JuMP?

I am right now working on a freight network optimization problem and want to develop a UI for a layman. The code is written using JuMP (Julia 0.6.2). I am trying to create a UI where the user can upload the data and do a bit of sensitivity analysis.…
0
votes
1 answer

Julia - Constraint Programming in JuMP

I know we can use CPLEX in Julia JuMP, for linear programming for instance. But can we use CPLEX in JuMP, Julia v1.1 for constraint programming ? CPLEX and OPL can do constraint programming, but what about Julia, are there documentation pages in…
JKHA
  • 1,800
  • 11
  • 28