.. _py-hyperflow/ModelImplementationView: ********************************************************** hyperflow/ModelImplementationView ********************************************************** .. default-domain:: py .. py:currentmodule:: mod .. cpp:namespace:: mod .. class:: hyperflow.ModelImplementationView This class serves as a view on a locked hyperflow model, to obtain visualisations and statistics from how the model is implemented internally. .. method:: __init__(self, model) :raises: :class:`LogicError` if ``model`` is ``None``. :raises: :class:`LogicError` if ``not specificationLocked`` .. method:: printExpandedVertex(v) printExpandedVertex(g) Print the expanded flow network for an explicitly given vertex or a vertex indicated by a given graph. The graph version is equivalent to calling ``self.printExpandedVertex(dg.findVertex(g))``, where ``dg`` is the derivation graph of the underlying model. :returns: the name of the PDF-file which will be created in post-processing. :raises: (the vertex version) :class:`LogicError` if ``not v``. :raises: (the graph version) :class:`LogicError` if it is not represented in the underlying DG. .. method:: printExpanded() Print the complete expanded derivation graph. :returns: the name of the PDF-file which will be created in post-processing. .. method:: printEnumerationTree() Print the search tree generated by the solution enumeration. :returns: the name of the generated file. .. method:: writeMILP(self, format="lp") Writes the internal (M)ILP implementation of the model to a file, in the given format. Note that different ILP libraries can write different formats. :param str format: the format to write the model in. Defaults to ``lp``. :returns: the name of the written file. :throws: :class:`LogicError` if the solver does not support writing in the given format. .. attribute:: numMILPVariables numMILPConstraints (Read-only) Various statistics of the model implementation. :type: int