using Xpress
Solver = Xpress
using BenchmarkTools
BenchmarkTools.DEFAULT_PARAMETERS.samples = 100
const nvars = 1000
const ncons = 1000
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP, BilevelJuMP | |
model = BilevelModel() | |
NLL = 3 # number of lower level (LL) models | |
GLL = [4, 5, 6] # generators in each lower level | |
@variable(Upper(model), 0 <= q[i in 1:NLL] <= 100) | |
# arbitrary upper constraint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME | |
OBJSENSE MIN | |
ROWS | |
N OBJ | |
L c1_2 | |
L c2_2 | |
L c3_2 | |
L c4_2 | |
L c5_2 | |
L c6_2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= | |
(soi) pkg> st | |
Status `~/soi/Project.toml` | |
[0a46da34] CSDP v0.5.0 #bl/moiv0.9 (https://github.com/JuliaOpt/CSDP.jl.git) | |
[b8f27783] MathOptInterface v0.9.0 #master (https://github.com/JuliaOpt/MathOptInterface.jl.git) | |
[f0680fed] SemidefiniteOptInterface v0.6.0 #bl/moiv0.9 (https://github.com/JuliaOpt/SemidefiniteOptInterface.jl.git) | |
=# | |
using LinearAlgebra | |
using MathOptInterface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP | |
using GLPK | |
using ParameterJuMP | |
using TimerOutputs | |
#= | |
add parameters | |
=# | |
function add_parameters(model, N) | |
x = Parameters(model, 4.0*ones(N)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main | |
CplexSolver | |
cpx_setparam | |
cpx_setlogfile | |
cpx_getprobtype | |
Constraints | |
cpx_chgbds |
using Xpress
Solver = Xpress
using BenchmarkTools
BenchmarkTools.DEFAULT_PARAMETERS.samples = 100
m1 = Solver.Model()
function add1000vars1(m)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP | |
m = Model() | |
# Variables section | |
@variable(m, x[1:10] >= 0) | |
@variable(m, y[1:10] >= 0) | |
@variable(m, z >= 0) | |
# Constraints section |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JuMP | |
using Gurobi | |
# define type to hold cutting planes info | |
# --------------------------------------- | |
type cuts | |
RHS::Vector{Vector{Float64}} | |
Coeff::Vector{Vector{Float64}} | |
n::Int |