UIPF / kernel interfacing during development
In theory, after compiling the calculation engine
kernel.exe for a specific process (with the Visual Studio solution or with
meson), in order to control that kernel via the UIPF user interface, you should package the installer and install it.
For convenience the model developer, during the development cycle, can force the UIPF she may have already installed for a different kernel, to point to the kernel in development. This is for “internal” use, only for developers.
To do so, open regedit (Windows+R, type
regedit, ENTER, accept the amministrative rights access) and browse to the key
HKEY_LOCAL_MACHINE\Software\libpf.com\LIBPF 1.0 or
HKEY_CURRENT_USER\Software\libpf.com\LIBPF 1.0, the relevant values are:
kernel_path: this is the root of all folders that may contain the various kernels, by default:
C:/Program Files/LIBPF(note: the path is written with forward slashes
/and not backslashes
\, à la Qt); if you are compiling with VC, you should set it to something like
active_kernel: this should point to the folder where the executable is located; for example, if you are building in Release configuration with VC, this could be set to
kernel_name: the actual name of the executable e.g.
$kernel_path/$active_kernel/$kernel_name must therefore exist, i.e. with the above sample settings:
Finally create a
types.txt file in the folder pointed to by
active_kernel; this file makes the UIPF user interface aware of what types of flowsheets, user-defined reactions, and other models the current computation kernel implements.
types.txt must have 3 rows for each flowsheet class, with each group of 3 rows separated with a blank line:
the name of the class (e.g.
a descriptive text
MyFlowsheet Gasifier con reaction scheme B FlowSheet<ZeroZero>
types.txt file is parsed by UIPF at startup; if you change it, to make sure the changhes are picked up yu need to qui and restart UIPF.