Multiple Objective Optimization

An example that computes a Pareto-optimal point of a benchmark function using Chebyshev weights is given in the following:

[ ]:
from entmoot import Enting, ProblemConfig, GurobiOptimizer, PyomoOptimizer
from entmoot.benchmarks import (
    build_multi_obj_categorical_problem,
    eval_multi_obj_cat_testfunc,
)

# define problem
problem_config = ProblemConfig(rnd_seed=73)
# number of objectives
number_objectives = 2
build_multi_obj_categorical_problem(problem_config, n_obj=number_objectives)

# sample data
rnd_sample = problem_config.get_rnd_sample_list(num_samples=20)
testfunc_evals = eval_multi_obj_cat_testfunc(rnd_sample, n_obj=number_objectives)

Model parameters can be defined in a few ways:

[ ]:
from entmoot import EntingParams, UncParams, TrainParams, TreeTrainParams

# all three of the below `params` are valid arguments for Enting
params = {"unc_params": {"dist_metric": "l1", "acq_sense": "exploration"}}
params = EntingParams(**params)
params = EntingParams(unc_params=UncParams(dist_metric="l1", acq_sense="exploration"))

enting = Enting(problem_config, params=params)
# fit tree ensemble
enting.fit(rnd_sample, testfunc_evals)

Gurobi Version

[ ]:
# Build GurobiOptimizer object and solve optimization problem
params_gurobi = {"MIPGap": 0}
opt_gur = GurobiOptimizer(problem_config, params=params_gurobi)
res_gur = opt_gur.solve(enting)

Pyomo Version

[ ]:
# Build PyomoOptimizer object with GLPK as solver and solve optimization problem
params_pyo = {"solver_name": "gurobi"}
opt_pyo = PyomoOptimizer(problem_config, params=params_pyo)
res_pyo = opt_pyo.solve(enting)
[ ]: