def _branin_quick_start_cli(): def _branin_function(X): """ Compute the branin function. :param X: dictionary containing the input points. :return: the value of the branin function """ x1 = X["x1"] x2 = X["x2"] a = 1.0 b = 5.1 / (4.0 * math.pi * math.pi) c = 5.0 / math.pi r = 6.0 s = 10.0 t = 1.0 / (8.0 * math.pi) y_value = (a * (x2 - b * x1 * x1 + c * x1 - r)**2 + s * (1 - t) * math.cos(x1) + s) return y_value parameters_file = resource_filename("hypermapper", "_branin_scenario.json") optimizer.optimize(parameters_file, _branin_function) print("End of Branin.")
def main(): parameters_file = "example_scenarios/quick_start/branin_scenario.json" optimizer.optimize(parameters_file, branin_function) print("End of Branin.")
def main(): parameters_file = ( "example_scenarios/synthetic/prior_currinexp/prior_currinexp_scenario.json" ) optimizer.optimize(parameters_file, currin_exp_function) print("End of CurrinExp.")
else sys.path ) sys.path.append(".") # noqa sys.path = list(OrderedDict.fromkeys(sys.path)) from hypermapper import optimizer if __name__ == "__main__": warnings.warn( "Using 'scripts/hypermapper' is deprecated and it will be removed in the future. Use 'hypermapper/optimizer' instead.", DeprecationWarning, 2, ) if len(sys.argv) == 2: parameters_file = sys.argv[1] else: print("Error: only one argument needed, the parameters json file.") if parameters_file == "--help" or len(sys.argv) != 2: print("################################################") print("### Example: ") print("### cd hypermapper") print( "### python3 hypermapper/optimizer.py example_scenarios/spatial/BlackScholes_scenario.json" ) print("################################################") exit(1) optimizer.optimize(parameters_file)
def main(): parameters_file = ( "example_scenarios/synthetic/batch_branin/batch_branin_scenario.json") optimizer.optimize(parameters_file, branin_function) print("End of Branin.")
def main(): parameters_file = "example_scenarios/synthetic/dtlz1/dtlz1_scenario.json" optimizer.optimize(parameters_file, dtlz1_function) print("End of DTLZ1.")
def main(): parameters_file = "example_scenarios/synthetic/branin4/branin4_scenario.json" optimizer.optimize(parameters_file, branin4_function) print("End of Branin4.")
def main(): parameters_file = "example_scenarios/synthetic/ordinal_multiobjective_branin/ordinal_multiobjective_branin_scenario.json" optimizer.optimize(parameters_file, branin_function_two_objectives) print("End of Branin.")
def main(): parameters_file = ( "example_scenarios/synthetic/chakong_haimes/chakong_haimes_scenario.json" ) optimizer.optimize(parameters_file, chakong_haimes) print("End of Chakong and Haimes.")