docplex.mp.kpi module¶
-
class
docplex.mp.kpi.DecisionKPI(kpi_op, name=None)[source]¶ Bases:
docplex.mp.kpi.KPISpecialized class of Key Performance Indicator, based on expressions.
This subclass is built from a decision variable or a linear expression. The
compute()method returns the solution value after a successful solve.
-
class
docplex.mp.kpi.KPI[source]¶ Bases:
objectAbstract class for key performance indicators (KPIs).
Each KPI has a unique name. A KPI is attached to a model instance and can compute a numerical value, using the
compute()method.Some KPIs require a valid solution of the model, while others do not. Use
requires_solution()to check whether a given KPI requires a solution.-
get_model()[source]¶ Returns: The model instance on which the KPI is defined. Return type: docplex.mp.model.Model
-