# HG changeset patch # User Nicolas Saunier # Date 1581392825 0 # Node ID 18e2c8cb9b0972eafc27eb0134e7e1ad8e17752b # Parent 94ac9c16420f863a34439a643bdddfc3971301d6# Parent e257643b1d0e2b0076d05675298c4848beb295cb Merged in etienne_beauchamp/trafficintelligence/Etienne-Beauchamp/added-d-optional-argument-1581358671588 (pull request #19) Etienne Beauchamp/added d optional argument 1581358671588 Approved-by: Nicolas Saunier diff -r 94ac9c16420f -r 18e2c8cb9b09 scripts/safety-analysis.py --- a/scripts/safety-analysis.py Thu Jan 30 10:21:40 2020 -0500 +++ b/scripts/safety-analysis.py Tue Feb 11 03:47:05 2020 +0000 @@ -13,6 +13,7 @@ parser = argparse.ArgumentParser(description='The program processes indicators for all pairs of road users in the scene') parser.add_argument('--cfg', dest = 'configFilename', help = 'name of the configuration file', required = True) +parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database file (overrides the configuration file)') parser.add_argument('-n', dest = 'nObjects', help = 'number of objects to analyse', type = int) # TODO analyze only parser.add_argument('--prediction-method', dest = 'predictionMethod', help = 'prediction method (constant velocity (cvd: vector computation (approximate); cve: equation solving; cv: discrete time (approximate)), normal adaptation, point set prediction)', choices = ['cvd', 'cve', 'cv', 'na', 'ps', 'mp']) @@ -25,6 +26,10 @@ params = storage.ProcessParameters(args.configFilename) +# selected database to overide the configuration file +if args.databaseFilename is not None: + params.databaseFilename = args.databaseFilename + # parameters for prediction methods if args.predictionMethod is not None: predictionMethod = args.predictionMethod