Connection types
The Automation can run several types of scripts and process their outputs eventually when needed. Settings of each script might vary, also depending on the fact what is the method currently being solved by the Uptimai Solver. All the controls are located on the right from the Setup section with the list of connected scripts.
Pure solver (no coupling)
This item allows running the Uptimai Solver without an actual connection created. Thus, there is no external script coupled as a source of data for the solver and no options to be configured. This option is usually used for the Data Analyzer method, which processes the already existing data stored in files already present in the project folder.
Python
Connection settings used to couple a Python programming language script. The Python script is either able to generate the required output and write it into the console or the plain text file, or it can be used for the preparation of inputs and adjustments of data obtained from external programs. Also, Python itself can start external solvers, e.g. Computer Fluid Dynamics or Finite Element Method codes.
As a typical use case here, a loop can be created where a Python script adjusts input files according to the demands of the Uptimai Solver, runs the external program, performs custom mathematical operations on results, and at the end writes the final output into the file with formatting expected by the Uptimai Solver.
How to use the interface
Figure 2 shows the settings of a Python script and how it is coupled with the Uptimai Solver. First, it is necessary to set the path to the coupled script itself via the icon in the top entry field.
If it is applicable, the user can select also a filename expected to contain the response to the solved set of input parameters. This has to be a plain text file with comma-separated values (in case of multiple outputs). The filename can be set either by selecting an existing output file via the file explorer or entering a new one.
The last entry field is used to select specific columns from the output file specified above or the console message line. This is used in cases where one of the columns is not relevant at all for the solved and needs to be removed. Stating Output columns to be included in the result as a list with comma-separated numbers of columns (count starts from 1 and from the left) specifies output values written into the internal database. Leaving the entry field empty will keep all the data.
The spinbox labelled Number of cores sets computer resources dedicated to the script. Be aware of possible conflicts with some external software that allocates a fixed number of cores and is already running.
The user can also set the source of data to Parse output from. There is a possibility to use the aforementioned plain text file, whose name can be set in the entry field on top, or to parse it directly from the console prints produced by the coupled script. For both cases, it is necessary to keep the proper formatting with comma-separated values on each line in case of multiple outputs. When parsing outputs from the console, the coupled script must not produce other messages.
Messages of the coupled script can be forbidden from printing into the GUI window by switching
off the Enable console logging, Use log file will store these into the
python_<project_name>_automation.log
file. This option does not affect the log of
Uptimai Solver messages, which are saved every time into the core_solver.log
file.
Under the Advanced settings, there is a specification of the Python interpreter executing the script and formatting instructions for running of the coupled script. If the user cannot find the desired version of Python in the Selected Python Executable menu, another one can be selected in the file explorer using the Add Python Virtual Environment to list option. As the label suggests, the typical use of this feature is in projects using specific Python libraries in a customized virtual environment.