OCP Balance

class pbparam.OCPBalance(data_fit, data_ref, weights=None, cost_function=<pbparam.cost_functions.rmse.RMSE object>)[source]

OCP balance optimisation problem class. This subclass uses data_fit for the base class ‘data’ and data_ref for the base class ‘model’.

objective_function(x)[source]

Calculates the cost of the simulation based on the fitting parameters.

Parameters:

x (list) – List of fitting parameters.

Returns:

cost – The cost of the simulation.

Return type:

float

process_and_clean_data()[source]

Sets up the objective function for optimization.

This function processes the reference data, interpolates it, and determines the initial guesses and bounds for the optimization.