Export the Results to an External File
This guide shows how to export the results of an optimization or a simulation from SAInt to an external file for post-processing with other software. Supported external file formats are Microsoft Excel™ (either xls or xlsx formats), comma-separated values (CSV) files, or ASCII text (TXT) files. The user can export basic or derived results at the same time. The procedure is the same for all supported scenario types.
For more details on how to export data from SAInt refer to "Exporting Network & Scenario Data".
1. Create the "Result Description" file
The first step for exporting results from SAInt is creating of a "result description" file. A result description file is no more than a list of results the user wants to extract from a successfully solved scenario. The format of a result description file could be Microsoft Excel™, CSV or TXT.
On each new line of a TXT or CSV file, or new cell of the first column of an Excel sheet, the user must specify the result type to retrieve an object using the syntax "ObjectType.ObjectName.Extension.[Unit]". It is not mandatory to indicate any placeholder for time, because SAInt evaluates the expression at each time step. The same result description file could be used for steady state or (quasi-)dynamic simulations. The units of measure could be omitted if the user is happy with the default defined in the SAInt session.
Figure 1 shows an example of a results description file in Microsoft Excel™ (left) and ASCII txt (right) format for objects of gas system or for objects of an electric system.
Create your own result description file and save it in a folder within the project’s directory.
2. Select the "Results Description" file
The second step is from the tab Scenario to select Figure 2).
. The last context menu entry depends on the type of scenario used, so it could be From Electric Scenario, From Gas Scenario or From Thermal Scenario. The "Choose Result Description File" window opens, and the user must select the results file created in the previous step (3. Choose the "Results Output" file
The third and last step is to specify where to save the output of the export procedure. Figure 3 shows an example of the "Choose Result Output File" window where the user can choose the name, destination, and format of the output file. As for the input format of the result description file, SAInt supports as output formats Microsoft Excel™, CSV or TXT. The default is Microsoft Excel™.
When dealing with big models, export results may require a certain amount of time. SAInt asks the user to confirm that they want to carry out the export operation before attempting one.
When everything goes well, SAInt informs the user that the export was successful and that the requested output file has been written to the specified location.
In case of errors, SAInt will inform the user and write a log file in the same folder as the result description file. The log file contains useful information to debug the problem. Even in case of errors, SAInt may produce a result file.