def parallelization_default():
    data = model_data()
    general_opts = {
        "logging_folder": "benchmarks/logs_parallelization_default",
    }

    for model_name in data:
        model = data[model_name]["model"]
        opts = data[model_name]["opts"]
        opts.update(general_opts)
        opts["name"] = model_name

        py_augmecon = PyAugmecon(model(model_name), opts)
        py_augmecon.solve()
Example #2
0
def parallelization_simple():
    data = model_data()
    general_opts = {
        "logging_folder": "benchmarks/logs_parallelization_simple",
        "redivide_work": False,
        "shared_flag": False,
    }

    for model_name in data:
        model = data[model_name]["model"]
        opts = data[model_name]["opts"]
        opts.update(general_opts)
        opts["name"] = model_name

        py_augmecon = PyAugmecon(model(model_name), opts)
        py_augmecon.solve()
Example #3
0
def augmecon_2():
    data = model_data()
    general_opts = {
        "logging_folder": "benchmarks/logs_augmecon_2",
        "shared_flag": False,
        "redivide_work": False,
        "flag_array": False,
        "cpu_count": 1,
        "process_timeout": 3600 * 4,  # timeout after 4 hours
    }

    for model_name in data:
        model = data[model_name]["model"]
        opts = data[model_name]["opts"]
        opts.update(general_opts)
        opts["name"] = model_name

        py_augmecon = PyAugmecon(model(model_name), opts)
        py_augmecon.solve()
def parallelization_cores():
    data = model_data()
    general_opts = {
        "logging_folder": "benchmarks/logs_parallelization_cores",
    }

    # No parallelization for two-objective functions, so testing different
    # numbers of cores is not interesting
    to_remove = ("2kp50", "2kp100", "2kp250")
    for k in to_remove:
        data.pop(k, None)

    for model_name in data:
        for cores in range(2, 49, 2):
            model = data[model_name]["model"]
            opts = data[model_name]["opts"]
            general_opts["cpu_count"] = cores
            opts.update(general_opts)
            opts["name"] = model_name

            py_augmecon = PyAugmecon(model(model_name), opts)
            py_augmecon.solve()