linopy.model.Model.format_infeasibilities

linopy.model.Model.format_infeasibilities#

Model.format_infeasibilities(display_max_terms=None)#

Return a string representation of infeasible constraints.

This function requires that the model was solved using gurobi or xpress and the termination condition was infeasible.

Parameters:

display_max_terms (int, optional) – The maximum number of infeasible terms to display. If None, uses the global linopy.options.display_max_terms setting.

Returns:

str – String representation of the infeasible constraints.