Skip to content

Instantly share code, notes, and snippets.

Site Wang jac0320

Block or report user

Report or block jac0320

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View benchmark_tsp_jump.jl
using JuMP, CPLEX, Cbc;
at = time()
m = Model(solver=CplexSolver(CPX_PARAM_SCRIND=0, CPX_PARAM_TILIM=10));
# m = Model(solver=CbcSolver(logLevel=1))
# Parameter Initialization
node = parse(ARGS[1]);
xcoord = rand(node);
ycoord = rand(node);
@jac0320
jac0320 / benchmark_tsp_pyomo.py
Last active Sep 6, 2018
pyomo benchmark file
View benchmark_tsp_pyomo.py
import re, sys, time
at = time.time()
import numpy as np
import pyomo.environ as pe
from pyomo.opt import SolverFactory
node = int(sys.argv[1]);
edge = node * node
View benchmark_tsp_pulp.py
import pulp, sys, time
import pandas as pd
import numpy as np
at = time.time()
node = int(sys.argv[1]);
xcoord = np.random.rand(node);
ycoord = np.random.rand(node);
edge = node * node
View parallel_inputs.txt
2500 250
5000 500
8000 800
9000 900
10000 1000
15000 1500
20000 2000
25000 2500
35000 3500
40000 4000
View jump-nlp-inputs.jl
using JuMP, Ipopt
m = Model(solver=IpoptSolver())
lowub = parse(ARGS[1])
highub = parse(ARGS[2])
@variable(m, x[1:8])
setlowerbound(x[1], 100)
View jump-nlp.jl
using JuMP, Ipopt
m = Model(solver=IpoptSolver())
@variable(m, x[1:8])
setlowerbound(x[1], 100)
setlowerbound(x[2], 1000)
setlowerbound(x[3], 1000)
setlowerbound(x[4], 10)
View jump-mip.jl
using JuMP, Gurobi
m = Model(solver=GurobiSolver())
@variable(m, 5 >= x >= 0)
@variable(m, 10 >= y >= 0 , Int)
@variable(m, z , Bin)
@constraint(m, x + y + z <= 10)
@constraint(m, x + 2y + z <= 15)
You can’t perform that action at this time.