pysolver_view.reporting.text module#
- pysolver_view.reporting.text.emit(message, *, logger=None, to_console=False, savefile=False, filename=None)[source]#
Write prepared text to the requested destinations without model access.
Format the optimization footer from supplied run data.
- pysolver_view.reporting.text.optimization_header(problem_name, method)[source]#
Format the optimization header from supplied run data.
- pysolver_view.reporting.text.optimization_progress(record)[source]#
Format one recorded optimization observation without diagnostic work.
- pysolver_view.reporting.text.print_dict(data, indent=0, return_output=False)[source]#
Recursively prints nested dictionaries with indentation or returns the formatted string.
- Parameters:
- datadict
The dictionary to print.
- indentint, optional
The initial level of indentation for the keys of the dictionary, by default 0.
- return_outputbool, optional
If True, returns the formatted string instead of printing it.
- Returns:
- str or None
The formatted string representation of the dictionary if return_output is True, otherwise None.
- pysolver_view.reporting.text.print_object(obj)[source]#
Prints all attributes and methods of an object, sorted alphabetically.
Methods are identified as callable and printed with the prefix ‘Method: ‘.
Attributes are identified as non-callable and printed with the prefix ‘Attribute: ‘.
- Parameters:
- objobject
The object whose attributes and methods are to be printed.
- Returns:
- None
This function does not return any value. It prints the attributes and methods of the given object.
Format the root footer from supplied run data.