diff --git a/src/AcceptanceCriteria/ConservativeWorseAccept.h b/src/AcceptanceCriteria/ConservativeWorseAccept.h old mode 100755 new mode 100644 index 4f95bb6..e6d86cb --- a/src/AcceptanceCriteria/ConservativeWorseAccept.h +++ b/src/AcceptanceCriteria/ConservativeWorseAccept.h @@ -92,7 +92,7 @@ namespace mlpalns { current_prob = S * std::exp(-lambda * T); } } else { - if (prob_decrease_is_linear) { + if(prob_decrease_is_linear) { current_prob -= prob_decrease; } else { const auto N = this->params.max_iters - this->params.prerun_iters; @@ -128,6 +128,6 @@ namespace mlpalns { return false; } } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/DiscreetWorseAccept.h b/src/AcceptanceCriteria/DiscreetWorseAccept.h old mode 100755 new mode 100644 index 200896a..cec7b0f --- a/src/AcceptanceCriteria/DiscreetWorseAccept.h +++ b/src/AcceptanceCriteria/DiscreetWorseAccept.h @@ -95,6 +95,6 @@ namespace mlpalns { return accept; } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/GreatDeluge.h b/src/AcceptanceCriteria/GreatDeluge.h old mode 100755 new mode 100644 index 31884ae..3efd5a3 --- a/src/AcceptanceCriteria/GreatDeluge.h +++ b/src/AcceptanceCriteria/GreatDeluge.h @@ -81,6 +81,6 @@ namespace mlpalns { last_obj_value = current_obj; return (new_obj < water_level - eps); } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/HillClimbing.h b/src/AcceptanceCriteria/HillClimbing.h old mode 100755 new mode 100644 index cb92c17..a29f859 --- a/src/AcceptanceCriteria/HillClimbing.h +++ b/src/AcceptanceCriteria/HillClimbing.h @@ -58,6 +58,6 @@ namespace mlpalns { bool HillClimbing::should_accept(double, double current_obj, double new_obj, double eps, Solution&, std::mt19937&) { return (new_obj < current_obj - eps); } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/LateAcceptanceHillClimbing.h b/src/AcceptanceCriteria/LateAcceptanceHillClimbing.h old mode 100755 new mode 100644 index bf98224..9a1e82b --- a/src/AcceptanceCriteria/LateAcceptanceHillClimbing.h +++ b/src/AcceptanceCriteria/LateAcceptanceHillClimbing.h @@ -104,6 +104,6 @@ namespace mlpalns { return accepted; } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/NLGreatDeluge.h b/src/AcceptanceCriteria/NLGreatDeluge.h old mode 100755 new mode 100644 index 3651daf..37b81a4 --- a/src/AcceptanceCriteria/NLGreatDeluge.h +++ b/src/AcceptanceCriteria/NLGreatDeluge.h @@ -94,6 +94,6 @@ namespace mlpalns { this->best_obj = best_obj; return (new_obj < current_obj - eps || new_obj < water_level - eps); } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/RandomWalk.h b/src/AcceptanceCriteria/RandomWalk.h old mode 100755 new mode 100644 index 3076a95..b7b9bce --- a/src/AcceptanceCriteria/RandomWalk.h +++ b/src/AcceptanceCriteria/RandomWalk.h @@ -58,6 +58,6 @@ namespace mlpalns { bool RandomWalk::should_accept(double, double, double, double, Solution&, std::mt19937&) { return true; } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/RecordToRecordTravel.h b/src/AcceptanceCriteria/RecordToRecordTravel.h old mode 100755 new mode 100644 index e014c32..73fc286 --- a/src/AcceptanceCriteria/RecordToRecordTravel.h +++ b/src/AcceptanceCriteria/RecordToRecordTravel.h @@ -61,8 +61,8 @@ namespace mlpalns { deviation = this->params.rrt_params.start_deviation; deviation_step = (this->params.rrt_params.start_deviation - this->params.rrt_params.end_deviation) / (this->params.max_iters - this->params.prerun_iters); - deviation_exp_coeff = - std::pow(this->params.rrt_params.start_deviation / this->params.rrt_params.end_deviation, 1.0 / (this->params.max_iters - this->params.prerun_iters)); + deviation_exp_coeff = std::pow(this->params.rrt_params.start_deviation / this->params.rrt_params.end_deviation, + 1.0 / (this->params.max_iters - this->params.prerun_iters)); } template @@ -97,6 +97,6 @@ namespace mlpalns { double gap = (new_obj - best_obj) / new_obj; return (gap < deviation - eps); } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/SimulatedAnnealing.h b/src/AcceptanceCriteria/SimulatedAnnealing.h old mode 100755 new mode 100644 index 43df848..06129a1 --- a/src/AcceptanceCriteria/SimulatedAnnealing.h +++ b/src/AcceptanceCriteria/SimulatedAnnealing.h @@ -210,6 +210,6 @@ namespace mlpalns { return (dist(mt) < exp((current_obj - new_obj) / temperature) - eps); } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/ThresholdAcceptance.h b/src/AcceptanceCriteria/ThresholdAcceptance.h old mode 100755 new mode 100644 index 83e7176..2b205a7 --- a/src/AcceptanceCriteria/ThresholdAcceptance.h +++ b/src/AcceptanceCriteria/ThresholdAcceptance.h @@ -84,7 +84,7 @@ namespace mlpalns { current_threshold = S * std::exp(-lambda * T); } } else { - if (this->params.ta_params.threshold_decrease_is_linear) { + if(this->params.ta_params.threshold_decrease_is_linear) { current_threshold -= threshold_decrease; } else { current_threshold *= threshold_exp_coeff; @@ -97,6 +97,6 @@ namespace mlpalns { double gap = (new_obj - current_obj) / new_obj; return (gap < current_threshold - eps); } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriteria/WorseAccept.h b/src/AcceptanceCriteria/WorseAccept.h old mode 100755 new mode 100644 index b4a67d7..bd7ee77 --- a/src/AcceptanceCriteria/WorseAccept.h +++ b/src/AcceptanceCriteria/WorseAccept.h @@ -80,10 +80,10 @@ namespace mlpalns { current_prob = S + (elapsed_time / T) * (E - S); } else { const auto lambda = std::log(S / T) / T; - current_prob = S * std::exp(- lambda * T); + current_prob = S * std::exp(-lambda * T); } } else { - if (prob_decrease_is_linear) { + if(prob_decrease_is_linear) { current_prob -= prob_decrease; } else { const auto N = this->params.max_iters - this->params.prerun_iters; @@ -99,6 +99,6 @@ namespace mlpalns { std::uniform_real_distribution dist(0.0, 1.0); return (new_obj < current_obj - eps || dist(mt) < current_prob - eps); } -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AcceptanceCriterion.h b/src/AcceptanceCriterion.h old mode 100755 new mode 100644 index 7ae3926..d0352ad --- a/src/AcceptanceCriterion.h +++ b/src/AcceptanceCriterion.h @@ -40,10 +40,8 @@ namespace mlpalns { bool preliminary_run; /*! Basic constructor */ - AcceptanceCriterion(Parameters& par) : - params(par), - timebase(par.acceptance_params_base == Parameters::AcceptanceParamsBase::Time), - preliminary_run(false) {} + AcceptanceCriterion(Parameters& par) + : params(par), timebase(par.acceptance_params_base == Parameters::AcceptanceParamsBase::Time), preliminary_run(false) {} /*! Setter for the preliminary run flag */ void set_preliminary_run() { preliminary_run = true; } @@ -84,6 +82,6 @@ namespace mlpalns { */ virtual bool should_accept(double best_obj, double current_obj, double new_obj, double eps, Solution& new_sol, std::mt19937& mt) = 0; }; -} +} // namespace mlpalns #endif \ No newline at end of file diff --git a/src/AlgorithmStatus.h b/src/AlgorithmStatus.h old mode 100755 new mode 100644 index ae10ba4..e0b3647 --- a/src/AlgorithmStatus.h +++ b/src/AlgorithmStatus.h @@ -38,11 +38,9 @@ namespace mlpalns { // Whether the new sol was the new global best sol bool new_best; - AlgorithmStatus(const Parameters& params, - Solution& new_solution, - Solution& best_solution) : - params{params}, new_solution{new_solution}, best_solution{best_solution} {} + AlgorithmStatus(const Parameters& params, Solution& new_solution, Solution& best_solution) + : params{params}, new_solution{new_solution}, best_solution{best_solution} {} }; -} +} // namespace mlpalns #endif // ML_PALNS_ALGORITHMSTATUS_H diff --git a/src/AlgorithmVisitor.h b/src/AlgorithmVisitor.h old mode 100755 new mode 100644 index 01f1844..3d6a745 --- a/src/AlgorithmVisitor.h +++ b/src/AlgorithmVisitor.h @@ -8,8 +8,8 @@ #include "AlgorithmStatus.h" #include "DestroyMethod.h" #include "RepairMethod.h" -#include #include +#include namespace mlpalns { /** @@ -30,10 +30,8 @@ namespace mlpalns { * @param destroy_methods_desc A vector with string descriptions of the destroy methods. * @param repair_methods_desc A vector with string descriptions of the repair methods. */ - virtual void on_algorithm_start(std::vector*>& destroy, - std::vector*>& repair, - const std::vector& destroy_methods_desc, - const std::vector& repair_methods_desc) = 0; + virtual void on_algorithm_start(std::vector*>& destroy, std::vector*>& repair, + const std::vector& destroy_methods_desc, const std::vector& repair_methods_desc) = 0; /** * This method is called when the prerun (calibration run) ends. @@ -41,8 +39,7 @@ namespace mlpalns { * @param destroy A vector with the destroy methods. * @param repair A vector with the repair methods. */ - virtual void on_prerun_end(std::vector*>& destroy, - std::vector*>& repair) = 0; + virtual void on_prerun_end(std::vector*>& destroy, std::vector*>& repair) = 0; /** * This method is called at the end of every iteration. @@ -60,14 +57,13 @@ namespace mlpalns { * @param destroy A vector with the destroy methods. * @param repair A vector with the repair methods. */ - virtual void on_many_iters_without_improvement(std::vector*>& destroy, - std::vector*>& repair) = 0; + virtual void on_many_iters_without_improvement(std::vector*>& destroy, std::vector*>& repair) = 0; /** * Virtual destructor. */ virtual ~AlgorithmVisitor() = default; }; -} +} // namespace mlpalns #endif // ML_PALNS_ALGORITHMVISITOR_H diff --git a/src/DestroyMethod.h b/src/DestroyMethod.h old mode 100755 new mode 100644 index 074d99f..05ead87 --- a/src/DestroyMethod.h +++ b/src/DestroyMethod.h @@ -5,8 +5,8 @@ #ifndef ML_PALNS_DESTROYMETHOD_H #define ML_PALNS_DESTROYMETHOD_H -#include #include +#include namespace mlpalns { // Destroy method @@ -20,6 +20,6 @@ namespace mlpalns { virtual ~DestroyMethod() = default; }; -} +} // namespace mlpalns #endif // ML_PALNS_DESTROYMETHOD_H diff --git a/src/InitialSolutionCreator.h b/src/InitialSolutionCreator.h old mode 100755 new mode 100644 index b458415..c63c856 --- a/src/InitialSolutionCreator.h +++ b/src/InitialSolutionCreator.h @@ -13,6 +13,6 @@ namespace mlpalns { struct InitialSolutionCreator { virtual Solution create_initial_solution(const ProblemInstance& instance, std::mt19937& mt) = 0; }; -} +} // namespace mlpalns #endif // ML_PALNS_INITIALSOLUTIONCREATOR_H diff --git a/src/PALNS.h b/src/PALNS.h old mode 100755 new mode 100644 index 7e35ede..750a292 --- a/src/PALNS.h +++ b/src/PALNS.h @@ -1,11 +1,11 @@ #ifndef __PALNS_H #define __PALNS_H +#include "AlgorithmVisitor.h" #include "DestroyMethod.h" #include "InitialSolutionCreator.h" #include "Parameters.h" #include "RepairMethod.h" -#include "AlgorithmVisitor.h" #include "AcceptanceCriteria/ConservativeWorseAccept.h" #include "AcceptanceCriteria/DiscreetWorseAccept.h" @@ -22,11 +22,11 @@ #include #include +#include #include #include #include #include -#include namespace mlpalns { /*! @brief This class models the PALNS algorithm solver @@ -115,9 +115,7 @@ namespace mlpalns { * * @param algorithm_visitor The algorithm visitor. */ - void set_algorithm_visitor(std::unique_ptr>& algorithm_visitor) { - this->algorithm_visitor = std::move(algorithm_visitor); - } + void set_algorithm_visitor(std::unique_ptr>& algorithm_visitor) { this->algorithm_visitor = std::move(algorithm_visitor); } /*! @brief Sets the acceptance criterion manually. For this acceptance * criterion to be actually used, the user must set property @@ -145,12 +143,7 @@ namespace mlpalns { acceptance_criterion->initialise(); // Invoke the algorithm visitor at the beginning of the algorithm - algorithm_visitor->on_algorithm_start( - destroy_methods, - repair_methods, - destroy_methods_descriptions, - repair_methods_descriptions - ); + algorithm_visitor->on_algorithm_start(destroy_methods, repair_methods, destroy_methods_descriptions, repair_methods_descriptions); // Make a preliminary run do_preliminary_run(num_threads); @@ -199,7 +192,8 @@ namespace mlpalns { * @param parameters Algorithm parameters. * @returns The best solution encountered over all the reruns. */ - Solution repeat_solver(InitialSolutionCreator* initial_solution_generator, std::uint32_t retries, std::uint32_t num_threads, Parameters parameters = Parameters()) { + Solution repeat_solver(InitialSolutionCreator* initial_solution_generator, std::uint32_t retries, std::uint32_t num_threads, + Parameters parameters = Parameters()) { std::mt19937::result_type random_data[std::mt19937::state_size]; std::random_device source; std::generate(std::begin(random_data), std::end(random_data), std::ref(source)); @@ -230,7 +224,7 @@ namespace mlpalns { std::vector>> loc_repair_methods; std::vector> loc_repair_compatibility; - auto make_local_copies_of_dr_methods = [&,this] () -> void { + auto make_local_copies_of_dr_methods = [&, this]() -> void { loc_destroy_methods.clear(); loc_repair_methods.clear(); @@ -283,7 +277,7 @@ namespace mlpalns { // Main loop while(!done) { // ****** 1. Check if we are done ****** - + // Local current iteration auto cur_iter = 0u; @@ -503,12 +497,8 @@ namespace mlpalns { // Update weights { std::lock_guard _(weights_mtx); - destroy_weights[chosen_destroy_id] = - destroy_weights[chosen_destroy_id] * params.score_decay + - new_score * (1 - params.score_decay); - repair_weights[chosen_repair_id] = - repair_weights[chosen_repair_id] * params.score_decay + - new_score * (1 - params.score_decay); + destroy_weights[chosen_destroy_id] = destroy_weights[chosen_destroy_id] * params.score_decay + new_score * (1 - params.score_decay); + repair_weights[chosen_repair_id] = repair_weights[chosen_repair_id] * params.score_decay + new_score * (1 - params.score_decay); } // Do we have an algorithm visitor? If so, call it @@ -639,8 +629,8 @@ namespace mlpalns { * @return The index of the chosen element. */ std::size_t roulette_wheel_selection(const std::vector& compatible_methods, const std::vector& weights, std::mt19937& mt) const { - // Like the previous method, but here only certain elements can be chosen, because they correspond to repair methods that are compatible with the chosen - // destroy method + // Like the previous method, but here only certain elements can be chosen, because they correspond to repair methods that are compatible with the + // chosen destroy method assert(!compatible_methods.empty()); @@ -673,7 +663,7 @@ namespace mlpalns { * @param start_solution The initial solution. * @param parameters Algorithm parameters. */ - void reset_local_parameters(Solution start_solution, Parameters& parameters) { + void reset_local_parameters(Solution start_solution, Parameters& parameters) { // We start at iteration 0 num_iter = 0u; @@ -707,64 +697,62 @@ namespace mlpalns { // Create a new acceptance criterion object switch(params.acceptance_criterion_id) { - case Parameters::AcceptanceCriterionId::HillClimbing: - acceptance_criterion = std::unique_ptr>(new HillClimbing(params)); - std::cout << "Acceptance criterion: Hill climbing" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::SimulatedAnnealing: - acceptance_criterion = std::unique_ptr>(new SimulatedAnnealing(params)); - std::cout << "Acceptance criterion: Simulated Annealing" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::ThresholdAcceptance: - acceptance_criterion = std::unique_ptr>(new ThresholdAcceptance(params)); - std::cout << "Acceptance criterion: Threshold acceptance" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::GreatDeluge: - acceptance_criterion = std::unique_ptr>(new GreatDeluge(params)); - std::cout << "Acceptance criterion: Great Deluge" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::RecordToRecordTravel: - acceptance_criterion = std::unique_ptr>(new RecordToRecordTravel(params)); - std::cout << "Acceptance criterion: Record-To-Record Travel" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::LateAcceptanceHillClimbing: - acceptance_criterion = std::unique_ptr>(new LateAcceptanceHillClimbing(params)); - std::cout << "Acceptance criterion: Late Acceptance Hill Climbing" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::NonLinearGreatDeluge: - acceptance_criterion = std::unique_ptr>(new NLGreatDeluge(params)); - std::cout << "Acceptance criterion: Non-linear Great Deluge" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::WorseAccept: - acceptance_criterion = std::unique_ptr>(new WorseAccept(params)); - std::cout << "Acceptance criterion: Worse-accept" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::ConservativeWorseAccept: - acceptance_criterion = std::unique_ptr>(new ConservativeWorseAccept(params)); - std::cout << "Acceptance criterion: Conservative Worse-accept" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::DiscreetWorseAccept: - acceptance_criterion = std::unique_ptr>(new DiscreetWorseAccept(params)); - std::cout << "Acceptance criterion: Discreet Worse-accept" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::RandomWalk: - acceptance_criterion = std::unique_ptr>(new RandomWalk(params)); - std::cout << "Acceptance criterion: Random walk" << std::endl; - break; - - case Parameters::AcceptanceCriterionId::Custom: - std::cout << "Acceptance criterion: Custom" << std::endl; - break; + case Parameters::AcceptanceCriterionId::HillClimbing: + acceptance_criterion = std::unique_ptr>(new HillClimbing(params)); + std::cout << "Acceptance criterion: Hill climbing" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::SimulatedAnnealing: + acceptance_criterion = std::unique_ptr>(new SimulatedAnnealing(params)); + std::cout << "Acceptance criterion: Simulated Annealing" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::ThresholdAcceptance: + acceptance_criterion = std::unique_ptr>(new ThresholdAcceptance(params)); + std::cout << "Acceptance criterion: Threshold acceptance" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::GreatDeluge: + acceptance_criterion = std::unique_ptr>(new GreatDeluge(params)); + std::cout << "Acceptance criterion: Great Deluge" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::RecordToRecordTravel: + acceptance_criterion = std::unique_ptr>(new RecordToRecordTravel(params)); + std::cout << "Acceptance criterion: Record-To-Record Travel" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::LateAcceptanceHillClimbing: + acceptance_criterion = std::unique_ptr>(new LateAcceptanceHillClimbing(params)); + std::cout << "Acceptance criterion: Late Acceptance Hill Climbing" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::NonLinearGreatDeluge: + acceptance_criterion = std::unique_ptr>(new NLGreatDeluge(params)); + std::cout << "Acceptance criterion: Non-linear Great Deluge" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::WorseAccept: + acceptance_criterion = std::unique_ptr>(new WorseAccept(params)); + std::cout << "Acceptance criterion: Worse-accept" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::ConservativeWorseAccept: + acceptance_criterion = std::unique_ptr>(new ConservativeWorseAccept(params)); + std::cout << "Acceptance criterion: Conservative Worse-accept" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::DiscreetWorseAccept: + acceptance_criterion = std::unique_ptr>(new DiscreetWorseAccept(params)); + std::cout << "Acceptance criterion: Discreet Worse-accept" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::RandomWalk: + acceptance_criterion = std::unique_ptr>(new RandomWalk(params)); + std::cout << "Acceptance criterion: Random walk" << std::endl; + break; + + case Parameters::AcceptanceCriterionId::Custom: std::cout << "Acceptance criterion: Custom" << std::endl; break; } } @@ -942,6 +930,6 @@ namespace mlpalns { * iterations. */ static constexpr std::uint32_t print_output_iter = 1000; }; -} +} // namespace mlpalns #endif diff --git a/src/Parameters.h b/src/Parameters.h index 8bd08b6..6599d36 100644 --- a/src/Parameters.h +++ b/src/Parameters.h @@ -129,9 +129,7 @@ namespace mlpalns { Custom }; - enum class AcceptanceParamsBase : std::uint32_t { - Time, Iterations - }; + enum class AcceptanceParamsBase : std::uint32_t { Time, Iterations }; AcceptanceCriterionId acceptance_criterion_id; AcceptanceParamsBase acceptance_params_base; @@ -306,46 +304,46 @@ namespace mlpalns { false, // Enable reheating? 5.0, // Reheat to the temperature at the time of the last improvement times this coefficient 3 // Reheat this number of times - ); + ); ta_params = ThresholdParameters(0.05, // Start Threshold 0.001, // End Threshold true // Threshold decrease is linear (as opposed to exponential decay) - ); + ); gd_params = GreatDelugeParameters(1.1, // Initial water level ratio (* initial solution value) 0.01 // Water level decrease rate (* avg gap btw current and water level) - ); + ); rrt_params = RecordDeviationParameters(0.1, // Start deviation 0.01, // End deviation true // Deviation decrease is linear (as opposed to exponential decay) - ); + ); lahc_params = LateAcceptanceParameters(5000, // List size true // Accept all non-worsening moves - ); + ); nlgd_params = NLGreatDelugeParameters(1.1, // Initial water level (* initial solution value) 0.01, // Gap to increase the water level 0.05, // Water level increase percentage 0.01 // Water level decrease exponent factor - ); + ); wa_params = WorseAcceptParameters(0.1, // Initial probability 0.01, // Final probability true // Probability of accepting decreases linearly (as opposed to exponentially) - ); + ); cwa_params = ConservativeWorseAcceptParameters(0.1, // Initial probability 0.01, // Final probability true // Probability of accepting decreases linearly (as opposed to exponentially) - ); + ); dwa_params = DiscreetWorseAcceptParameters( 50, // After this consecutive rejections, we accept a worsening move with probability 100% true // Probability of accepting increases linearly [in the number of consecutive rejects] (as opposed to exponentially) - ); + ); acceptance_criterion_id = AcceptanceCriterionId::SimulatedAnnealing; acceptance_params_base = AcceptanceParamsBase::Iterations; @@ -364,6 +362,6 @@ namespace mlpalns { log_file_basename = "WARNING_not_set"; } }; -} +} // namespace mlpalns #endif diff --git a/src/RepairMethod.h b/src/RepairMethod.h old mode 100755 new mode 100644 index 3934873..fbb202a --- a/src/RepairMethod.h +++ b/src/RepairMethod.h @@ -5,8 +5,8 @@ #ifndef ML_PALNS_REPAIRMETHOD_H #define ML_PALNS_REPAIRMETHOD_H -#include #include +#include namespace mlpalns { // Repair method @@ -20,6 +20,6 @@ namespace mlpalns { virtual ~RepairMethod() = default; }; -} +} // namespace mlpalns #endif // ML_PALNS_REPAIRMETHOD_H