Skip to content

Commit

Permalink
fixing a missing bracket after .Optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Changhyun Kwon committed May 1, 2020
1 parent 728402b commit 3530040
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion chap1/script.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using JuMP, GLPK
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)

@variable(m, 0 <= x <= 2 )
@variable(m, 0 <= y <= 30 )
Expand Down
2 changes: 1 addition & 1 deletion chap10/p-median.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ global locations, customers, c


function optimal(p)
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)

@variable(m, x[i in locations, j in customers] >= 0)
@variable(m, y[i in locations], Bin)
Expand Down
2 changes: 1 addition & 1 deletion chap2/LP1.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using JuMP, GLPK

# Preparing an optimization model
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)

# Declaring variables
@variable(m, 0<= x1 <=10)
Expand Down
2 changes: 1 addition & 1 deletion chap2/LP2.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using JuMP, GLPK
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)

c = [ 1; 2; 5]
A = [-1 1 3;
Expand Down
2 changes: 1 addition & 1 deletion chap2/LP3.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using JuMP, GLPK
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)

c = [ 1; 2; 5]
A = [-1 1 3;
Expand Down
2 changes: 1 addition & 1 deletion chap2/MILP1.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using JuMP, GLPK

# Preparing an optimization model
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)

# Declaring variables
@variable(m, 0<= x1 <=10)
Expand Down
2 changes: 1 addition & 1 deletion chap5/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ b = Array{Float64}(b)


using JuMP, GLPK, LinearAlgebra
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)
@variable(m, x[1:length(c)] >=0 )
@objective(m, Min, dot(c, x))
@constraint(m, A*x .== b)
Expand Down
2 changes: 1 addition & 1 deletion chap6/mcnf.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function minimal_cost_network_flow(nodes, links, c_dict, u_dict, b)
mcnf = Model(GLPK.Optimizer
mcnf = Model(GLPK.Optimizer)

@variable(mcnf, 0<= x[link in links] <= u_dict[link])

Expand Down
2 changes: 1 addition & 1 deletion chap6/mcnf_example1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ c_dict = Dict(links .=> c)
u_dict = Dict(links .=> u)

# Preparing an optimization model
mcnf = Model(GLPK.Optimizer
mcnf = Model(GLPK.Optimizer)

# Defining decision variables
@variable(mcnf, 0<= x[link in links] <= u_dict[link])
Expand Down
2 changes: 1 addition & 1 deletion chap6/transportation1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ c_dict = Dict( (supply_nodes[i], demand_nodes[j]) => c[i,j]
for i in 1:length(supply_nodes), j in 1:length(demand_nodes) )

# Preparing an Optimization Model
tp = Model(GLPK.Optimizer
tp = Model(GLPK.Optimizer)

@variable(tp, x[supply_nodes, demand_nodes] >= 0)
@objective(tp, Min, sum(c_dict[i,j]*x[i,j]
Expand Down
2 changes: 1 addition & 1 deletion chap8/nlp_ipopt.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using JuMP, Ipopt
m = Model(Ipopt.Optimizer
m = Model(Ipopt.Optimizer)

@variable(m, x[1:2])
@NLobjective(m, Min, (x[1]-3)^3 + (x[2]-4)^2)
Expand Down
2 changes: 1 addition & 1 deletion chap9/rlp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A = [ 1 1 0 0 1 1 ;

# Solving the deterministic LP problem
function DLP(x, D)
m = Model(GLPK.Optimizer
m = Model(GLPK.Optimizer)
@variable(m, y[products] >= 0)
@objective(m, Max, sum( p[j]*y[j] for j in products) )

Expand Down

0 comments on commit 3530040

Please sign in to comment.