Skip to content

Commit

Permalink
Revert "delete reform at the end of optimize"
Browse files Browse the repository at this point in the history
This reverts commit a5cde53.
  • Loading branch information
laradicp committed Mar 5, 2021
1 parent a5cde53 commit 37523d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/decomposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,6 @@ 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: 4 additions & 1 deletion src/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ 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 @@ -63,7 +67,6 @@ 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 37523d2

Please sign in to comment.