你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Changed name of OA function.
这个提交包含在:
@@ -76,7 +76,7 @@ def main():
|
|||||||
# Process for Taguchi optimisation #
|
# Process for Taguchi optimisation #
|
||||||
########################################
|
########################################
|
||||||
if args.opt_taguchi:
|
if args.opt_taguchi:
|
||||||
from user_libs.optimisations.taguchi import taguchi_code_blocks, select_OA, calculate_ranges_experiments, calculate_optimal_levels, plot_optimisation_history
|
from user_libs.optimisations.taguchi import taguchi_code_blocks, construct_OA, calculate_ranges_experiments, calculate_optimal_levels, plot_optimisation_history
|
||||||
|
|
||||||
# Default maximum number of iterations of optimisation to perform (used if the stopping criterion is not achieved)
|
# Default maximum number of iterations of optimisation to perform (used if the stopping criterion is not achieved)
|
||||||
maxiterations = 20
|
maxiterations = 20
|
||||||
@@ -102,7 +102,7 @@ def main():
|
|||||||
fitness_metric = getattr(importlib.import_module('user_libs.optimisations.taguchi_fitness'), fitness['name'])
|
fitness_metric = getattr(importlib.import_module('user_libs.optimisations.taguchi_fitness'), fitness['name'])
|
||||||
|
|
||||||
# Select OA
|
# Select OA
|
||||||
OA, N, k, s = select_OA(optparams)
|
OA, N, k, s = construct_OA(optparams)
|
||||||
|
|
||||||
# Initialise arrays and lists to store parameters required throughout optimisation
|
# Initialise arrays and lists to store parameters required throughout optimisation
|
||||||
# Lower, central, and upper values for each parameter
|
# Lower, central, and upper values for each parameter
|
||||||
@@ -241,11 +241,11 @@ def main():
|
|||||||
if fitnessvalueshist[i - 1] > fitness['stop']:
|
if fitnessvalueshist[i - 1] > fitness['stop']:
|
||||||
break
|
break
|
||||||
|
|
||||||
# Stop optimisation if successive fitness values are within 1%
|
# # Stop optimisation if successive fitness values are within 1%
|
||||||
if i > 2:
|
# if i > 2:
|
||||||
fitnessvaluesclose = (np.abs(fitnessvalueshist[i - 2] - fitnessvalueshist[i - 1]) / fitnessvalueshist[i - 1]) * 100
|
# fitnessvaluesclose = (np.abs(fitnessvalueshist[i - 2] - fitnessvalueshist[i - 1]) / fitnessvalueshist[i - 1]) * 100
|
||||||
if fitnessvaluesclose < 1:
|
# if fitnessvaluesclose < 1:
|
||||||
break
|
# break
|
||||||
|
|
||||||
# Save optimisation parameters history and fitness values history to file
|
# Save optimisation parameters history and fitness values history to file
|
||||||
opthistfile = inputfileparts[0] + '_hist'
|
opthistfile = inputfileparts[0] + '_hist'
|
||||||
|
在新工单中引用
屏蔽一个用户