From 0a96565f476193a57b5624318a33264633d169aa Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Tue, 1 Jun 2021 14:34:07 -0500 Subject: [PATCH] Reformat code --- benchmark/benchmark.jl | 35 ++++++------------- .../methods/XavQiuWanThi2019/structs.jl | 1 - test/model/formulations_test.jl | 2 +- 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/benchmark/benchmark.jl b/benchmark/benchmark.jl index 73541d8..22457c3 100644 --- a/benchmark/benchmark.jl +++ b/benchmark/benchmark.jl @@ -70,27 +70,15 @@ function main() "tejada19/UC_168h_199g", ] formulations = Dict( - "ArrCon2000" => Formulation( - ramping = ArrCon2000.Ramping(), - ), - "CarArr2006" => Formulation( - pwl_costs = CarArr2006.PwlCosts(), - ), - "DamKucRajAta2016" => Formulation( - ramping = DamKucRajAta2016.Ramping(), - ), - "Gar1962" => Formulation( - pwl_costs = Gar1962.PwlCosts(), - ), - "KnuOstWat2018" => Formulation( - pwl_costs = KnuOstWat2018.PwlCosts(), - ), - "MorLatRam2013" => Formulation( - ramping = MorLatRam2013.Ramping(), - ), - "PanGua2016" => Formulation( - ramping = PanGua2016.Ramping(), - ), + "ArrCon2000" => Formulation(ramping = ArrCon2000.Ramping()), + "CarArr2006" => Formulation(pwl_costs = CarArr2006.PwlCosts()), + "DamKucRajAta2016" => + Formulation(ramping = DamKucRajAta2016.Ramping()), + "Gar1962" => Formulation(pwl_costs = Gar1962.PwlCosts()), + "KnuOstWat2018" => + Formulation(pwl_costs = KnuOstWat2018.PwlCosts()), + "MorLatRam2013" => Formulation(ramping = MorLatRam2013.Ramping()), + "PanGua2016" => Formulation(ramping = PanGua2016.Ramping()), ) trials = [i for i in 1:5] combinations = [ @@ -149,10 +137,7 @@ end BLAS.set_num_threads(1) UnitCommitment.optimize!( model, - XavQiuWanThi2019.Method( - time_limit = 3600.0, - gap_limit = 1e-4, - ), + XavQiuWanThi2019.Method(time_limit = 3600.0, gap_limit = 1e-4), ) end @info @sprintf("Total time was %.2f seconds", total_time) diff --git a/src/solution/methods/XavQiuWanThi2019/structs.jl b/src/solution/methods/XavQiuWanThi2019/structs.jl index c5e607a..4f54d80 100644 --- a/src/solution/methods/XavQiuWanThi2019/structs.jl +++ b/src/solution/methods/XavQiuWanThi2019/structs.jl @@ -2,7 +2,6 @@ # Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See COPYING.md for more details. - """ Lazy constraint solution method described in: diff --git a/test/model/formulations_test.jl b/test/model/formulations_test.jl index e9bdc12..98a261b 100644 --- a/test/model/formulations_test.jl +++ b/test/model/formulations_test.jl @@ -32,4 +32,4 @@ end _test(Formulation(pwl_costs = Gar1962.PwlCosts())) _test(Formulation(pwl_costs = CarArr2006.PwlCosts())) _test(Formulation(pwl_costs = KnuOstWat2018.PwlCosts())) -end \ No newline at end of file +end