From e03a52d4d385ccccd8770f380a29d2591a29642b Mon Sep 17 00:00:00 2001 From: David Radu <dcradu@uliege.be> Date: Tue, 13 Apr 2021 11:33:15 +0200 Subject: [PATCH] updating argparser --- config_model.yml | 10 +++++----- src/main.py | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config_model.yml b/config_model.yml index 3b4e8d9..889b65c 100644 --- a/config_model.yml +++ b/config_model.yml @@ -29,7 +29,7 @@ siting_params: mir: False solver: 'gurobi' mipgap: 0.01 - timelimit: 1800 + timelimit: 43200 threads: 0 MIRSA: # Simulated Annealing with Local Search @@ -42,20 +42,20 @@ siting_params: algorithm: 'SALS' # 'GLS' (Greedy Local Search), 'RSSA', 'SALS', 'STGHSAS', 'STGHSAP' GRED_DET: set: False - no_runs: 10 + no_runs: 100 p: 0 algorithm: 'TGH' GRED_STO: set: False - p: 27 # 10% of 10150 locations - no_runs: 200 + p: 27 # 5% of 10150 locations, 55, 110 + no_runs: 500 algorithm: 'STGH' RAND: # Random Search set: False no_iterations: 1000 no_epochs: 1000 - no_runs: 200 + no_runs: 100 algorithm: 'RS' SGHLS: # Stochastic greedy & simulated annealing diff --git a/src/main.py b/src/main.py index cd38fd1..109c986 100644 --- a/src/main.py +++ b/src/main.py @@ -17,6 +17,7 @@ def parse_args(): parser = argparse.ArgumentParser(description='Command line arguments.') parser.add_argument('--c', type=int) + parser.add_argument('--p', type=int, default=None) parser.add_argument('--run_BB', type=bool, default=False) parser.add_argument('--run_MIR', type=bool, default=False) parser.add_argument('--run_MIRSA', type=bool, default=False) @@ -90,8 +91,10 @@ if __name__ == '__main__': siting_parameters['solution_method']['MIRSA']['set'] = args['run_MIRSA'] siting_parameters['solution_method']['GRED_DET']['set'] = args['run_GRED_DET'] siting_parameters['solution_method']['GRED_STO']['set'] = args['run_GRED_STO'] + siting_parameters['solution_method']['GRED_STO']['p'] = args['p'] siting_parameters['solution_method']['RAND']['set'] = args['run_RAND'] siting_parameters['solution_method']['SGHLS']['set'] = args['run_SGHLS'] + siting_parameters['solution_method']['SGHLS']['p'] = args['p'] c = args['c'] -- GitLab