Mercurial Hosting > traffic-intelligence
comparison scripts/nomad/optimize-with-nomad.py @ 1186:7117a31555c1
Etienne Beauchamp s work on optimization with Nomad software
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 21 Jun 2022 17:06:06 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1177:aa88acf06876 | 1186:7117a31555c1 |
---|---|
1 import os | |
2 import argparse | |
3 | |
4 parser = argparse.ArgumentParser(description='The program is used to select the type of tracking to run with ' | |
5 'tracking-mota.py with NOMAD', | |
6 epilog='''NOMAD - A blackbox optimization software: | |
7 C. Audet, S. Le Digabel, C. Tribes and V. Rochon Montplaisir. The NOMAD project. | |
8 Software available at https://www.gerad.ca/nomad. | |
9 | |
10 S. Le Digabel. Algorithm 909: NOMAD: Nonlinear Optimization with the MADS algorithm. | |
11 ACM Transactions on Mathematical Software, 37(4):44:1–44:15, 2011.''', | |
12 formatter_class=argparse.RawDescriptionHelpFormatter) | |
13 | |
14 parser.add_argument('-t', dest='intersections', nargs = '*', type = str, help='name of the intersection for which ' | |
15 'the optimization is meant to be ran', | |
16 required=True) | |
17 parser.add_argument('--optimize-grouping-only', dest='optimizeGroupingOnly', | |
18 help='optimize only the grouping parameters and not the ones associated with feature tracking', | |
19 action='store_true') | |
20 | |
21 args = parser.parse_args() | |
22 | |
23 with open('arguments.txt', 'w') as f: | |
24 f.write(str(args.intersections)) | |
25 f.write("\n") | |
26 f.write(str(args.optimizeGroupingOnly)) | |
27 | |
28 os.system('nomad nomad-parameters.txt initial-parameters.txt') | |
29 |