Mercurial Hosting > traffic-intelligence
changeset 1224:a09a80cdc118
solving the issue of integer parameters
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 22 Jun 2023 12:23:36 -0400 |
parents | 051cf5bddc1f |
children | 202073959fb4 |
files | scripts/nomad/nomad-parameters.txt scripts/nomad/site-parameters-optimization.py |
diffstat | 2 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/nomad/nomad-parameters.txt Wed Jun 21 23:57:54 2023 -0400 +++ b/scripts/nomad/nomad-parameters.txt Thu Jun 22 12:23:36 2023 -0400 @@ -5,7 +5,7 @@ X0 initial-parameters.txt # starting point -LOWER_BOUND ( 0.01 0 1 1 0.0001 1 -1 2 0.1 0.1 1.0) # all variables' lower bounds +LOWER_BOUND ( 0.01 0.01 1 1 0.0001 1 -1 2 0.1 0.1 1.0) # all variables' lower bounds UPPER_BOUND ( 1 10 10 10 0.1 5 1 100 10 5 15 ) # all variables' upper bounds MAX_BB_EVAL 500 # the algorithm terminates when
--- a/scripts/nomad/site-parameters-optimization.py Wed Jun 21 23:57:54 2023 -0400 +++ b/scripts/nomad/site-parameters-optimization.py Thu Jun 22 12:23:36 2023 -0400 @@ -28,18 +28,26 @@ '--acceleration-bound', #[1.-5.] 3 '--deviation-bound', #[-1, 1] 0.6 #p[3] = '--min-tracking-error' #[0.01-0.3] - '--min-feature-time', #[2-100]integer + '--min-feature-time', #[2-100] integer '--mm-connection-distance', #[0.5-100] '--mm-segmentation-distance', #[1-100] ~mm-connection-distance / 2.5 '--min-nfeatures-group'] #[2-4] - + integerParameters = [2, 3, 7] para = [] if len(x) == 4: for n in range(4): - para = para + [p[-4+n],x[n]] + if n+7 in integerParameters: + value = x[n].split('.')[0] #int(np.floor(float(x[n]))) recast to str + else: + value = x[n] + para = para + [p[-4+n],value] else: for n in range(len(x)): - para = para + [p[n],x[n]] + if n in integerParameters: + value = x[n].split('.')[0] + else: + value = x[n] + para = para + [p[n], value] return para