initializeLogFile impure function

Requirements.Internal.initializeLogFile  ยท source

Icon of initializeLogFile

Initialize log file (remove existing file and add a blank line; remove the html report of an earlier run)

Extends Modelica.Icons.Function

Called once, at initialization, by Verify.PrintViolations (ok = initializeLogFile(logFile, time, htmlFile)). It removes the log file logFile of an earlier run, if it exists, and creates a new one containing a single blank line; the requirement blocks append one line each to it at the end of the run (printViolationsToLogFile, printStatisticsToLogFile), and readers start at line 2. If htmlFile is not empty, the HTML report of an earlier run is removed as well: its existence then marks that the summary of this run has been printed (printViolationsToOutput).

The output dummy is always 1; it is passed on through the sorting port so that the log file is initialized before anything is written to it. The input dummyInput is not used.

Inputs

NameTypeDescription
logFile inputStringName of log file
dummyInput inputRealDummy input (time) that makes the call depend on the calling when-equation
htmlFile inputStringHtml report of an earlier run, removed so that it marks this run's summary as printed once it exists (\"\" = none)

Outputs

NameTypeDescription
dummy outputRealDummy value to control sorting of equations