I am using dlib library for c++ to perform box-constrained optimization of custom function:
dlib::find_min_box_constrained(dlib::bfgs_search_strategy(),
dlib::objective_delta_stop_strategy(DELTA),
m, dlib::derivative(m),
starting_point, MIN_CONS, MAX_CONS);
where m
is the objective function, starting_point
is column vector of the initial values of the variables, MIN_CONS
is the minimal allowed value for each of the variable and MAX_CONS
is the maximal allowed value.
This works fine, but now, I would like to add another constraint on the variables - I want them to sum to 1. I am able to do this using scipy.optimize.minimize
in python3 (answered in this question). Is there any way to achieve this using dlib
?