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, 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) |
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, 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) |
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, Ipopt | |
m = Model(solver=IpoptSolver()) | |
lowub = parse(ARGS[1]) | |
highub = parse(ARGS[2]) | |
@variable(m, x[1:8]) | |
setlowerbound(x[1], 100) |
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
2500 250 | |
5000 500 | |
8000 800 | |
9000 900 | |
10000 1000 | |
15000 1500 | |
20000 2000 | |
25000 2500 | |
35000 3500 | |
40000 4000 |
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
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 |
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
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 |
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, 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); |