Open jkriwet opened 4 months ago
Thanks for noticing. You need to change the validation part as well. Maybe call the obj
function using an arg
with a new parameter verbose
with the default being False? If this does not work maybe a class instance argument
Yes, this works.
The objective functions of the calibrator returns a tuple: (total_res, unweighted objective).
ebcpy needs the obj function to return only a float, because the optimization algorithms need this.
Interestingly, this is almost not noticable. See the following code as an example:
The "black_box_function" is the equivalent of the obj function. When beeing evaluated during the optimization, this evaluates correctly (Observable prints of the values). Only at a specific time (in this case when a new population is to be created) there will be an error:
It is though noticable when implementing different optimization algorithms, which immediately cant handle tuple returns of the obj function. Therefore this has to be changed.
Closes #59