Skip to content

Commit

Permalink
Use the new function set_objective_coefficient.
Browse files Browse the repository at this point in the history
  • Loading branch information
dourouc05 committed Jul 18, 2019
1 parent dd4d64d commit 790da29
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/cutting_stock_column_generation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ function example_cutting_stock(; max_gen_cols::Int=5000)
push!(θ, new_var[ncols])

# Update the objective function.
set_objective_function(m, objective_function(m)
+ θ[ncols] * (rollcost - sum(patterns[j, ncols] * prices[j] for j=1:n))
)
set_objective_coefficient(m, θ[ncols], rollcost - sum(patterns[j, ncols] * prices[j] for j=1:n))

# Update the constraint number j if the new pattern impacts this production.
for j in 1:n
Expand Down

0 comments on commit 790da29

Please sign in to comment.