Skip to content

Commit

Permalink
delete reform at the end of optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
laradicp committed Mar 5, 2021
1 parent 4f1f039 commit a5cde53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/decomposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ function buildformulations!(
end

function reformulate!(prob::Problem, annotations::Annotations, env::Env)
if getcoefmatrix(prob.original_formulation).fillmode
closefillmode!(getcoefmatrix(prob.original_formulation))
end
decomposition_tree = annotations.tree
if decomposition_tree !== nothing
root = BD.getroot(decomposition_tree)
Expand Down
5 changes: 1 addition & 4 deletions src/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ function optimize!(prob::MathProg.Problem, annotations::Annotations, params::Par

env = Env(params)

if getcoefmatrix(prob.original_formulation).fillmode
closefillmode!(getcoefmatrix(prob.original_formulation))
end

# Apply decomposition
reformulate!(prob, annotations, env)

Expand All @@ -67,6 +63,7 @@ function optimize!(prob::MathProg.Problem, annotations::Annotations, params::Par
end

env.kpis.elapsed_optimization_time = elapsed_optim_time(env)
prob.re_formulation = nothing

println(_to)
TO.reset_timer!(_to)
Expand Down

0 comments on commit a5cde53

Please sign in to comment.