.. _cpp-hyperflow/ModelImplementationView: ********************************************************** hyperflow/ModelImplementationView.hpp ********************************************************** .. default-domain:: cpp .. default-role:: cpp:texpr .. 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. .. function:: ModelImplementationView(std::shared_ptr model) :throws: :class:`LogicError` if `!model` :throws: :class:`LogicError` if `!model->isSpecificationLocked()` .. function:: std::string printExpandedVertex(dg::DG::Vertex v) const Print the expanded flow network for the given vertex. :returns: the name of the PDF-file which will be created in post-processing. :throws: :class:`LogicError` if `!v`. :throws: :class:`LogicError` if `v.getDG()` is not in the same as in the underlying model. .. function:: std::string printExpandedVertex(std::shared_ptr g) const Equivalent to using `dg::DG::findVertex` on the underlying derivation graph and calling the vertex version. .. function:: std::string printExpanded() const Print the complete expanded derivation graph. :returns: the name of the PDF-file which will be created in post-processing. .. function:: std::string printEnumerationTree() const Print the search tree generated by the solution enumeration. :returns: the name of the generated file. .. function:: std::string writeMILP() const std::string writeMILP(std::string filetype) const Writes the internal (M)ILP implementation of the model to a file, in the given format. The default format is ``lp``. :returns: the name of the written file. :throws: :class:`LogicError` if the solver does not support writing in the given format. .. function:: int getNumMILPVariables() const int getNumMILPConstraints() const :returns: various statistics of the model implementation.