From 37523d2f856501c29d4fa576e0d0d410e3ae0478 Mon Sep 17 00:00:00 2001 From: laradicp Date: Fri, 5 Mar 2021 18:06:53 -0300 Subject: [PATCH] Revert "delete reform at the end of optimize" This reverts commit a5cde53c8c626fcbf1efb49243b5216ce09ad0bf. --- src/decomposition.jl | 3 --- src/optimize.jl | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/decomposition.jl b/src/decomposition.jl index bf7a1b4e0..363a543ea 100644 --- a/src/decomposition.jl +++ b/src/decomposition.jl @@ -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) diff --git a/src/optimize.jl b/src/optimize.jl index c1b1bacae..3bf9a70ec 100644 --- a/src/optimize.jl +++ b/src/optimize.jl @@ -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) @@ -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)