Package jline.io.tikz

Class TikZExporter

  • All Implemented Interfaces:

    
    public class TikZExporter
    
                        

    Exports a queueing network model as a TikZ diagram. Can generate LaTeX code, compile to PDF, and display the result.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • TikZExporter

        TikZExporter(Network model)
        Creates a TikZ exporter with default options.
      • TikZExporter

        TikZExporter(Network model, TikZOptions options)
        Creates a TikZ exporter with custom options.
    • Method Detail

      • generateTikZ

         String generateTikZ()

        Generates TikZ code for the network.

        Returns:

        Complete LaTeX document with TikZ diagram

      • exportToFile

         void exportToFile(String filePath)

        Exports the TikZ code to a file.

        Parameters:
        filePath - Path to the output .
      • exportToPNG

         void exportToPNG(String filePath, int dpi)

        Exports the network diagram to a PNG file. Requires pdflatex and pdftoppm (from poppler-utils) to be installed.

        Parameters:
        filePath - Path to the output .
        dpi - Resolution in dots per inch (default 150)
      • exportToPNG

         void exportToPNG(String filePath)

        Exports the network diagram to a PNG file with default 150 DPI.

        Parameters:
        filePath - Path to the output .
      • exportToPDF

         File exportToPDF()

        Compiles the TikZ code to PDF using pdflatex.

        Returns:

        The generated PDF file

      • display

         void display()

        Displays the network diagram. Compiles to PDF and opens in the system viewer.

      • isPdfLatexAvailable

         static boolean isPdfLatexAvailable()

        Checks if pdflatex is available on the system.

      • generateEnvironmentTikZ

         String generateEnvironmentTikZ(Array<String> stageNames, Array<Array<double>> transitionRates)

        Generates TikZ code for a combined network + Markov chain diagram. The Markov chain represents the environment states.

        Parameters:
        stageNames - Names of the environment stages
        transitionRates - Matrix of transition rates between stages
        Returns:

        TikZ code for the Markov chain placed to the right of the network