Exemplo n.º 1
0
    def __init__(self, _path, _name):

        self.path = _path
        self.name = _name

        nameWithoutExtension = self.name.split('.')[0]

        self.doc = latex.LatexReport(self.path, nameWithoutExtension)

        self.fileNameRead = self.path + "\\" + self.name

        self.sizeFigX = 10
        self.sizeFigY = 6

        self.sizeLegend = 15
        self.sizeAxis = 15

        self.yearlyFactor = 10

        self.myColorsIn = [
            'y', '0.75', '0.5', '#FF9933', '#CCFF33'
            '#CCFFFF'
            'g'
        ]
        self.myColorsOut = [
            'b', 'r', 'm', '#FF9933', 'g'
            'c'
            '#CCFF33'
            '#CCFFFF'
        ]
        self.myColorsImb = 'k'

        self.addLatexTables = ""
Exemplo n.º 2
0
    def setOutputhPathAndFileName(self, path, fileName):

        self.outputPath = path
        self.fileName = fileName

        logger.debug("path:%s name:%s" % (self.outputPath, self.fileName))
        self.doc = latex.LatexReport(self.outputPath, self.fileName)
Exemplo n.º 3
0
    def __init__(self, _path, _name):

        self.path = _path
        self.name = _name

        nameWithoutExtension = self.name.split(".")[0]

        self.doc = latex.LatexReport(self.path, nameWithoutExtension)

        self.fileNameRead = self.path + "\\" + self.name

        self.sizeFigX = 10
        self.sizeFigY = 6

        self.sizeLegend = 15
        self.sizeAxis = 15

        self.yearlyFactor = 10

        self.myColorsIn = [
            "y", "0.75", "0.5", "#FF9933", "#CCFF33"
            "#CCFFFF"
            "g"
        ]
        self.myColorsOut = [
            "b", "r", "m", "#FF9933", "g"
            "c"
            "#CCFF33"
            "#CCFFFF"
        ]
        self.myColorsImb = "k"

        self.addLatexTables = ""
Exemplo n.º 4
0
    def _createLatex(
        self,
        parameters: _input.Parameters,
        output: _output.Output,
        resultsJsonFilePath: _pl.Path,
    ):
        simulationName = self._getSimulationName(resultsJsonFilePath)

        doc = latex.LatexReport(str(resultsJsonFilePath.parent),
                                simulationName)
        doc.resetTexName(simulationName + "-cost")

        doc.setSubTitle("Energy generation costs")
        doc.setTitle(simulationName)
        doc.setAuthor(parameters.reportAuthor)
        doc.setEMail(parameters.reportEmail)
        doc.setCleanMode(self._getIsLatexCleanMode(parameters))

        doc.addBeginDocument()
        self._addTableEconomicAssumptions(parameters, output, doc)
        self._addTableCosts(output, doc)
        doc.addPlot(self.nameCostPdf, "System cost", "systemCost", size=13)
        doc.addPlot(
            self.nameCostAnnuityPdf,
            "System cost annuity share",
            "systemCostannuity",
            size=13,
        )
        doc.addEndDocumentAndCreateTexFile()

        doc.executeLatexFile()
Exemplo n.º 5
0
def _createLatexDoc(configPath, latexNames):
    doc = _latex.LatexReport("", "")
    if latexNames:
        if ":" in latexNames:
            latexNameFullPath = latexNames
        else:
            latexNameFullPath = _os.path.join(configPath, latexNames)
        doc.getLatexNamesDict(file=latexNameFullPath)
    else:
        doc.getLatexNamesDict()
    return doc
Exemplo n.º 6
0
    def createLatexFromGlePlots(self, namePlots, latexFile, titleLatex,
                                subTileLatex):

        doc = latex.LatexReport(self.path, latexFile)
        doc.setCleanMode(False)
        doc.setTitle(titleLatex)
        doc.setSubTitle(subTileLatex)

        doc.addBeginDocument()

        for i in range(len(namePlots)):

            nameWithPath = self.executeGLE(namePlots[i])

            doc.addPlot(nameWithPath, "caption", "Fig%d" % i, 12)

        doc.addEndDocumentAndCreateTexFile()
        doc.executeLatexFile()
Exemplo n.º 7
0
    def __init__(self, _path, _name):

        self.fileName = _name
        self.outputPath = _path + "\%s" % self.fileName
        self.executingPath = _path
        self.titleOfLatex = "$%s$" % self.fileName
        self.folderName = self.fileName
        self.tempFolder = "%s\\temp" % self.outputPath

        self.fileNameWithExtension = _name

        self.doc = latex.LatexReport(self.outputPath, self.fileName)

        self.plot = plot.PlotMatplotlib()
        self.plot.setPath(self.outputPath)

        self.readTrnsysFiles = readTrnsysFiles.ReadTrnsysFiles(self.tempFolder)

        self.unit = unit.UnitConverter()

        self.initialize()
Exemplo n.º 8
0
    def createLatexSimulationReport(self):

        self.plotT = False

        self.plots()

        nameLatex = "ResultsFile"

        doc = latex.LatexReport(self.path, nameLatex)
        doc.setCleanMode(True)

        doc.setTitle("Processed results")
        doc.setSubTitle("%s" % self.path.split("\\")[-1])

        doc.addBeginDocument()

        doc.lines = doc.lines + self.tableLines

        # doc.addPlot(self.imbSpfPdf,"","",12)
        # doc.addPlot(self.imbItPdf,"","",12)

        doc.addEndDocumentAndCreateTexFile()
        doc.executeLatexFile()
Exemplo n.º 9
0
    def createLatexSimulationReport(self, sortBy="it"):

        self.plotT = False

        self.plots()

        nameLatex = "SimulationsErrorCheck"

        doc = latex.LatexReport(self.path, nameLatex)
        doc.setCleanMode(True)

        doc.setTitle("Errors in simulations")
        doc.setSubTitle("%s" % self.path.split("\\")[-1])

        doc.addBeginDocument()

        self.doTableErrors(doc, sortBy=sortBy)
        self.doTableErrors(doc, sortBy="imb")

        doc.addPlot(self.imbSpfPdf, "", "", 12)
        doc.addPlot(self.imbItPdf, "", "", 12)

        doc.addEndDocumentAndCreateTexFile()
        doc.executeLatexFile()